tool.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: 466
10    host: ""
11    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"}],"model":"zai-org/GLM-4.6:cerebras","max_tokens":4000,"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"}]}'
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://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: '{"id":"chatcmpl-9ed5d57c-2570-4ccd-8a72-6f22c8577e98","choices":[{"finish_reason":"tool_calls","index":0,"message":{"content":"\nI''ll get the weather information for Florence, Italy for you.\n","reasoning":"The user is asking for weather information for Florence, Italy. I need to use the weather function with the location parameter. The user specified \"Florence,Italy\" which I should use exactly as provided, or I could use just \"Florence\" since that''s the city name. Let me check the function parameters - it requires a \"location\" parameter which is described as \"the city\". I think \"Florence\" would be sufficient, but since they specifically included \"Italy\" I should probably use \"Florence,Italy\" to be more precise.","tool_calls":[{"id":"17412c140","type":"function","function":{"name":"weather","arguments":"{\"location\": \"Florence,Italy\"}"}}],"role":"assistant"}}],"created":1762855222,"model":"zai-glm-4.6","system_fingerprint":"fp_b78e4418d824cdcd64e8","object":"chat.completion","usage":{"total_tokens":331,"completion_tokens":144,"prompt_tokens":187},"time_info":{"queue_time":0.005854158,"prompt_time":0.008443714,"completion_time":0.295474428,"total_time":0.3114504814147949,"created":1762855222.3435056}}'
27    headers:
28      Content-Type:
29      - application/json
30    status: 200 OK
31    code: 200
32    duration: 688.961166ms
33- id: 1
34  request:
35    proto: HTTP/1.1
36    proto_major: 1
37    proto_minor: 1
38    content_length: 756
39    host: ""
40    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"content":"\nI''ll get the weather information for Florence, Italy for you.\n","tool_calls":[{"id":"17412c140","function":{"arguments":"{\"location\": \"Florence,Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"17412c140","role":"tool"}],"model":"zai-org/GLM-4.6:cerebras","max_tokens":4000,"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"}]}'
41    headers:
42      Accept:
43      - application/json
44      Content-Type:
45      - application/json
46      User-Agent:
47      - OpenAI/Go 2.7.1
48    url: https://router.huggingface.co/v1/chat/completions
49    method: POST
50  response:
51    proto: HTTP/2.0
52    proto_major: 2
53    proto_minor: 0
54    content_length: -1
55    body: '{"id":"chatcmpl-6e9e46c1-c111-4fc0-8648-8dffcbf32a72","choices":[{"finish_reason":"stop","index":0,"message":{"content":"\nThe weather in Florence, Italy is currently 40°C (which is quite hot - about 104°F). This is very warm weather, so if you''re planning to be outdoors there, you''ll want to stay hydrated and seek shade when possible.","role":"assistant"}}],"created":1762855242,"model":"zai-glm-4.6","system_fingerprint":"fp_b78e4418d824cdcd64e8","object":"chat.completion","usage":{"total_tokens":282,"completion_tokens":54,"prompt_tokens":228},"time_info":{"queue_time":0.004272864,"prompt_time":0.004543828,"completion_time":0.094835176,"total_time":0.105194091796875,"created":1762855242.5629983}}'
56    headers:
57      Content-Type:
58      - application/json
59    status: 200 OK
60    code: 200
61    duration: 20.019286708s