Auto summarize conversations, add attachment count #1341
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the conversation management and database schema in the
agixt
project. The key changes include adding support for conversation summaries and attachment counts, updating the database schema to include these new fields, and ensuring the conversation summary is updated during interactions.Enhancements to conversation management:
agixt/Conversations.py
: Added methodsset_conversation_summary
,get_conversation_summary
,get_attachment_count
,update_attachment_count
, andincrement_attachment_count
to manage conversation summaries and attachment counts.agixt/Conversations.py
: Updatedget_conversations_with_detail
to includesummary
andattachment_count
in the returned conversation details.Database schema updates:
agixt/DB.py
: Addedsummary
andattachment_count
columns to theConversation
class.agixt/DB.py
: Implementedensure_conversation_summary
function to add the new columns to the database schema if they do not already exist. [1] [2]Conversation summary updates:
agixt/XT.py
: Incremented attachment count when a file is downloaded inlearn_from_file
.agixt/XT.py
: Updated the conversation summary after a chat completion inchat_completions
.New prompt template:
agixt/prompts/Default/Summarize Conversation.txt
: Added a new prompt template for summarizing conversations.