Stream a chat response from Airbolt (default behavior)
This is the default chat() function - streaming provides better UX with real-time responses. For non-streaming behavior, use chatSync().
chat()
chatSync()
Array of messages in the conversation
Optional
Optional configuration
Async generator yielding content chunks
for await (const chunk of chat([ { role: 'user', content: 'Tell me a story' }])) { process.stdout.write(chunk.content);} Copy
for await (const chunk of chat([ { role: 'user', content: 'Tell me a story' }])) { process.stdout.write(chunk.content);}
Stream a chat response from Airbolt (default behavior)
This is the default
chat()
function - streaming provides better UX with real-time responses. For non-streaming behavior, usechatSync()
.