---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 462
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"}],"model":"grok-3-mini","reasoning_effort":"high","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"}]}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - OpenAI/Go 2.3.0
    url: https://api.x.ai/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    uncompressed: true
    body: '{"id":"f34c1057-adbf-c28f-afc3-aa8737faf493_us-east-1","object":"chat.completion","created":1758884792,"model":"grok-3-mini-high","choices":[{"index":0,"message":{"role":"assistant","content":"","reasoning_content":"First, the user is asking for the weather in Florence, Italy. I have an available function called \"weather\" that can get weather information for a location.\n\nThe function description is: \"Get weather information for a location\". The parameters require a \"location\" which is a string describing the city.\n\nIn this query, the user has provided \"Florence, Italy\", which clearly specifies the city and country. This should be sufficient as the location parameter.\n\nAll required parameters are provided: the location is \"Florence, Italy\". I don''t need to ask for clarification.\n\nI should call the function in the specified JSON format within <function_call> tags.\n\nFunction call format: <function_call>{\"action\": \"function_name\", \"action_input\": {\"parameter\": \"argument\"}}</function_call>\n\nFor this, the action is \"weather\", and the action_input should have \"location\" with the value \"Florence, Italy\".\n\nSo, the function call should be: <function_call>{\"action\": \"weather\", \"action_input\": {\"location\": \"Florence, Italy\"}}</function_call>\n\nAfter calling the function, I might need to handle the response in subsequent turns, but for now, this is the logical next step to advance the user''s request.\n\nMy response should only contain the function call since I''m deciding to call a function. I shouldn''t add any extra text unless necessary, and the instructions say to keep responses clear and not verbose.\n\nFinally, confirm: Is there any reason not to call the function? No, it matches perfectly.","tool_calls":[{"id":"call_71093541","function":{"name":"weather","arguments":"{\"location\":\"Florence, Italy\"}"},"type":"function"}],"refusal":null},"finish_reason":"tool_calls"}],"usage":{"prompt_tokens":288,"completion_tokens":27,"total_tokens":620,"prompt_tokens_details":{"text_tokens":288,"audio_tokens":0,"image_tokens":0,"cached_tokens":7},"completion_tokens_details":{"reasoning_tokens":305,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"num_sources_used":0},"system_fingerprint":"fp_a6fbae1a97"}'
    headers:
      Content-Type:
      - application/json
    status: 200 OK
    code: 200
    duration: 3.0643785s
- id: 1
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 682
    host: ""
    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"What''s the weather in Florence, Italy?","role":"user"},{"tool_calls":[{"id":"call_71093541","function":{"arguments":"{\"location\":\"Florence, Italy\"}","name":"weather"},"type":"function"}],"role":"assistant"},{"content":"40 C","tool_call_id":"call_71093541","role":"tool"}],"model":"grok-3-mini","reasoning_effort":"high","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"}]}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - OpenAI/Go 2.3.0
    url: https://api.x.ai/v1/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    uncompressed: true
    body: '{"id":"17c031cd-ed79-e606-6e09-2f426babeb54_us-east-1","object":"chat.completion","created":1758884795,"model":"grok-3-mini-high","choices":[{"index":0,"message":{"role":"assistant","content":"The current weather in Florence, Italy, is 40°C.","reasoning_content":"First, the user asked about the weather in Florence, Italy. I have a function available called \"weather\" that can get weather information for a location. The required parameter is \"location\", which is a string.\n\nIn my initial response, I already called the function with the location \"Florence, Italy\", as it was a direct match and all parameters were provided.\n\nNow, the function call has been executed, and the response is \"40 C\". This means the weather function returned that the temperature is 40 degrees Celsius. I need to respond to the user with this information in a helpful and clear way.\n\nMy role is to be a helpful assistant. I should present the information from the function call clearly. Since the function call was successful and provided the data, I don''t need to call any more functions unless there''s more to the user''s request.\n\nThe user''s query is fully addressed with this weather information. I should not add extra unnecessary information or verbosity, as per the instructions.\n\nFinally, I need to format my response properly. I''m not calling another function here, so I shouldn''t use the <function_call> tags. Just a straightforward response.\n\nResponse structure:\n- Keep it clear and concise.\n- State the weather based on the function''s output.","refusal":null},"finish_reason":"stop"}],"usage":{"prompt_tokens":332,"completion_tokens":13,"total_tokens":594,"prompt_tokens_details":{"text_tokens":332,"audio_tokens":0,"image_tokens":0,"cached_tokens":283},"completion_tokens_details":{"reasoning_tokens":249,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"num_sources_used":0},"system_fingerprint":"fp_a6fbae1a97"}'
    headers:
      Content-Type:
      - application/json
    status: 200 OK
    code: 200
    duration: 2.515450375s
