multi_tool_streaming_gpt-4o.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-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"rZrKTLuaM3M"}
 28
 29            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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_we49ixAiJiXtgOjX53hUNsWh","type":"function","function":{"name":"add","arguments":""}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"xC"}
 30
 31            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"s"}
 34
 35            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"86lv6E0lmuGNjz"}
 36
 37            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"FrLtX"}
 38
 39            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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_eD7lMai9kbcUCwMSMVjUlZ3T","type":"function","function":{"name":"multiply","arguments":""}}]},"logprobs":null,"finish_reason":null}],"obfuscation":"uMHWC2JgrOs0S"}
 40
 41            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"8"}
 44
 45            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"1Wrmr2yk0U8VVN"}
 46
 47            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"1QpiI"}
 48
 49            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"qrCP"}
 50
 51            data: {"id":"chatcmpl-CJ0t8wpMovl963ZFdkn54mrweOWnn","object":"chat.completion.chunk","created":1758647682,"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":"iRO6qrkatl8EM"}
 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: 1.6431095s
 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_we49ixAiJiXtgOjX53hUNsWh","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"add"},"type":"function"},{"id":"call_eD7lMai9kbcUCwMSMVjUlZ3T","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"call_we49ixAiJiXtgOjX53hUNsWh","role":"tool"},{"content":"6","tool_call_id":"call_eD7lMai9kbcUCwMSMVjUlZ3T","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-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"Q6cgqEBBHG47xr"}
 85
 86            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"tDDnpSDUWlOAN"}
 87
 88            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" sum"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uZQ5HQSylUmX"}
 89
 90            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"4iQOx4PIHKUll"}
 91
 92            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"X3jizujF5N1K9Cj"}
 93
 94            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"nnQrkgccpAEyP4n"}
 95
 96            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"ubxgZ8npiaYK"}
 97
 98            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"9YnQXtk9mN2BdU6"}
 99
100            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"cxn4wW9PzMS02GJ"}
101
102            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"IqrTnNBYUiMh7"}
103
104            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"crEWZx6ynbLeGkW"}
105
106            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"npVKIA566rLTUDY"}
107
108            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"ATvUOqJvYgwsgQk"}
109
110            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"HHxj3xqqlVpg"}
111
112            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" their"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RQTmrDll3z"}
113
114            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[{"index":0,"delta":{"content":" product"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cOGFY7MT"}
115
116            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"YoCUHSS2S1S4G"}
117
118            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"gSBGglIgYWDCdBs"}
119
120            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"mVHofL9YlGWejdX"}
121
122            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"bSgBOrK8wRz3t7f"}
123
124            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"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":"ILFnxrBQUe"}
125
126            data: {"id":"chatcmpl-CJ0t9eLmNGVS5IIIEICQsRIkbTlQ3","object":"chat.completion.chunk","created":1758647683,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_cbf1785567","choices":[],"usage":{"prompt_tokens":172,"completion_tokens":20,"total_tokens":192,"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":"fUbCi0VmSyOJ6"}
127
128            data: [DONE]
129
130        headers:
131            Content-Type:
132              - text/event-stream; charset=utf-8
133        status: 200 OK
134        code: 200
135        duration: 596.137583ms