{ "test_id": "tests/integration/responses/test_tool_responses.py::test_max_tool_calls_with_function_tools[openai_client-txt=openai/gpt-4o]", "request": { "method": "POST", "url": "https://api.openai.com/v1/v1/chat/completions", "headers": {}, "body": { "model": "gpt-4o", "messages": [ { "role": "user", "content": "Can you tell me the weather in Paris and the current time?" } ], "stream": true, "stream_options": { "include_usage": true }, "tools": [ { "type": "function", "function": { "type": "function", "name": "get_weather", "description": "Get weather information for a specified location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city name (e.g., 'New York', 'London')" } } }, "strict": null } }, { "type": "function", "function": { "type": "function", "name": "get_time", "description": "Get current time for a specified location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city name (e.g., 'New York', 'London')" } } }, "strict": null } } ] }, "endpoint": "/v1/chat/completions", "model": "gpt-4o" }, "response": { "body": [ { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": "assistant", "tool_calls": null }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "QmTXstGvpa8" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": "call_HJMoLtHXfCzhlMQOfqIKt0n3", "function": { "arguments": "", "name": "get_weather" }, "type": "function" } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "iFjmkK23KL" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": "{\"lo", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "7" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": "catio", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "L" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": "n\": \"P", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "THa6gWbrWhVmZ6" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": "aris", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "eL" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": "\"}", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "jng" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 1, "id": "call_vGKvTKZM7aALMaUw3Jas7lRg", "function": { "arguments": "", "name": "get_time" }, "type": "function" } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "LSailgMcgSl54" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 1, "id": null, "function": { "arguments": "{\"lo", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "z" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 1, "id": null, "function": { "arguments": "catio", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "4" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 1, "id": null, "function": { "arguments": "n\": \"P", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "0engr6vRvqXTEP" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 1, "id": null, "function": { "arguments": "aris", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "Pe" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 1, "id": null, "function": { "arguments": "\"}", "name": null }, "type": null } ] }, "finish_reason": null, "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "LU9" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": "tool_calls", "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": null, "obfuscation": "kD7d" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-463ab0e2f291", "choices": [], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_b1442291a8", "usage": { "completion_tokens": 44, "prompt_tokens": 110, "total_tokens": 154, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 0 } }, "obfuscation": "R4ICoxqTqj7ZY" } } ], "is_streaming": true }, "id_normalization_mapping": {} }