simple_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: 221
10    host: ""
11    body: '{"messages":[{"content":"You are a helpful assistant","role":"system"},{"content":"Say hi in Portuguese","role":"user"}],"model":"qwen-3-coder-480b","max_tokens":4000,"stream_options":{"include_usage":true},"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.cerebras.ai/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    body: |+
27      data: {"id":"chatcmpl-07ac2555-5f70-4250-bf47-c33cb5e4e22f","choices":[{"delta":{"role":"assistant"},"index":0}],"created":1761231233,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
28
29      data: {"id":"chatcmpl-07ac2555-5f70-4250-bf47-c33cb5e4e22f","choices":[{"delta":{"content":"Oi"},"index":0}],"created":1761231233,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
30
31      data: {"id":"chatcmpl-07ac2555-5f70-4250-bf47-c33cb5e4e22f","choices":[{"delta":{"content":"!"},"index":0}],"created":1761231233,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
32
33      data: {"id":"chatcmpl-07ac2555-5f70-4250-bf47-c33cb5e4e22f","choices":[{"delta":{},"index":0}],"created":1761231233,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk"}
34
35      data: {"id":"chatcmpl-07ac2555-5f70-4250-bf47-c33cb5e4e22f","choices":[{"delta":{},"finish_reason":"stop","index":0}],"created":1761231233,"model":"qwen-3-coder-480b","system_fingerprint":"fp_386b539e7b02ce3613b7","object":"chat.completion.chunk","usage":{"prompt_tokens":22,"completion_tokens":3,"total_tokens":25,"prompt_tokens_details":{"cached_tokens":0}},"time_info":{"queue_time":0.000533844,"prompt_time":0.00128098,"completion_time":0.003694258,"total_time":0.007519960403442383,"created":1761231233.440385}}
36
37    headers:
38      Content-Type:
39      - text/event-stream; charset=utf-8
40    status: 200 OK
41    code: 200
42    duration: 283.289209ms