complex_object.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: 915
 10    host: ""
 11    body: '{"max_output_tokens":4000,"store":false,"input":[{"content":[{"text":"Generate information about ''The Lord of the Rings'' book by J.R.R. Tolkien, including genres like fantasy and adventure, and its publication year (1954).","type":"input_text"}],"role":"user"}],"model":"gpt-4o-mini","text":{"format":{"name":"Book","schema":{"additionalProperties":false,"properties":{"author":{"additionalProperties":false,"properties":{"name":{"description":"Author''s name","type":"string"},"nationality":{"description":"Author''s nationality","type":"string"}},"required":["name","nationality"],"type":"object"},"genres":{"description":"List of genres","items":{"type":"string"},"type":"array"},"published_year":{"description":"Year the book was published","type":"integer"},"title":{"description":"The book title","type":"string"}},"required":["title","author","genres","published_year"],"type":"object"},"type":"json_schema"}}}'
 12    headers:
 13      Accept:
 14      - application/json
 15      Content-Type:
 16      - application/json
 17      User-Agent:
 18      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
 19    url: https://api.openai.com/v1/responses
 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": "resp_0287d47a5a02d4900169b3199640648191b370f92c6d81f71d",
 30        "object": "response",
 31        "created_at": 1773345174,
 32        "status": "completed",
 33        "background": false,
 34        "billing": {
 35          "payer": "developer"
 36        },
 37        "completed_at": 1773345175,
 38        "error": null,
 39        "frequency_penalty": 0.0,
 40        "incomplete_details": null,
 41        "instructions": null,
 42        "max_output_tokens": 4000,
 43        "max_tool_calls": null,
 44        "model": "gpt-4o-mini-2024-07-18",
 45        "output": [
 46          {
 47            "id": "msg_0287d47a5a02d4900169b31996d0148191b3c3269d1a10629d",
 48            "type": "message",
 49            "status": "completed",
 50            "content": [
 51              {
 52                "type": "output_text",
 53                "annotations": [],
 54                "logprobs": [],
 55                "text": "{\"author\":{\"name\":\"J.R.R. Tolkien\",\"nationality\":\"British\"},\"genres\":[\"Fantasy\",\"Adventure\"],\"published_year\":1954,\"title\":\"The Lord of the Rings\"}"
 56              }
 57            ],
 58            "role": "assistant"
 59          }
 60        ],
 61        "parallel_tool_calls": true,
 62        "presence_penalty": 0.0,
 63        "previous_response_id": null,
 64        "prompt_cache_key": null,
 65        "prompt_cache_retention": null,
 66        "reasoning": {
 67          "effort": null,
 68          "summary": null
 69        },
 70        "safety_identifier": null,
 71        "service_tier": "default",
 72        "store": false,
 73        "temperature": 1.0,
 74        "text": {
 75          "format": {
 76            "type": "json_schema",
 77            "description": null,
 78            "name": "Book",
 79            "schema": {
 80              "additionalProperties": false,
 81              "properties": {
 82                "author": {
 83                  "additionalProperties": false,
 84                  "properties": {
 85                    "name": {
 86                      "description": "Author's name",
 87                      "type": "string"
 88                    },
 89                    "nationality": {
 90                      "description": "Author's nationality",
 91                      "type": "string"
 92                    }
 93                  },
 94                  "required": [
 95                    "name",
 96                    "nationality"
 97                  ],
 98                  "type": "object"
 99                },
100                "genres": {
101                  "description": "List of genres",
102                  "items": {
103                    "type": "string"
104                  },
105                  "type": "array"
106                },
107                "published_year": {
108                  "description": "Year the book was published",
109                  "type": "integer"
110                },
111                "title": {
112                  "description": "The book title",
113                  "type": "string"
114                }
115              },
116              "required": [
117                "title",
118                "author",
119                "genres",
120                "published_year"
121              ],
122              "type": "object"
123            },
124            "strict": true
125          },
126          "verbosity": "medium"
127        },
128        "tool_choice": "auto",
129        "tools": [],
130        "top_logprobs": 0,
131        "top_p": 1.0,
132        "truncation": "disabled",
133        "usage": {
134          "input_tokens": 140,
135          "input_tokens_details": {
136            "cached_tokens": 0
137          },
138          "output_tokens": 39,
139          "output_tokens_details": {
140            "reasoning_tokens": 0
141          },
142          "total_tokens": 179
143        },
144        "user": null,
145        "metadata": {}
146      }
147    headers:
148      Content-Type:
149      - application/json
150    status: 200 OK
151    code: 200
152    duration: 1.227142708s