Skip to content

Commit eae78b7

Browse files
YunKuiLuspring-builds
authored andcommitted
Remove code that's actually unused. (#3574)
Fixes #3574 Signed-off-by: YunKui Lu <luyunkui95@gmail.com> (cherry picked from commit 3b94838)
1 parent 8928da4 commit eae78b7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

spring-ai-model/src/main/java/org/springframework/ai/model/tool/DefaultToolCallingManager.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@ private static ToolContext buildToolContext(Prompt prompt, AssistantMessage assi
153153
&& !CollectionUtils.isEmpty(toolCallingChatOptions.getToolContext())) {
154154
toolContextMap = new HashMap<>(toolCallingChatOptions.getToolContext());
155155

156-
List<Message> messageHistory = new ArrayList<>(prompt.copy().getInstructions());
157-
messageHistory.add(new AssistantMessage(assistantMessage.getText(), assistantMessage.getMetadata(),
158-
assistantMessage.getToolCalls()));
159-
160156
toolContextMap.put(ToolContext.TOOL_CALL_HISTORY,
161157
buildConversationHistoryBeforeToolExecution(prompt, assistantMessage));
162158
}

0 commit comments

Comments
 (0)