Works exactly like ai.chat(), except that it returns a promise that resolves with an AsyncIterable object that can be iterated using a for await...of expression.
Each value is part of the response from the chat model.
Useful for displaying the partial results from an AI chat model to the user so they can see the model working.
:rocket: Features
ai.stream.chat()
function.ai.chat()
, except that it returns a promise that resolves with anAsyncIterable
object that can be iterated using afor await...of
expression.Closes #467