multi_tool_gpt-4o-mini.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: 816
 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-4o-mini","max_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-CJHNMiBU5lXyiDpJ3Yf1X8o8Crw80",
 30              "object": "chat.completion",
 31              "created": 1758711060,
 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_fHc6yzovqB6JPczldIdg7r7Z",
 42                        "type": "function",
 43                        "function": {
 44                          "name": "add",
 45                          "arguments": "{\"a\": 2, \"b\": 3}"
 46                        }
 47                      },
 48                      {
 49                        "id": "call_zumf4AvQJr4cmTe48gOOC24l",
 50                        "type": "function",
 51                        "function": {
 52                          "name": "multiply",
 53                          "arguments": "{\"a\": 2, \"b\": 3}"
 54                        }
 55                      }
 56                    ],
 57                    "refusal": null,
 58                    "annotations": []
 59                  },
 60                  "logprobs": null,
 61                  "finish_reason": "tool_calls"
 62                }
 63              ],
 64              "usage": {
 65                "prompt_tokens": 110,
 66                "completion_tokens": 50,
 67                "total_tokens": 160,
 68                "prompt_tokens_details": {
 69                  "cached_tokens": 0,
 70                  "audio_tokens": 0
 71                },
 72                "completion_tokens_details": {
 73                  "reasoning_tokens": 0,
 74                  "audio_tokens": 0,
 75                  "accepted_prediction_tokens": 0,
 76                  "rejected_prediction_tokens": 0
 77                }
 78              },
 79              "service_tier": "default",
 80              "system_fingerprint": "fp_560af6e559"
 81            }
 82        headers:
 83            Content-Type:
 84              - application/json
 85        status: 200 OK
 86        code: 200
 87        duration: 2.228339708s
 88  - id: 1
 89    request:
 90        proto: HTTP/1.1
 91        proto_major: 1
 92        proto_minor: 1
 93        content_length: 1247
 94        host: ""
 95        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_fHc6yzovqB6JPczldIdg7r7Z","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"add"},"type":"function"},{"id":"call_zumf4AvQJr4cmTe48gOOC24l","function":{"arguments":"{\"a\": 2, \"b\": 3}","name":"multiply"},"type":"function"}],"role":"assistant"},{"content":"5","tool_call_id":"call_fHc6yzovqB6JPczldIdg7r7Z","role":"tool"},{"content":"6","tool_call_id":"call_zumf4AvQJr4cmTe48gOOC24l","role":"tool"}],"model":"gpt-4o-mini","max_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"}]}'
 96        headers:
 97            Accept:
 98              - application/json
 99            Content-Type:
100              - application/json
101            User-Agent:
102              - OpenAI/Go 2.3.0
103        url: https://api.openai.com/v1/chat/completions
104        method: POST
105    response:
106        proto: HTTP/2.0
107        proto_major: 2
108        proto_minor: 0
109        content_length: -1
110        uncompressed: true
111        body: |
112            {
113              "id": "chatcmpl-CJHNOPDPmVIDiZcccGg7FBSAmkjuK",
114              "object": "chat.completion",
115              "created": 1758711062,
116              "model": "gpt-4o-mini-2024-07-18",
117              "choices": [
118                {
119                  "index": 0,
120                  "message": {
121                    "role": "assistant",
122                    "content": "The result of adding 2 and 3 is 5, and the result of multiplying 2 and 3 is 6.",
123                    "refusal": null,
124                    "annotations": []
125                  },
126                  "logprobs": null,
127                  "finish_reason": "stop"
128                }
129              ],
130              "usage": {
131                "prompt_tokens": 176,
132                "completion_tokens": 28,
133                "total_tokens": 204,
134                "prompt_tokens_details": {
135                  "cached_tokens": 0,
136                  "audio_tokens": 0
137                },
138                "completion_tokens_details": {
139                  "reasoning_tokens": 0,
140                  "audio_tokens": 0,
141                  "accepted_prediction_tokens": 0,
142                  "rejected_prediction_tokens": 0
143                }
144              },
145              "service_tier": "default",
146              "system_fingerprint": "fp_560af6e559"
147            }
148        headers:
149            Content-Type:
150              - application/json
151        status: 200 OK
152        code: 200
153        duration: 1.681688625s