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 form:
14 alt:
15 - sse
16 headers:
17 Content-Type:
18 - application/json
19 User-Agent:
20 - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
21 - google-genai-sdk/1.49.0 gl-go/go1.26.1
22 url: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?alt=sse
23 method: POST
24 response:
25 proto: HTTP/2.0
26 proto_major: 2
27 proto_minor: 0
28 content_length: -1
29 body: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"{\\\"author\\\": {\\\"name\\\": \\\"J\"}],\"role\": \"model\"},\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 38,\"candidatesTokenCount\": 8,\"totalTokenCount\": 192,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 38}],\"thoughtsTokenCount\": 146},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"9wCzae3oCajRz7IPsNKWsA4\"}\r\n\r\ndata: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \".R.R. Tolkien\\\", \\\"nationality\\\": \\\"English\\\"}, \\\"genres\\\": [\\\"fantasy\\\", \\\"adventure\\\"], \\\"published_year\\\": 1954, \\\"title\\\": \\\"The Lord of the Rings\\\"}\"}],\"role\": \"model\"},\"finishReason\": \"STOP\",\"index\": 0}],\"usageMetadata\": {\"promptTokenCount\": 38,\"candidatesTokenCount\": 51,\"totalTokenCount\": 235,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 38}],\"thoughtsTokenCount\": 146},\"modelVersion\": \"gemini-2.5-flash\",\"responseId\": \"9wCzae3oCajRz7IPsNKWsA4\"}\r\n\r\n"
30 headers:
31 Content-Type:
32 - text/event-stream
33 status: 200 OK
34 code: 200
35 duration: 1.428271s