Signal · Methods
signal.stream
signal.stream(prompt) runs the same request as .complete() and returns an async iterable of events: tool_start, tool_end, text for each chunk, retry, and a final done that carries the .complete() result (only its response is shown here). The model’s turns are scripted and streamed six characters per chunk; no model is called.
'How many seats are left on Saturday?'
[
{
calls: [{ name: 'seatsLeft', args: '{"night":"2026-10-24"}' }],
},
{ content: '113 seats are left.' },
]Stream, event by event
{
type: 'tool_start',
name: 'seatsLeft',
args: { night: '2026-10-24' },
}Runs in this page on the installed package. The input and the expected output are defined by the example.