# Store a model message with a FunctionCall (no ID needed)
client.sessions.store_message(
session_id=session.id,
blob={
"role": "model",
"parts": [
{
"functionCall": {
"name": "get_weather",
"args": {"city": "San Francisco"}
}
}
]
},
format="gemini"
)
# Store the FunctionResponse — Acontext resolves the tool_call_id automatically
client.sessions.store_message(
session_id=session.id,
blob={
"role": "user",
"parts": [
{
"functionResponse": {
"name": "get_weather",
"response": {"temperature": "72°F", "condition": "sunny"}
}
}
]
},
format="gemini"
)