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: 874
 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":"moonshotai/kimi-k2-instruct-0905","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.groq.com/openai/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-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"x_groq":{"id":"req_01k62v6abtexz9x4ehz7ept3nt"}}
 28
 29      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":"I'll"},"logprobs":null,"finish_reason":null}]}
 30
 31      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" help"},"logprobs":null,"finish_reason":null}]}
 32
 33      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" you"},"logprobs":null,"finish_reason":null}]}
 34
 35      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" add"},"logprobs":null,"finish_reason":null}]}
 36
 37      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}]}
 38
 39      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" multiply"},"logprobs":null,"finish_reason":null}]}
 40
 41      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" the"},"logprobs":null,"finish_reason":null}]}
 42
 43      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" numbers"},"logprobs":null,"finish_reason":null}]}
 44
 45      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
 46
 47      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}]}
 48
 49      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" and"},"logprobs":null,"finish_reason":null}]}
 50
 51      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
 52
 53      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}]}
 54
 55      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
 56
 57      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"tool_calls":[{"id":"functions.add:0","type":"function","function":{"name":"add","arguments":"{\"a\":2,\"b\":3}"},"index":0}]},"logprobs":null,"finish_reason":null}]}
 58
 59      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{"tool_calls":[{"id":"functions.multiply:1","type":"function","function":{"name":"multiply","arguments":"{\"a\":2,\"b\":3}"},"index":1}]},"logprobs":null,"finish_reason":null}]}
 60
 61      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"x_groq":{"id":"req_01k62v6abtexz9x4ehz7ept3nt","usage":{"queue_time":0.035435906,"prompt_tokens":207,"prompt_time":0.021306235,"completion_tokens":55,"completion_time":0.193797381,"total_tokens":262,"total_time":0.215103616}},"usage":{"queue_time":0.035435906,"prompt_tokens":207,"prompt_time":0.021306235,"completion_tokens":55,"completion_time":0.193797381,"total_tokens":262,"total_time":0.215103616}}
 62
 63      data: {"id":"chatcmpl-eaa5320c-c0d2-4f0b-b2c1-378d7e65e871","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_6e6ff3688b","choices":[],"usage":{"queue_time":0.035435906,"prompt_tokens":207,"prompt_time":0.021306235,"completion_tokens":55,"completion_time":0.193797381,"total_tokens":262,"total_time":0.215103616},"service_tier":"on_demand"}
 64
 65      data: [DONE]
 66
 67    headers:
 68      Content-Type:
 69      - text/event-stream
 70    status: 200 OK
 71    code: 200
 72    duration: 113.669917ms
 73- id: 1
 74  request:
 75    proto: HTTP/1.1
 76    proto_major: 1
 77    proto_minor: 1
 78    content_length: 1317
 79    host: ""
 80    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"},{"content":"I''ll help you add and multiply the numbers 2 and 3.","tool_calls":[{"id":"functions.add:0","function":{"arguments":"{\"a\":2,\"b\":3}","name":"add"},"type":"function"},{"id":"functions.multiply:1","function":{"arguments":"{\"a\":2,\"b\":3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"functions.add:0","role":"tool"},{"content":"6","tool_call_id":"functions.multiply:1","role":"tool"}],"model":"moonshotai/kimi-k2-instruct-0905","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}'
 81    headers:
 82      Accept:
 83      - application/json
 84      Content-Type:
 85      - application/json
 86      User-Agent:
 87      - OpenAI/Go 2.3.0
 88    url: https://api.groq.com/openai/v1/chat/completions
 89    method: POST
 90  response:
 91    proto: HTTP/2.0
 92    proto_major: 2
 93    proto_minor: 0
 94    content_length: -1
 95    body: |+
 96      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"x_groq":{"id":"req_01k62v6anceen846x2tt27aefk"}}
 97
 98      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"The"},"logprobs":null,"finish_reason":null}]}
 99
100      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" results"},"logprobs":null,"finish_reason":null}]}
101
102      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" are"},"logprobs":null,"finish_reason":null}]}
103
104      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":":\n"},"logprobs":null,"finish_reason":null}]}
105
106      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"-"},"logprobs":null,"finish_reason":null}]}
107
108      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" Addition"},"logprobs":null,"finish_reason":null}]}
109
110      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}]}
111
112      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
113
114      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}]}
115
116      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" +"},"logprobs":null,"finish_reason":null}]}
117
118      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
119
120      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}]}
121
122      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" ="},"logprobs":null,"finish_reason":null}]}
123
124      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
125
126      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}]}
127
128      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"\n"},"logprobs":null,"finish_reason":null}]}
129
130      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"-"},"logprobs":null,"finish_reason":null}]}
131
132      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" Multi"},"logprobs":null,"finish_reason":null}]}
133
134      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"plication"},"logprobs":null,"finish_reason":null}]}
135
136      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":":"},"logprobs":null,"finish_reason":null}]}
137
138      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
139
140      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}]}
141
142      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" ×"},"logprobs":null,"finish_reason":null}]}
143
144      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
145
146      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}]}
147
148      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" ="},"logprobs":null,"finish_reason":null}]}
149
150      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
151
152      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{"content":"6"},"logprobs":null,"finish_reason":null}]}
153
154      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"x_groq":{"id":"req_01k62v6anceen846x2tt27aefk","usage":{"queue_time":0.163143838,"prompt_tokens":289,"prompt_time":0.025574857,"completion_tokens":29,"completion_time":0.055943648,"total_tokens":318,"total_time":0.081518505}},"usage":{"queue_time":0.163143838,"prompt_tokens":289,"prompt_time":0.025574857,"completion_tokens":29,"completion_time":0.055943648,"total_tokens":318,"total_time":0.081518505}}
155
156      data: {"id":"chatcmpl-641d8aab-9499-4610-9dde-be5d0504ff7d","object":"chat.completion.chunk","created":1758884735,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_b8565bb333","choices":[],"usage":{"queue_time":0.163143838,"prompt_tokens":289,"prompt_time":0.025574857,"completion_tokens":29,"completion_time":0.055943648,"total_tokens":318,"total_time":0.081518505},"service_tier":"on_demand"}
157
158      data: [DONE]
159
160    headers:
161      Content-Type:
162      - text/event-stream
163    status: 200 OK
164    code: 200
165    duration: 244.900083ms