simple_object_streaming.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: 579
10    host: ""
11    body: '{"max_output_tokens":4000,"store":false,"input":[{"content":[{"text":"Generate information about a person named Alice who is 30 years old and lives in Paris.","type":"input_text"}],"role":"user"}],"model":"gpt-4o","text":{"format":{"name":"Person","schema":{"additionalProperties":false,"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":"json_schema"}},"stream":true}'
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/responses
20    method: POST
21  response:
22    proto: HTTP/2.0
23    proto_major: 2
24    proto_minor: 0
25    content_length: -1
26    body: |+
27      event: response.created
28      data: {"type":"response.created","sequence_number":0,"response":{"id":"resp_0d165ceb975b9af401690fb5e0e8788192bd9eb948decabbd1","object":"response","created_at":1762637280,"status":"in_progress","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":4000,"max_tool_calls":null,"model":"gpt-4o-2024-08-06","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":null,"summary":null},"safety_identifier":null,"service_tier":"auto","store":false,"temperature":1.0,"text":{"format":{"type":"json_schema","description":null,"name":"Person","schema":{"additionalProperties":false,"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"},"strict":true},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}
29
30      event: response.in_progress
31      data: {"type":"response.in_progress","sequence_number":1,"response":{"id":"resp_0d165ceb975b9af401690fb5e0e8788192bd9eb948decabbd1","object":"response","created_at":1762637280,"status":"in_progress","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":4000,"max_tool_calls":null,"model":"gpt-4o-2024-08-06","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":null,"summary":null},"safety_identifier":null,"service_tier":"auto","store":false,"temperature":1.0,"text":{"format":{"type":"json_schema","description":null,"name":"Person","schema":{"additionalProperties":false,"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"},"strict":true},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}
32
33      event: response.output_item.added
34      data: {"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","type":"message","status":"in_progress","content":[],"role":"assistant"}}
35
36      event: response.content_part.added
37      data: {"type":"response.content_part.added","sequence_number":3,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""}}
38
39      event: response.output_text.delta
40      data: {"type":"response.output_text.delta","sequence_number":4,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"{\"","logprobs":[],"obfuscation":"Tp0jZ8gJ4woL9Y"}
41
42      event: response.output_text.delta
43      data: {"type":"response.output_text.delta","sequence_number":5,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"age","logprobs":[],"obfuscation":"citwa9boDP9Y2"}
44
45      event: response.output_text.delta
46      data: {"type":"response.output_text.delta","sequence_number":6,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"\":","logprobs":[],"obfuscation":"y41U42sTULTK18"}
47
48      event: response.output_text.delta
49      data: {"type":"response.output_text.delta","sequence_number":7,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"30","logprobs":[],"obfuscation":"YqlEplTbGy3fsj"}
50
51      event: response.output_text.delta
52      data: {"type":"response.output_text.delta","sequence_number":8,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":",\"","logprobs":[],"obfuscation":"Sg3V1re96l7ZKF"}
53
54      event: response.output_text.delta
55      data: {"type":"response.output_text.delta","sequence_number":9,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"city","logprobs":[],"obfuscation":"x357HhG0WmSG"}
56
57      event: response.output_text.delta
58      data: {"type":"response.output_text.delta","sequence_number":10,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"\":\"","logprobs":[],"obfuscation":"y0CAsSO6TE2Wm"}
59
60      event: response.output_text.delta
61      data: {"type":"response.output_text.delta","sequence_number":11,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"Paris","logprobs":[],"obfuscation":"B7NTDCRqRbF"}
62
63      event: response.output_text.delta
64      data: {"type":"response.output_text.delta","sequence_number":12,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"\",\"","logprobs":[],"obfuscation":"IETmenhLsNCo2"}
65
66      event: response.output_text.delta
67      data: {"type":"response.output_text.delta","sequence_number":13,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"name","logprobs":[],"obfuscation":"tN74YVJx0gab"}
68
69      event: response.output_text.delta
70      data: {"type":"response.output_text.delta","sequence_number":14,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"\":\"","logprobs":[],"obfuscation":"sFnNvr3rmQHWV"}
71
72      event: response.output_text.delta
73      data: {"type":"response.output_text.delta","sequence_number":15,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"Alice","logprobs":[],"obfuscation":"5fQecM4hrZO"}
74
75      event: response.output_text.delta
76      data: {"type":"response.output_text.delta","sequence_number":16,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"delta":"\"}","logprobs":[],"obfuscation":"jgrv8Q1bo52G7r"}
77
78      event: response.output_text.done
79      data: {"type":"response.output_text.done","sequence_number":17,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"text":"{\"age\":30,\"city\":\"Paris\",\"name\":\"Alice\"}","logprobs":[]}
80
81      event: response.content_part.done
82      data: {"type":"response.content_part.done","sequence_number":18,"item_id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","output_index":0,"content_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"{\"age\":30,\"city\":\"Paris\",\"name\":\"Alice\"}"}}
83
84      event: response.output_item.done
85      data: {"type":"response.output_item.done","sequence_number":19,"output_index":0,"item":{"id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"{\"age\":30,\"city\":\"Paris\",\"name\":\"Alice\"}"}],"role":"assistant"}}
86
87      event: response.completed
88      data: {"type":"response.completed","sequence_number":20,"response":{"id":"resp_0d165ceb975b9af401690fb5e0e8788192bd9eb948decabbd1","object":"response","created_at":1762637280,"status":"completed","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":4000,"max_tool_calls":null,"model":"gpt-4o-2024-08-06","output":[{"id":"msg_0d165ceb975b9af401690fb5e147e08192981f80e775d1b42a","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"{\"age\":30,\"city\":\"Paris\",\"name\":\"Alice\"}"}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":null,"summary":null},"safety_identifier":null,"service_tier":"default","store":false,"temperature":1.0,"text":{"format":{"type":"json_schema","description":null,"name":"Person","schema":{"additionalProperties":false,"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"},"strict":true},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":82,"input_tokens_details":{"cached_tokens":0},"output_tokens":14,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":96},"user":null,"metadata":{}}}
89
90    headers:
91      Content-Type:
92      - text/event-stream; charset=utf-8
93    status: 200 OK
94    code: 200
95    duration: 229.655875ms