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: 859
 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":"qwen-3-coder-480b","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.7.1
 19    url: https://api.cerebras.ai/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-5c5013db-58c5-4c0b-9e7e-10eccacdc535","choices":[{"delta":{"role":"assistant"},"index":0}],"created":1761231236,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 28
 29      data: {"id":"chatcmpl-5c5013db-58c5-4c0b-9e7e-10eccacdc535","choices":[{"delta":{"tool_calls":[{"function":{"name":"add","arguments":"{\"a\": 2, \"b\": 3}"},"type":"function","id":"ab8048658","index":0},{"function":{"name":"multiply","arguments":"{\"a\": 2, \"b\": 3}"},"type":"function","id":"b249e0b3f","index":1}]},"index":0}],"created":1761231236,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 30
 31      data: {"id":"chatcmpl-5c5013db-58c5-4c0b-9e7e-10eccacdc535","choices":[{"delta":{},"finish_reason":"tool_calls","index":0}],"created":1761231236,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk","usage":{"prompt_tokens":408,"completion_tokens":59,"total_tokens":467,"prompt_tokens_details":{"cached_tokens":0}},"time_info":{"queue_time":0.000163361,"prompt_time":0.014535933,"completion_time":0.030461228,"total_time":0.046776533126831055,"created":1761231236.3815937}}
 32
 33    headers:
 34      Content-Type:
 35      - text/event-stream; charset=utf-8
 36    status: 200 OK
 37    code: 200
 38    duration: 415.440041ms
 39- id: 1
 40  request:
 41    proto: HTTP/1.1
 42    proto_major: 1
 43    proto_minor: 1
 44    content_length: 1210
 45    host: ""
 46    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":"ab8048658","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"add"},"type":"function"},{"id":"b249e0b3f","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"ab8048658","role":"tool"},{"content":"6","tool_call_id":"b249e0b3f","role":"tool"}],"model":"qwen-3-coder-480b","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}'
 47    headers:
 48      Accept:
 49      - application/json
 50      Content-Type:
 51      - application/json
 52      User-Agent:
 53      - OpenAI/Go 2.7.1
 54    url: https://api.cerebras.ai/v1/chat/completions
 55    method: POST
 56  response:
 57    proto: HTTP/2.0
 58    proto_major: 2
 59    proto_minor: 0
 60    content_length: -1
 61    body: |+
 62      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"role":"assistant"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 63
 64      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"The"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 65
 66      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" sum"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 67
 68      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" of"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 69
 70      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" "},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 71
 72      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"2"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 73
 74      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" and"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 75
 76      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" "},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 77
 78      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"3"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 79
 80      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" is"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 81
 82      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" "},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 83
 84      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"5"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 85
 86      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":","},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 87
 88      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" and"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 89
 90      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" the"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 91
 92      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" product"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 93
 94      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" of"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 95
 96      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" "},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 97
 98      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"2"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
 99
100      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" and"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
101
102      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" "},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
103
104      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"3"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
105
106      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" is"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
107
108      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":" "},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
109
110      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"6"},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
111
112      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{"content":"."},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
113
114      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{},"index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
115
116      data: {"id":"chatcmpl-3de2c971-cc92-43b7-91b0-caf8543a7819","choices":[{"delta":{},"finish_reason":"stop","index":0}],"created":1761231234,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk","usage":{"prompt_tokens":488,"completion_tokens":26,"total_tokens":514,"prompt_tokens_details":{"cached_tokens":0}},"time_info":{"queue_time":0.00009602,"prompt_time":0.026647695,"completion_time":0.014833488,"total_time":0.04320025444030762,"created":1761231234.2838135}}
117
118    headers:
119      Content-Type:
120      - text/event-stream; charset=utf-8
121    status: 200 OK
122    code: 200
123    duration: 410.382375ms