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: 507
 10    host: ""
 11    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"gpt-4o-mini","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"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-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_DETfkgrMGPDgJzwS62NSuRPa","type":"function","function":{"name":"weather","arguments":""}}],"refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LX9odVHb"}
 28
 29      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"c1yYSDZaI1UDYV"}
 30
 31      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"location"}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZToBjCwft"}
 32
 33      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SXENj4krMldO"}
 34
 35      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"Flor"}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"O4dIvyXTiV9nE"}
 36
 37      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"ence"}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CHahf3pIqTc5c"}
 38
 39      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":""}
 40
 41      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" Italy"}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RCwjNsUKEVK"}
 42
 43      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dpgaKu5zTDw8CZ"}
 44
 45      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"usage":null,"obfuscation":"cYYcBlfkMvDVd07"}
 46
 47      data: {"id":"chatcmpl-CK0XH1YEf20Nk6A5GRZVFbdBy8NvS","object":"chat.completion.chunk","created":1758884655,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[],"usage":{"prompt_tokens":61,"completion_tokens":16,"total_tokens":77,"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":"aX8SEVMo9D"}
 48
 49      data: [DONE]
 50
 51    headers:
 52      Content-Type:
 53      - text/event-stream; charset=utf-8
 54    status: 200 OK
 55    code: 200
 56    duration: 713.193958ms
 57- id: 1
 58  request:
 59    proto: HTTP/1.1
 60    proto_major: 1
 61    proto_minor: 1
 62    content_length: 759
 63    host: ""
 64    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"call_DETfkgrMGPDgJzwS62NSuRPa","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"call_DETfkgrMGPDgJzwS62NSuRPa","role":"tool"}],"model":"gpt-4o-mini","max_tokens":4000,"stream_options":{"include_usage":true},"tool_choice":"auto","tools":[{"function":{"name":"weather","strict":false,"description":"Get weather information for a location","parameters":{"properties":{"location":{"description":"the city","type":"string"}},"required":["location"],"type":"object"}},"type":"function"}],"stream":true}'
 65    headers:
 66      Accept:
 67      - application/json
 68      Content-Type:
 69      - application/json
 70      User-Agent:
 71      - OpenAI/Go 2.3.0
 72    url: https://api.openai.com/v1/chat/completions
 73    method: POST
 74  response:
 75    proto: HTTP/2.0
 76    proto_major: 2
 77    proto_minor: 0
 78    content_length: -1
 79    body: |+
 80      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Nld6m4L8f"}
 81
 82      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":"The"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Tt22VYUt"}
 83
 84      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":" current"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HSH"}
 85
 86      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":" temperature"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YVBXBDODyk7cIJS"}
 87
 88      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0owI6QAQ"}
 89
 90      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":" Florence"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"A8"}
 91
 92      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Koc2bQX8BA"}
 93
 94      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":" Italy"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MN5Jc"}
 95
 96      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MmkAFvX2"}
 97
 98      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"EdhYi7wxQ1"}
 99
100      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":"40"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"AQOB4uaLd"}
101
102      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":"°C"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"u3tu0x3Af"}
103
104      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RpzcBAg3HO"}
105
106      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"NfRGq"}
107
108      data: {"id":"chatcmpl-CK0XIUwrhgZGexhOP9ECHm2D0DZLr","object":"chat.completion.chunk","created":1758884656,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_560af6e559","choices":[],"usage":{"prompt_tokens":86,"completion_tokens":13,"total_tokens":99,"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":"QW8EXr68zX"}
109
110      data: [DONE]
111
112    headers:
113      Content-Type:
114      - text/event-stream; charset=utf-8
115    status: 200 OK
116    code: 200
117    duration: 631.400833ms