fix(agetn features):

1. Historical multimodal message writing is incorporated into the conversation context;
2. Resolve the issues where csv, json, and txt files cannot be recognized due to encoding problems;
3. File quantity limit;
4. Error details
This commit is contained in:
Timebomb2018
2026-03-19 17:25:44 +08:00
parent 8c804a1011
commit 7056865726
9 changed files with 99 additions and 34 deletions

View File

@@ -264,7 +264,7 @@ class SharedChatService:
limit=memory_config.get("max_history", 10)
)
history = [
{"role": msg.role, "content": msg.content}
{"role": msg.role, "content": [{"type": "text", "text": msg.content}] + msg.meta_data.get("files", [])}
for msg in messages
]
@@ -472,7 +472,7 @@ class SharedChatService:
limit=memory_config.get("max_history", 10)
)
history = [
{"role": msg.role, "content": msg.content}
{"role": msg.role, "content": [{"type": "text", "text": msg.content}] + msg.meta_data.get("files", [])}
for msg in messages
]