Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knowledge2character produces output file with wrong format. #14

Open
trojanMcAfee opened this issue Dec 28, 2024 · 5 comments
Open

knowledge2character produces output file with wrong format. #14

trojanMcAfee opened this issue Dec 28, 2024 · 5 comments

Comments

@trojanMcAfee
Copy link

trojanMcAfee commented Dec 28, 2024

Due to the workaround mentioned here, I had to convert a PDF file to knowledge using node.

That created a file which holds an object (from folder2knowledge.js):

const output = {
  documents: docs,
  chunks: chks
};

When running knowledge2character.js, it creates a new character.json file holding that object as knowledge, but when running the agent with pnpm start --character="characters/<character>.character.json", it fails with a parsing error since it's expecting an array for knowledge instead of an object.

@mintcloud
Copy link

mintcloud commented Jan 3, 2025

--EDIT: I just kept the chunks content, removed documents, formatted it as an array, it worked

Running into the same issue. Not sure whether I should keep either one of the two (documents or chunks) or whether it should be formatted differently

@saiSunkari19
Copy link

saiSunkari19 commented Jan 3, 2025

-- I don't think so, When I used some doc like bitcoin doc converted to Markdown.
I can see some data in documents section and chunks section. Do I need to remove any one of these and use for knowledge in the character file .

Any help??

@mintcloud
Copy link

I removed the documents data altogether and kept the chunks content (removing the key part, and copying the content so that knowledge is an array)

@benreichman
Copy link

+1. @mintcloud 's solution worked, but is this the proper way to do it ?

@edgarleal
Copy link

the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants