multi_tool_streaming.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: 848
 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-4o","max_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-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}],"obfuscation":"qnpNwYTQFp4"}
 28
 29      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_MBriMTSHw1UFtzQAduPP0Mkj","type":"function","function":{"name":"add","arguments":""}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"73"}
 30
 31      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"a\""}}]},"logprobs":null,"finish_reason":null}],"obfuscation":""}
 32
 33      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":": 2, "}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"t"}
 34
 35      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"b\": 3"}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"CrvdpBgVuwx3Xz"}
 36
 37      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"2INCr"}
 38
 39      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"id":"call_7sVj20JsN3VYpXv8pZuLDruY","type":"function","function":{"name":"multiply","arguments":""}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"4mr5kRbqRoraJ"}
 40
 41      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"{\"a\""}}]},"logprobs":null,"finish_reason":null}],"obfuscation":""}
 42
 43      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":": 2, "}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"0"}
 44
 45      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"\"b\": 3"}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"fxhC40qt4dPvrJ"}
 46
 47      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","usage":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":1,"function":{"arguments":"}"}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"xjieU"}
 48
 49      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null,"obfuscation":"fYPH"}
 50
 51      data: {"id":"chatcmpl-CK0XBiHwsrgUyuIOsQJ7L2KjpG0pb","object":"chat.completion.chunk","created":1758884649,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":106,"completion_tokens":50,"total_tokens":156,"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":"xSLkv2SDLIEKV"}
 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: 948.292334ms
 61- id: 1
 62  request:
 63    proto: HTTP/1.1
 64    proto_major: 1
 65    proto_minor: 1
 66    content_length: 1279
 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_MBriMTSHw1UFtzQAduPP0Mkj","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"add"},"type":"function"},{"id":"call_7sVj20JsN3VYpXv8pZuLDruY","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"call_MBriMTSHw1UFtzQAduPP0Mkj","role":"tool"},{"content":"6","tool_call_id":"call_7sVj20JsN3VYpXv8pZuLDruY","role":"tool"}],"model":"gpt-4o","max_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-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AGSy93IAj0a02O"}
 85
 86      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"The"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YafdRYS6Y8xr5"}
 87
 88      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" result"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DfNQXI6we"}
 89
 90      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" of"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tjH8MrKJEvpSy"}
 91
 92      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" adding"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6LElZJQti"}
 93
 94      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GXSHAnQ8c1MXZJO"}
 95
 96      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jGiuoFFj3Ql1qxj"}
 97
 98      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vWIQaxcCC34T"}
 99
100      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tQZ1UcjpXfJRf5y"}
101
102      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mKOnHcppv3V8BJw"}
103
104      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"UXUFUQRNGDTnN"}
105
106      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Isx3r2cP6TT2VDr"}
107
108      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dbo2v9t3zNKRHep"}
109
110      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AkuDqKy9dcmYhVx"}
111
112      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"lrljFna0k8gx"}
113
114      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"l6VR83Jozfpv"}
115
116      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" result"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XuxWbaPzE"}
117
118      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" of"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KsWb9aMhgBdLH"}
119
120      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" multiplying"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gxEq"}
121
122      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DXVsBeOAYIUn8Mi"}
123
124      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qXW42N6A9MpXRyw"}
125
126      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QsYrBzSTafoA"}
127
128      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XW40Jw1wdM27Q3x"}
129
130      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Z9abDXTP8bgDoMZ"}
131
132      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uazMqBAe00fKm"}
133
134      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Zr7IF7wIzJEIJy4"}
135
136      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"6"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WfvcRuzh2fbox54"}
137
138      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"evqJsK2KqP7rqLN"}
139
140      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"6omC0sTA4o"}
141
142      data: {"id":"chatcmpl-CK0XC8ADYjWGumKgPucuZfGDaWNiZ","object":"chat.completion.chunk","created":1758884650,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":172,"completion_tokens":28,"total_tokens":200,"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":"yPHbD0dFcRX5l"}
143
144      data: [DONE]
145
146    headers:
147      Content-Type:
148      - text/event-stream; charset=utf-8
149    status: 200 OK
150    code: 200
151    duration: 932.741083ms