interactions:
- request:
    body: |-
      {
        "messages": [
          {
            "role": "system",
            "content": "You're a helpful assistant."
          },
          {
            "role": "user",
            "content": "What's the weather in Seattle and San Francisco today?"
          }
        ],
        "model": "gpt-4o-mini",
        "tool_choice": "auto",
        "tools": [
          {
            "type": "function",
            "function": {
              "name": "get_current_weather",
              "description": "Get the current weather in a given location",
              "parameters": {
                "type": "object",
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "The city and state, e.g. Boston, MA"
                  }
                },
                "required": [
                  "location"
                ],
                "additionalProperties": false
              }
            }
          }
        ]
      }
    headers:
      accept:
      - application/json
      accept-encoding:
      - gzip, deflate
      authorization:
      - Bearer test_openai_api_key
      connection:
      - keep-alive
      content-length:
      - '543'
      content-type:
      - application/json
      host:
      - api.openai.com
      user-agent:
      - OpenAI/Python 1.54.3
      x-stainless-arch:
      - arm64
      x-stainless-async:
      - 'false'
      x-stainless-lang:
      - python
      x-stainless-os:
      - MacOS
      x-stainless-package-version:
      - 1.54.3
      x-stainless-retry-count:
      - '0'
      x-stainless-runtime:
      - CPython
      x-stainless-runtime-version:
      - 3.12.6
    method: POST
    uri: https://api.openai.com/v1/chat/completions
  response:
    body:
      string: |-
        {
          "id": "chatcmpl-ASYMW6w3m9qqpHUVhYTbQbw61zMqA",
          "object": "chat.completion",
          "created": 1731368636,
          "model": "gpt-4o-mini-2024-07-18",
          "choices": [
            {
              "index": 0,
              "message": {
                "role": "assistant",
                "content": null,
                "tool_calls": [
                  {
                    "id": "call_eqbDFUdPqay2WjsSzZEiAn0U",
                    "type": "function",
                    "function": {
                      "name": "get_current_weather",
                      "arguments": "{\"location\": \"Seattle, WA\"}"
                    }
                  },
                  {
                    "id": "call_tn3sgasg6GaftTdancBYJNJN",
                    "type": "function",
                    "function": {
                      "name": "get_current_weather",
                      "arguments": "{\"location\": \"San Francisco, CA\"}"
                    }
                  }
                ],
                "refusal": null
              },
              "logprobs": null,
              "finish_reason": "tool_calls"
            }
          ],
          "usage": {
            "prompt_tokens": 75,
            "completion_tokens": 51,
            "total_tokens": 126,
            "prompt_tokens_details": {
              "cached_tokens": 0,
              "audio_tokens": 0
            },
            "completion_tokens_details": {
              "reasoning_tokens": 0,
              "audio_tokens": 0,
              "accepted_prediction_tokens": 0,
              "rejected_prediction_tokens": 0
            }
          },
          "system_fingerprint": "fp_0ba0d124f1"
        }
    headers:
      CF-Cache-Status:
      - DYNAMIC
      CF-RAY:
      - 8e1225ba6a3440b0-SIN
      Connection:
      - keep-alive
      Content-Type:
      - application/json
      Date:
      - Mon, 11 Nov 2024 23:43:57 GMT
      Server:
      - cloudflare
      Set-Cookie: test_set_cookie
      Transfer-Encoding:
      - chunked
      X-Content-Type-Options:
      - nosniff
      access-control-expose-headers:
      - X-Request-ID
      alt-svc:
      - h3=":443"; ma=86400
      content-length:
      - '1308'
      openai-organization: test_openai_org_id
      openai-processing-ms:
      - '761'
      openai-version:
      - '2020-10-01'
      strict-transport-security:
      - max-age=31536000; includeSubDomains; preload
      x-ratelimit-limit-requests:
      - '10000'
      x-ratelimit-limit-tokens:
      - '200000'
      x-ratelimit-remaining-requests:
      - '9994'
      x-ratelimit-remaining-tokens:
      - '199961'
      x-ratelimit-reset-requests:
      - 45.694s
      x-ratelimit-reset-tokens:
      - 11ms
      x-request-id:
      - req_f98710550c77b43865572fc1a7a0bc53
    status:
      code: 200
      message: OK
