-
Notifications
You must be signed in to change notification settings - Fork 2k
Remove unused messageHistory
#3574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: YunKui Lu <[email protected]>
| List<Message> messageHistory = new ArrayList<>(prompt.copy().getInstructions()); | ||
| messageHistory.add(new AssistantMessage(assistantMessage.getText(), assistantMessage.getMetadata(), | ||
| assistantMessage.getToolCalls())); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The messageHistory in the buildToolContext method is actually unused. The real messageHistory construction happens in the buildConversationHistoryBeforeToolExecution method.
private static List<Message> buildConversationHistoryBeforeToolExecution(Prompt prompt,
AssistantMessage assistantMessage) {
List<Message> messageHistory = new ArrayList<>(prompt.copy().getInstructions());
messageHistory.add(new AssistantMessage(assistantMessage.getText(), assistantMessage.getMetadata(),
assistantMessage.getToolCalls()));
return messageHistory;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YunKuiLu Good catch. Thanks for the cleanup!
messageHistory
Fixes #3574 Signed-off-by: YunKui Lu <[email protected]> (cherry picked from commit 3b94838)
Auto-cherry-pick to 1.0.x Fixes spring-projects#3574 Signed-off-by: YunKui Lu <[email protected]>
Auto-cherry-pick to 1.0.x Fixes spring-projects#3574 Signed-off-by: YunKui Lu <[email protected]>
No description provided.