Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
GetBufferString includes legacy FunctionCall data but omits modern ToolCalls. Text conversation memory loses the call IDs, function names, and arguments, and ConversationTokenBuffer can keep a tool call whose large arguments exceed its token budget. Append tool calls using their existing JSON representation and handle both value and pointer AIChatMessages, preserving the legacy function-call format.
Four regressions fail on the baseline: both message forms, ConversationBuffer.LoadMemoryVariables, and token pruning after SaveContext. The formatting test round-trips through the public ToolCall JSON marshaler; the memory test starts with a complete human/call/result exchange and uses no model calls. Related #1270 adds EnhancedTokenBuffer, #1240 concerns agent behavior, and #1479 concerns MessageContent conversion; none changes GetBufferString.
Validation: go test -race -count=1 ./llms ./memory/... ./chains ./agents and repository-wide golangci-lint v2.3.0 pass. Unrelated full-suite integration limitations (credentials, recorded HTTP fixtures, and service containers) are unchanged. Prepared and validated with Codex.