- request:
    body: |-
      {
        "messages": [
          {
            "role": "system",
            "content": "You're a helpful assistant."
          },
          {
            "role": "user",
            "content": "What's the weather in Seattle and San Francisco today?"
          },
          {
            "role": "assistant",
            "tool_calls": [
              {
                "id": "call_eqbDFUdPqay2WjsSzZEiAn0U",
                "function": {
                  "arguments": "{\"location\": \"Seattle, WA\"}",
                  "name": "get_current_weather"
                },
                "type": "function"
              },
              {
                "id": "call_tn3sgasg6GaftTdancBYJNJN",
                "function": {
                  "arguments": "{\"location\": \"San Francisco, CA\"}",
                  "name": "get_current_weather"
                },
                "type": "function"
              }
            ]
          },
          {
            "role": "tool",
            "content": "50 degrees and raining",
            "tool_call_id": "call_eqbDFUdPqay2WjsSzZEiAn0U"
          },
          {
            "role": "tool",
            "content": "70 degrees and sunny",
            "tool_call_id": "call_tn3sgasg6GaftTdancBYJNJN"
          }
        ],
        "model": "gpt-4o-mini"
      }
    headers:
      accept:
      - application/json
      accept-encoding:
      - gzip, deflate
      authorization:
      - Bearer test_openai_api_key
      connection:
      - keep-alive
      content-length:
      - '746'
      content-type:
      - application/json
      cookie:
      - test_cookie
      host:
      - api.openai.com
      user-agent:
      - OpenAI/Python 1.54.3
      x-stainless-arch:
      - arm64
      x-stainless-async:
      - 'false'
      x-stainless-lang:
      - python
      x-stainless-os:
      - MacOS
      x-stainless-package-version:
      - 1.54.3
      x-stainless-retry-count:
      - '0'
      x-stainless-runtime:
      - CPython
      x-stainless-runtime-version:
      - 3.12.6
    method: POST
    uri: https://api.openai.com/v1/chat/completions
  response:
    body:
      string: |-
        {
          "id": "chatcmpl-ASYMYObbcUyZ77rbvypWmcZPIVSf1",
          "object": "chat.completion",
          "created": 1731368638,
          "model": "gpt-4o-mini-2024-07-18",
          "choices": [
            {
              "index": 0,
              "message": {
                "role": "assistant",
                "content": "Today, the weather in Seattle is 50 degrees and raining, while San Francisco is enjoying 70 degrees and sunny weather.",
                "refusal": null
              },
              "logprobs": null,
              "finish_reason": "stop"
            }
          ],
          "usage": {
            "prompt_tokens": 99,
            "completion_tokens": 25,
            "total_tokens": 124,
            "prompt_tokens_details": {
              "cached_tokens": 0,
              "audio_tokens": 0
            },
            "completion_tokens_details": {
              "reasoning_tokens": 0,
              "audio_tokens": 0,
              "accepted_prediction_tokens": 0,
              "rejected_prediction_tokens": 0
            }
          },
          "system_fingerprint": "fp_0ba0d124f1"
        }
    headers:
      CF-Cache-Status:
      - DYNAMIC
      CF-RAY:
      - 8e1225c12f6340b0-SIN
      Connection:
      - keep-alive
      Content-Type:
      - application/json
      Date:
      - Mon, 11 Nov 2024 23:43:58 GMT
      Server:
      - cloudflare
      Set-Cookie: test_set_cookie
      Transfer-Encoding:
      - chunked
      X-Content-Type-Options:
      - nosniff
      access-control-expose-headers:
      - X-Request-ID
      alt-svc:
      - h3=":443"; ma=86400
      content-length:
      - '870'
      openai-organization: test_openai_org_id
      openai-processing-ms:
      - '722'
      openai-version:
      - '2020-10-01'
      strict-transport-security:
      - max-age=31536000; includeSubDomains; preload
      x-ratelimit-limit-requests:
      - '10000'
      x-ratelimit-limit-tokens:
      - '200000'
      x-ratelimit-remaining-requests:
      - '9993'
      x-ratelimit-remaining-tokens:
      - '199948'
      x-ratelimit-reset-requests:
      - 53.254s
      x-ratelimit-reset-tokens:
      - 15ms
      x-request-id:
      - req_2bb3d10a2a75f5d64a24aef595a0d8dd
    status:
      code: 200
      message: OK
version: 1
