Skip to content

Commit 9608f26

Browse files
committed
fix: tools wrapping according to latest genai library
1 parent 3ef4f28 commit 9608f26

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lambda_agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ def chat(self, user_input: str) -> str:
9696

9797
# 4. Send ALL the tool responses back to the model
9898
# so it can continue reasoning based on the new information
99+
tool_content = types.Content(role="tool", parts=tool_responses)
99100
with Spinner():
100-
response = self.chat_session.send_message(tool_responses)
101+
response = self.chat_session.send_message(tool_content)
101102
continue # Start the loop over to see if it calls more tools
102103
else:
103104
# No more tool calls; the LLM has generated a final text response.

0 commit comments

Comments
 (0)