---
version: 2
interactions:
- id: 0
  request:
    proto: HTTP/1.1
    proto_major: 1
    proto_minor: 1
    content_length: 628
    host: ""
    body: '{"messages":[{"content":"Generate information about a person named Alice who is 30 years old and lives in Paris.","role":"user"}],"model":"glm-4.7-flash","max_tokens":4000,"tool_choice":{"function":{"name":"Person"},"type":"function"},"tools":[{"function":{"name":"Person","strict":false,"description":"A person with name, age, and city","parameters":{"properties":{"age":{"description":"The person''s age","type":"integer"},"city":{"description":"The city where the person lives","type":"string"},"name":{"description":"The person''s name","type":"string"}},"required":["name","age","city"],"type":"object"}},"type":"function"}]}'
    headers:
      Accept:
      - application/json
      Content-Type:
      - application/json
      User-Agent:
      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
    url: https://api.z.ai/api/coding/paas/v4/chat/completions
    method: POST
  response:
    proto: HTTP/2.0
    proto_major: 2
    proto_minor: 0
    content_length: -1
    uncompressed: true
    body: '{"choices":[{"finish_reason":"tool_calls","index":0,"message":{"content":"","reasoning_content":"The user wants me to generate information about a person named Alice who is 30 years old and lives in Paris. I have a Person function available that takes name, age, and city as required parameters. The user has provided all the required information:\n- name: Alice\n- age: 30\n- city: Paris\n\nI should use the Person function to generate this information.","role":"assistant","tool_calls":[{"function":{"arguments":"{\"age\":30,\"city\":\"Paris\",\"name\":\"Alice\"}","name":"Person"},"id":"call_-7807256997933348525","index":0,"type":"function"}]}}],"created":1773349503,"id":"202603130505011f6aa93c4e8445e0","model":"glm-4.7-flash","object":"chat.completion","request_id":"202603130505011f6aa93c4e8445e0","usage":{"completion_tokens":100,"completion_tokens_details":{"reasoning_tokens":77},"prompt_tokens":225,"prompt_tokens_details":{"cached_tokens":43},"total_tokens":325}}'
    headers:
      Content-Type:
      - application/json; charset=UTF-8
    status: 200 OK
    code: 200
    duration: 2.314329667s
