Skip to content

Read tool gets called when knowledge tool encounters errors with process knowledge files resulting in string length exceeded errors. #263

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

Closed
sangee2004 opened this issue Aug 22, 2024 · 4 comments
Assignees
Labels
blowout bug Something isn't working

Comments

@sangee2004
Copy link

Electron build -bf86f18e1c

Steps to reproduce the problem:

  1. Chart with Tildy
  2. Add a pdf file (6.5 MB in my case) using "Add Knowledge"
  3. Tried to ask question about information in this pdf file which resulted in knowledge tool not being able to answer and LLM resorted to reading the file using read tool.

This results in following string length exceeded errors:

Screenshot 2024-08-22 at 1 53 21 PM

Expected Behavior:
Prevent Read tool from being called for large files which it is not able to handle and results in failure.

@sangee2004 sangee2004 added the bug Something isn't working label Aug 22, 2024
@cjellick cjellick self-assigned this Aug 27, 2024
@cjellick
Copy link
Contributor

need to think about the best way to handle this. the read tool itself should be more ...reluctant?... to blow out the context.

@cjellick
Copy link
Contributor

This exact situation shouldn't happen any longer as knowledge has been decoupled from the workspace - #360

But @g-linville I still want you to make it so that the read tool doesnt try to read binary files (and potentially just large files or it cuts them off).

@g-linville
Copy link
Member

This should be good now. The description for sys.read tells the LLM not to use it to read binary files, and sys.read will now return an error back to the LLM if it detects that a file is not plain text.

@sangee2004
Copy link
Author

Tested with latest build from electron - 81ca1d72a2

sys.read tool is not being used for reading a pdf file .

Screenshot 2024-09-04 at 11 23 04 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blowout bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants