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: 533
 10    host: ""
 11    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"moonshotai/Kimi-K2-Instruct-0905:groq","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      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
 19    url: https://router.huggingface.co/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-dc722949-2c46-4d4b-b794-093c0ac92ec6","object":"chat.completion.chunk","created":1773347274,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_241bc7119c","choices":[{"index":0,"delta":{"role":"assistant","content":null},"logprobs":null,"finish_reason":null}],"x_groq":{"id":"req_01kkhvqzthf77v5hnbmntxx7t5","seed":1841653034}}
 28
 29      data: {"id":"chatcmpl-dc722949-2c46-4d4b-b794-093c0ac92ec6","object":"chat.completion.chunk","created":1773347274,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_241bc7119c","choices":[{"index":0,"delta":{"tool_calls":[{"id":"functions.weather:0","type":"function","function":{"name":"weather","arguments":"{\"location\":\"Florence,Italy\"}"},"index":0}]},"logprobs":null,"finish_reason":null}]}
 30
 31      data: {"id":"chatcmpl-dc722949-2c46-4d4b-b794-093c0ac92ec6","object":"chat.completion.chunk","created":1773347274,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_241bc7119c","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"tool_calls"}],"x_groq":{"id":"req_01kkhvqzthf77v5hnbmntxx7t5","usage":{"queue_time":0.072077716,"prompt_tokens":93,"prompt_time":0.024482456,"completion_tokens":21,"completion_time":0.04188989,"total_tokens":114,"total_time":0.066372346}},"usage":{"queue_time":0.072077716,"prompt_tokens":93,"prompt_time":0.024482456,"completion_tokens":21,"completion_time":0.04188989,"total_tokens":114,"total_time":0.066372346}}
 32
 33      data: {"id":"chatcmpl-dc722949-2c46-4d4b-b794-093c0ac92ec6","object":"chat.completion.chunk","created":1773347274,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_241bc7119c","choices":[],"usage":{"queue_time":0.072077716,"prompt_tokens":93,"prompt_time":0.024482456,"completion_tokens":21,"completion_time":0.04188989,"total_tokens":114,"total_time":0.066372346},"service_tier":"on_demand"}
 34
 35      data: [DONE]
 36
 37    headers:
 38      Content-Type:
 39      - text/event-stream
 40    status: 200 OK
 41    code: 200
 42    duration: 348.881541ms
 43- id: 1
 44  request:
 45    proto: HTTP/1.1
 46    proto_major: 1
 47    proto_minor: 1
 48    content_length: 764
 49    host: ""
 50    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"functions.weather:0","function":{"arguments":"{\"location\":\"Florence,Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"functions.weather:0","role":"tool"}],"model":"moonshotai/Kimi-K2-Instruct-0905:groq","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}'
 51    headers:
 52      Accept:
 53      - application/json
 54      Content-Type:
 55      - application/json
 56      User-Agent:
 57      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
 58    url: https://router.huggingface.co/v1/chat/completions
 59    method: POST
 60  response:
 61    proto: HTTP/2.0
 62    proto_major: 2
 63    proto_minor: 0
 64    content_length: -1
 65    body: |+
 66      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"x_groq":{"id":"req_01kkhvr05meycts9cwfnx6wcyt","seed":1854762339}}
 67
 68      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":"Right"},"logprobs":null,"finish_reason":null}]}
 69
 70      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" now"},"logprobs":null,"finish_reason":null}]}
 71
 72      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" it"},"logprobs":null,"finish_reason":null}]}
 73
 74      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":"’s"},"logprobs":null,"finish_reason":null}]}
 75
 76      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]}
 77
 78      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" hot"},"logprobs":null,"finish_reason":null}]}
 79
 80      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" "},"logprobs":null,"finish_reason":null}]}
 81
 82      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":"40"},"logprobs":null,"finish_reason":null}]}
 83
 84      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" °"},"logprobs":null,"finish_reason":null}]}
 85
 86      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":"C"},"logprobs":null,"finish_reason":null}]}
 87
 88      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}]}
 89
 90      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" Florence"},"logprobs":null,"finish_reason":null}]}
 91
 92      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]}
 93
 94      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":" Italy"},"logprobs":null,"finish_reason":null}]}
 95
 96      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
 97
 98      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"x_groq":{"id":"req_01kkhvr05meycts9cwfnx6wcyt","usage":{"queue_time":0.0656932,"prompt_tokens":132,"prompt_time":0.019550779,"completion_tokens":16,"completion_time":0.051223756,"total_tokens":148,"total_time":0.070774535}},"usage":{"queue_time":0.0656932,"prompt_tokens":132,"prompt_time":0.019550779,"completion_tokens":16,"completion_time":0.051223756,"total_tokens":148,"total_time":0.070774535}}
 99
100      data: {"id":"chatcmpl-4c1bad0c-632f-4d80-b546-0a80412b8277","object":"chat.completion.chunk","created":1773347275,"model":"moonshotai/kimi-k2-instruct-0905","system_fingerprint":"fp_00c37775b7","choices":[],"usage":{"queue_time":0.0656932,"prompt_tokens":132,"prompt_time":0.019550779,"completion_tokens":16,"completion_time":0.051223756,"total_tokens":148,"total_time":0.070774535},"service_tier":"on_demand"}
101
102      data: [DONE]
103
104    headers:
105      Content-Type:
106      - text/event-stream
107    status: 200 OK
108    code: 200
109    duration: 304.518292ms