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: 458
 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-5","max_completion_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-CRdzCfnkaQoMYKAvfAXds0hUUaCog",
 30        "object": "chat.completion",
 31        "created": 1760704598,
 32        "model": "gpt-5-2025-08-07",
 33        "choices": [
 34          {
 35            "index": 0,
 36            "message": {
 37              "role": "assistant",
 38              "content": null,
 39              "tool_calls": [
 40                {
 41                  "id": "call_iENK0JiZIVgIwVhzXgr2vqAb",
 42                  "type": "function",
 43                  "function": {
 44                    "name": "weather",
 45                    "arguments": "{\"location\":\"Florence, Italy\"}"
 46                  }
 47                }
 48              ],
 49              "refusal": null,
 50              "annotations": []
 51            },
 52            "finish_reason": "tool_calls"
 53          }
 54        ],
 55        "usage": {
 56          "prompt_tokens": 145,
 57          "completion_tokens": 89,
 58          "total_tokens": 234,
 59          "prompt_tokens_details": {
 60            "cached_tokens": 0,
 61            "audio_tokens": 0
 62          },
 63          "completion_tokens_details": {
 64            "reasoning_tokens": 64,
 65            "audio_tokens": 0,
 66            "accepted_prediction_tokens": 0,
 67            "rejected_prediction_tokens": 0
 68          }
 69        },
 70        "service_tier": "default",
 71        "system_fingerprint": null
 72      }
 73    headers:
 74      Content-Type:
 75      - application/json
 76    status: 200 OK
 77    code: 200
 78    duration: 4.061672083s
 79- id: 1
 80  request:
 81    proto: HTTP/1.1
 82    proto_major: 1
 83    proto_minor: 1
 84    content_length: 710
 85    host: ""
 86    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence,Italy?","role":"user"},{"tool_calls":[{"id":"call_iENK0JiZIVgIwVhzXgr2vqAb","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"call_iENK0JiZIVgIwVhzXgr2vqAb","role":"tool"}],"model":"gpt-5","max_completion_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"}]}'
 87    headers:
 88      Accept:
 89      - application/json
 90      Content-Type:
 91      - application/json
 92      User-Agent:
 93      - OpenAI/Go 2.3.0
 94    url: https://api.openai.com/v1/chat/completions
 95    method: POST
 96  response:
 97    proto: HTTP/2.0
 98    proto_major: 2
 99    proto_minor: 0
100    content_length: -1
101    uncompressed: true
102    body: |
103      {
104        "id": "chatcmpl-CRdzFTi2wOwwtpFFMfez7pGHYh07c",
105        "object": "chat.completion",
106        "created": 1760704601,
107        "model": "gpt-5-2025-08-07",
108        "choices": [
109          {
110            "index": 0,
111            "message": {
112              "role": "assistant",
113              "content": "It’s currently about 40°C (104°F) in Florence, Italy. Would you like a forecast or more details (humidity, wind, etc.)?",
114              "refusal": null,
115              "annotations": []
116            },
117            "finish_reason": "stop"
118          }
119        ],
120        "usage": {
121          "prompt_tokens": 176,
122          "completion_tokens": 297,
123          "total_tokens": 473,
124          "prompt_tokens_details": {
125            "cached_tokens": 0,
126            "audio_tokens": 0
127          },
128          "completion_tokens_details": {
129            "reasoning_tokens": 256,
130            "audio_tokens": 0,
131            "accepted_prediction_tokens": 0,
132            "rejected_prediction_tokens": 0
133          }
134        },
135        "service_tier": "default",
136        "system_fingerprint": null
137      }
138    headers:
139      Content-Type:
140      - application/json
141    status: 200 OK
142    code: 200
143    duration: 6.021670833s