multi_tool_streaming_gpt-5.yaml

  1---
  2version: 2
  3interactions:
  4  - id: 0
  5    request:
  6        proto: HTTP/1.1
  7        proto_major: 1
  8        proto_minor: 1
  9        content_length: 858
 10        host: ""
 11        body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"}],"model":"gpt-5","max_completion_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"stream":true}'
 12        headers:
 13            Accept:
 14              - application/json
 15            Content-Type:
 16              - application/json
 17            User-Agent:
 18              - OpenAI/Go 2.3.0
 19        url: https://api.openai.com/v1/chat/completions
 20        method: POST
 21    response:
 22        proto: HTTP/2.0
 23        proto_major: 2
 24        proto_minor: 0
 25        content_length: -1
 26        body: |+
 27            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"finish_reason":null}],"obfuscation":"km7Grds"}
 28
 29            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_LhPyB94mYobHVZ8vmXMPXkNq","type":"function","function":{"name":"add","arguments":""}}]},"finish_reason":null}],"obfuscation":"Si4eoFcHEyKfaY"}
 30
 31            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"a\""}}]},"finish_reason":null}],"obfuscation":"b6S4Y8B7WWgc"}
 32
 33            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":": 2, "}}]},"finish_reason":null}],"obfuscation":"CL9dblOJFBp4h"}
 34
 35            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"b\": 3"}}]},"finish_reason":null}],"obfuscation":"57iKH8Ot4E"}
 36
 37            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"}"}}]},"finish_reason":null}],"obfuscation":"F"}
 38
 39            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_WIQB4Obh8PH2URd87v1AujZk","type":"function","function":{"name":"multiply","arguments":""}}]},"finish_reason":null}],"obfuscation":"reX6nET1B"}
 40
 41            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"a\""}}]},"finish_reason":null}],"obfuscation":"Rw71Xfho3jnc"}
 42
 43            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":": 2, "}}]},"finish_reason":null}],"obfuscation":"RUeTmIcp8tTUV"}
 44
 45            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\"b\": 3"}}]},"finish_reason":null}],"obfuscation":"fPhRBnL1V0"}
 46
 47            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"}"}}]},"finish_reason":null}],"obfuscation":"I"}
 48
 49            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"usage":null,"obfuscation":""}
 50
 51            data: {"id":"chatcmpl-CJ0tifk5FC2DwlB6VneFqF0Yna04m","object":"chat.completion.chunk","created":1758647718,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":190,"completion_tokens":187,"total_tokens":377,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":128,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"zsdmTK"}
 52
 53            data: [DONE]
 54
 55        headers:
 56            Content-Type:
 57              - text/event-stream; charset=utf-8
 58        status: 200 OK
 59        code: 200
 60        duration: 3.60880975s
 61  - id: 1
 62    request:
 63        proto: HTTP/1.1
 64        proto_major: 1
 65        proto_minor: 1
 66        content_length: 1289
 67        host: ""
 68        body: '{"messages":[{"content":"You are a helpful assistant. Always use both add and multiply at the same time.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"},{"tool_calls":[{"id":"call_LhPyB94mYobHVZ8vmXMPXkNq","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"add"},"type":"function"},{"id":"call_WIQB4Obh8PH2URd87v1AujZk","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"call_LhPyB94mYobHVZ8vmXMPXkNq","role":"tool"},{"content":"6","tool_call_id":"call_WIQB4Obh8PH2URd87v1AujZk","role":"tool"}],"model":"gpt-5","max_completion_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"add","strict":false,"description":"Add two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"},{"function":{"name":"multiply","strict":false,"description":"Multiply two numbers","parameters":{"properties":{"a":{"description":"first number","type":"integer"},"b":{"description":"second number","type":"integer"}},"required":["a","b"],"type":"object"}},"type":"function"}],"stream":true}'
 69        headers:
 70            Accept:
 71              - application/json
 72            Content-Type:
 73              - application/json
 74            User-Agent:
 75              - OpenAI/Go 2.3.0
 76        url: https://api.openai.com/v1/chat/completions
 77        method: POST
 78    response:
 79        proto: HTTP/2.0
 80        proto_major: 2
 81        proto_minor: 0
 82        content_length: -1
 83        body: |+
 84            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"iENZ7HCCNE"}
 85
 86            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"-"},"finish_reason":null}],"usage":null,"obfuscation":"1JHNZqUP1Ur"}
 87
 88            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" Sum"},"finish_reason":null}],"usage":null,"obfuscation":"ETUP50AE"}
 89
 90            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":":"},"finish_reason":null}],"usage":null,"obfuscation":"Ywocw0ce9eT"}
 91
 92            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" "},"finish_reason":null}],"usage":null,"obfuscation":"s1AiZmp04eP"}
 93
 94            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"5"},"finish_reason":null}],"usage":null,"obfuscation":"LEkBewXjdsy"}
 95
 96            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"\n"},"finish_reason":null}],"usage":null,"obfuscation":"trMiKw1ASG"}
 97
 98            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"-"},"finish_reason":null}],"usage":null,"obfuscation":"RpqZnOJgwiW"}
 99
100            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" Product"},"finish_reason":null}],"usage":null,"obfuscation":"ClWx"}
101
102            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":":"},"finish_reason":null}],"usage":null,"obfuscation":"lEHwJjqJFSY"}
103
104            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" "},"finish_reason":null}],"usage":null,"obfuscation":"wbSyfvDUpTl"}
105
106            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"6"},"finish_reason":null}],"usage":null,"obfuscation":"5uhwaI5x2lZ"}
107
108            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"ud67TP"}
109
110            data: {"id":"chatcmpl-CJ0tm1YFfJBJWMm9yTmRuqfImaJOd","object":"chat.completion.chunk","created":1758647722,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":262,"completion_tokens":14,"total_tokens":276,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"eipPGB3X3"}
111
112            data: [DONE]
113
114        headers:
115            Content-Type:
116              - text/event-stream; charset=utf-8
117        status: 200 OK
118        code: 200
119        duration: 958.1655ms