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: 968
10 host: ""
11 body: '{"messages":[{"content":"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).","role":"user"}],"model":"gpt-4o-mini","max_tokens":4000,"response_format":{"json_schema":{"name":"Book","strict":true,"description":"A book with title, author, genres, and publication year","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 - OpenAI/Go 2.7.1
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-CZkh7y0v50HiK3bHkckDQM27mAxaF",
30 "object": "chat.completion",
31 "created": 1762637009,
32 "model": "gpt-4o-mini-2024-07-18",
33 "choices": [
34 {
35 "index": 0,
36 "message": {
37 "role": "assistant",
38 "content": "{\"author\":{\"name\":\"J.R.R. Tolkien\",\"nationality\":\"British\"},\"genres\":[\"Fantasy\",\"Adventure\",\"Epic\",\"High Fantasy\"],\"published_year\":1954,\"title\":\"The Lord of the Rings\"}",
39 "refusal": null,
40 "annotations": []
41 },
42 "logprobs": null,
43 "finish_reason": "stop"
44 }
45 ],
46 "usage": {
47 "prompt_tokens": 160,
48 "completion_tokens": 43,
49 "total_tokens": 203,
50 "prompt_tokens_details": {
51 "cached_tokens": 0,
52 "audio_tokens": 0
53 },
54 "completion_tokens_details": {
55 "reasoning_tokens": 0,
56 "audio_tokens": 0,
57 "accepted_prediction_tokens": 0,
58 "rejected_prediction_tokens": 0
59 }
60 },
61 "service_tier": "default",
62 "system_fingerprint": "fp_560af6e559"
63 }
64 headers:
65 Content-Type:
66 - application/json
67 status: 200 OK
68 code: 200
69 duration: 1.814804666s