mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 11:27:21 +00:00
Improved how the AI remembers its earlier tool calls (#1185)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
0885862150
commit
382db4b8d0
22 files changed
+1323
-24
No files matched your search
@@ -155,10 +155,15 @@ public sealed record ConversationParts
|
||||
if (string.IsNullOrWhiteSpace(text.Text))
|
||||
continue;
|
||||
|
||||
//
|
||||
// An earlier answer travels with the note of the tools and sources it rested on, see
|
||||
// ToolCallHistoryNote.TextForModel, so it is counted with it. The note of an answer does
|
||||
// not change anymore, so the text stays the same and its count stays in the cache.
|
||||
//
|
||||
if (text.IsStreaming)
|
||||
growing.Add(text.Text);
|
||||
else
|
||||
texts.Add(text.Text);
|
||||
texts.Add(ToolCallHistoryNote.TextForModel(block, text.Text));
|
||||
|
||||
Sort(text.FileAttachments, documents, ref images);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user