In the AWS Nova Sonic example, send back "location" from the weather-fetching function to help the model associate a tool response with a tool call...if you interrupt the model while more than one function call is outbound, it seemingly can get confused about which tool result goes which call.

This commit is contained in:
Paul Kompfner
2025-12-09 16:27:23 -05:00
parent 3cbfbb997e
commit 1892854516

View File

@@ -49,6 +49,7 @@ async def fetch_weather_from_api(params: FunctionCallParams):
{
"conditions": "nice",
"temperature": temperature,
"location": params.arguments["location"],
"format": params.arguments["format"],
"timestamp": datetime.now().strftime("%Y%m%d_%H%M%S"),
}