multi_tool_gpt-5.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: 821
 10        host: ""
 11        body: '{"messages":[{"content":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"}],"model":"gpt-5","max_completion_tokens":4000,"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"}]}'
 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-CJHNWTrpQnOjtZob48FeSHWZTT8J8",
 30              "object": "chat.completion",
 31              "created": 1758711070,
 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_ucYrrss6ETc3YnQdA7grAXuZ",
 42                        "type": "function",
 43                        "function": {
 44                          "name": "add",
 45                          "arguments": "{\"a\": 2, \"b\": 3}"
 46                        }
 47                      },
 48                      {
 49                        "id": "call_KZuPmn3DhLp34eU3WPV6d2BC",
 50                        "type": "function",
 51                        "function": {
 52                          "name": "multiply",
 53                          "arguments": "{\"a\": 2, \"b\": 3}"
 54                        }
 55                      }
 56                    ],
 57                    "refusal": null,
 58                    "annotations": []
 59                  },
 60                  "finish_reason": "tool_calls"
 61                }
 62              ],
 63              "usage": {
 64                "prompt_tokens": 194,
 65                "completion_tokens": 251,
 66                "total_tokens": 445,
 67                "prompt_tokens_details": {
 68                  "cached_tokens": 0,
 69                  "audio_tokens": 0
 70                },
 71                "completion_tokens_details": {
 72                  "reasoning_tokens": 192,
 73                  "audio_tokens": 0,
 74                  "accepted_prediction_tokens": 0,
 75                  "rejected_prediction_tokens": 0
 76                }
 77              },
 78              "service_tier": "default",
 79              "system_fingerprint": null
 80            }
 81        headers:
 82            Content-Type:
 83              - application/json
 84        status: 200 OK
 85        code: 200
 86        duration: 3.828985s
 87  - id: 1
 88    request:
 89        proto: HTTP/1.1
 90        proto_major: 1
 91        proto_minor: 1
 92        content_length: 1252
 93        host: ""
 94        body: '{"messages":[{"content":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS.","role":"system"},{"content":"Add and multiply the number 2 and 3","role":"user"},{"tool_calls":[{"id":"call_ucYrrss6ETc3YnQdA7grAXuZ","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"add"},"type":"function"},{"id":"call_KZuPmn3DhLp34eU3WPV6d2BC","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"call_ucYrrss6ETc3YnQdA7grAXuZ","role":"tool"},{"content":"6","tool_call_id":"call_KZuPmn3DhLp34eU3WPV6d2BC","role":"tool"}],"model":"gpt-5","max_completion_tokens":4000,"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"}]}'
 95        headers:
 96            Accept:
 97              - application/json
 98            Content-Type:
 99              - application/json
100            User-Agent:
101              - OpenAI/Go 2.3.0
102        url: https://api.openai.com/v1/chat/completions
103        method: POST
104    response:
105        proto: HTTP/2.0
106        proto_major: 2
107        proto_minor: 0
108        content_length: -1
109        uncompressed: true
110        body: |
111            {
112              "id": "chatcmpl-CJHNZ3DVA5PqYx0mpBu7rQS8mVlXI",
113              "object": "chat.completion",
114              "created": 1758711073,
115              "model": "gpt-5-2025-08-07",
116              "choices": [
117                {
118                  "index": 0,
119                  "message": {
120                    "role": "assistant",
121                    "content": "Results:\n- Addition: 2 + 3 = 5\n- Multiplication: 2 × 3 = 6",
122                    "refusal": null,
123                    "annotations": []
124                  },
125                  "finish_reason": "stop"
126                }
127              ],
128              "usage": {
129                "prompt_tokens": 266,
130                "completion_tokens": 29,
131                "total_tokens": 295,
132                "prompt_tokens_details": {
133                  "cached_tokens": 0,
134                  "audio_tokens": 0
135                },
136                "completion_tokens_details": {
137                  "reasoning_tokens": 0,
138                  "audio_tokens": 0,
139                  "accepted_prediction_tokens": 0,
140                  "rejected_prediction_tokens": 0
141                }
142              },
143              "service_tier": "default",
144              "system_fingerprint": null
145            }
146        headers:
147            Content-Type:
148              - application/json
149        status: 200 OK
150        code: 200
151        duration: 1.842280167s