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: 453
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,"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.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 uncompressed: true
27 body: |
28 {
29 "id": "chatcmpl-CRdyuS0DEOR3GgR76SLPKqPiwPIAt",
30 "object": "chat.completion",
31 "created": 1760704580,
32 "model": "gpt-4o-mini-2024-07-18",
33 "choices": [
34 {
35 "index": 0,
36 "message": {
37 "role": "assistant",
38 "content": null,
39 "tool_calls": [
40 {
41 "id": "call_2uH56RhZZbC8djqCn7cxRyKl",
42 "type": "function",
43 "function": {
44 "name": "weather",
45 "arguments": "{\"location\":\"Florence, Italy\"}"
46 }
47 }
48 ],
49 "refusal": null,
50 "annotations": []
51 },
52 "logprobs": null,
53 "finish_reason": "tool_calls"
54 }
55 ],
56 "usage": {
57 "prompt_tokens": 61,
58 "completion_tokens": 16,
59 "total_tokens": 77,
60 "prompt_tokens_details": {
61 "cached_tokens": 0,
62 "audio_tokens": 0
63 },
64 "completion_tokens_details": {
65 "reasoning_tokens": 0,
66 "audio_tokens": 0,
67 "accepted_prediction_tokens": 0,
68 "rejected_prediction_tokens": 0
69 }
70 },
71 "service_tier": "default",
72 "system_fingerprint": "fp_560af6e559"
73 }
74 headers:
75 Content-Type:
76 - application/json
77 status: 200 OK
78 code: 200
79 duration: 1.057664375s
80- id: 1
81 request:
82 proto: HTTP/1.1
83 proto_major: 1
84 proto_minor: 1
85 content_length: 705
86 host: ""
87 body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"call_2uH56RhZZbC8djqCn7cxRyKl","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"call_2uH56RhZZbC8djqCn7cxRyKl","role":"tool"}],"model":"gpt-4o-mini","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"}]}'
88 headers:
89 Accept:
90 - application/json
91 Content-Type:
92 - application/json
93 User-Agent:
94 - OpenAI/Go 2.3.0
95 url: https://api.openai.com/v1/chat/completions
96 method: POST
97 response:
98 proto: HTTP/2.0
99 proto_major: 2
100 proto_minor: 0
101 content_length: -1
102 uncompressed: true
103 body: |
104 {
105 "id": "chatcmpl-CRdyvMVFPOfa2G1IC80Js9jy1xIE0",
106 "object": "chat.completion",
107 "created": 1760704581,
108 "model": "gpt-4o-mini-2024-07-18",
109 "choices": [
110 {
111 "index": 0,
112 "message": {
113 "role": "assistant",
114 "content": "The weather in Florence, Italy is currently 40°C.",
115 "refusal": null,
116 "annotations": []
117 },
118 "logprobs": null,
119 "finish_reason": "stop"
120 }
121 ],
122 "usage": {
123 "prompt_tokens": 86,
124 "completion_tokens": 13,
125 "total_tokens": 99,
126 "prompt_tokens_details": {
127 "cached_tokens": 0,
128 "audio_tokens": 0
129 },
130 "completion_tokens_details": {
131 "reasoning_tokens": 0,
132 "audio_tokens": 0,
133 "accepted_prediction_tokens": 0,
134 "rejected_prediction_tokens": 0
135 }
136 },
137 "service_tier": "default",
138 "system_fingerprint": "fp_560af6e559"
139 }
140 headers:
141 Content-Type:
142 - application/json
143 status: 200 OK
144 code: 200
145 duration: 933.192292ms