{ "test_id": "tests/integration/responses/test_tool_responses.py::test_response_function_call_ordering_1[openai_client-txt=openai/gpt-4o-sf_weather]", "request": { "method": "POST", "url": "https://api.openai.com/v1/v1/chat/completions", "headers": {}, "body": { "model": "gpt-4o", "messages": [ { "role": "user", "content": "What's the weather like in San Francisco?" }, { "role": "assistant", "content": "", "tool_calls": [ { "index": 0, "id": "call_y9t6QUm1LFD9RntYK4qdjiNH", "type": "function", "function": { "name": "get_weather", "arguments": "{\"location\":\"San Francisco, United States\"}" } } ] }, { "role": "tool", "tool_call_id": "call_y9t6QUm1LFD9RntYK4qdjiNH", "content": "It is raining." } ], "stream": true, "tools": [ { "type": "function", "function": { "type": "function", "name": "get_weather", "description": "Get current temperature for a given location.", "parameters": { "additionalProperties": false, "properties": { "location": { "description": "City and country e.g. Bogot\u00e1, Colombia", "type": "string" } }, "required": [ "location" ], "type": "object" }, "strict": null } } ] }, "endpoint": "/v1/chat/completions", "model": "gpt-4o" }, "response": { "body": [ { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": "", "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_eb3c3cb84d", "usage": null, "obfuscation": "BWZHBYKEptp" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": "The", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "YgZmVAXduN" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": " weather", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "rjRtb" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": " in", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "gezAEYhVdX" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": " San", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "g3vatAfer" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": " Francisco", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "TtN" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": " is", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "zK8kwR9DCM" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": " currently", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "V2H" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": " raining", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "K94nc" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": ".", "function_call": null, "refusal": null, "role": null, "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_eb3c3cb84d", "usage": null, "obfuscation": "I2GbZ25olkNT" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-65143f9bc37f", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": null }, "finish_reason": "stop", "index": 0, "logprobs": null } ], "created": 0, "model": "gpt-4o-2024-08-06", "object": "chat.completion.chunk", "service_tier": "default", "system_fingerprint": "fp_eb3c3cb84d", "usage": null, "obfuscation": "UWl3lmA" } } ], "is_streaming": true } }