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: 817
10    host: generativelanguage.googleapis.com
11    body: |
12      {"contents":[{"parts":[{"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)."}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000,"responseJsonSchema":{"properties":{"author":{"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"},"responseMimeType":"application/json"}}
13    headers:
14      Content-Type:
15      - application/json
16      User-Agent:
17      - google-genai-sdk/1.34.0 gl-go/go1.25.4
18    url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent
19    method: POST
20  response:
21    proto: HTTP/2.0
22    proto_major: 2
23    proto_minor: 0
24    content_length: -1
25    uncompressed: true
26    body: |
27      {
28        "candidates": [
29          {
30            "content": {
31              "parts": [
32                {
33                  "text": "{\n  \"author\": {\n    \"name\": \"J.R.R. Tolkien\",\n    \"nationality\": \"British\"\n  },\n  \"genres\": [\n    \"Fantasy\",\n    \"Adventure\",\n    \"High fantasy\"\n  ],\n  \"published_year\": 1954,\n  \"title\": \"The Lord of the Rings\"\n}"
34                }
35              ],
36              "role": "model"
37            },
38            "finishReason": "STOP",
39            "index": 0
40          }
41        ],
42        "usageMetadata": {
43          "promptTokenCount": 38,
44          "candidatesTokenCount": 84,
45          "totalTokenCount": 195,
46          "promptTokensDetails": [
47            {
48              "modality": "TEXT",
49              "tokenCount": 38
50            }
51          ],
52          "thoughtsTokenCount": 73
53        },
54        "modelVersion": "gemini-2.5-pro",
55        "responseId": "0qIdaciCFffPvdIPp-ycyAk"
56      }
57    headers:
58      Content-Type:
59      - application/json; charset=UTF-8
60    status: 200 OK
61    code: 200
62    duration: 2.813791334s