-
-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Khoj responses when code generated charts in response context
The current fix should improve Khoj responses when charts in response context. It truncates code context before sharing with response chat actors. Previously Khoj would respond with it not being able to create chart but than have a generated chart in it's response in default mode. The truncate code context was added to research chat actor for decision making but it wasn't added to conversation response generation chat actors. When khoj generated charts with code for its response, the images in the context would exceed context window limits. So the truncation logic to drop all past context, including chat history, context gathered for current response. This would result in chat response generator 'forgetting' all for the current response when code generated images, charts in response context.
- Loading branch information
Showing
4 changed files
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters