{ "test_id": "tests/integration/responses/test_tool_responses.py::test_response_non_streaming_custom_tool[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?" } ], "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-4c01a4ae8b53", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": "assistant", "tool_calls": [ { "index": 0, "id": "call_3SX4n0rUv8ulSLBhaARnQZo7", "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_eb3c3cb84d", "usage": null, "obfuscation": "kUQon5" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "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_eb3c3cb84d", "usage": null, "obfuscation": "" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": "location", "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_eb3c3cb84d", "usage": null, "obfuscation": "uIgCkzP4O89" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "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_eb3c3cb84d", "usage": null, "obfuscation": "G5jAVwMsAdTq2M" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": "San", "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_eb3c3cb84d", "usage": null, "obfuscation": "" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": " Francisco", "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_eb3c3cb84d", "usage": null, "obfuscation": "WxkJKXILl" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "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_eb3c3cb84d", "usage": null, "obfuscation": "2K" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "choices": [ { "delta": { "content": null, "function_call": null, "refusal": null, "role": null, "tool_calls": [ { "index": 0, "id": null, "function": { "arguments": " USA", "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_eb3c3cb84d", "usage": null, "obfuscation": "T09L8ZPj5wrNKx5" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "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_eb3c3cb84d", "usage": null, "obfuscation": "" } }, { "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", "__data__": { "id": "rec-4c01a4ae8b53", "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_eb3c3cb84d", "usage": null, "obfuscation": "8" } } ], "is_streaming": true } }