Streaming text with the AI SDK
This example uses streamText() with MockLanguageModelV3 and simulateReadableStream() so it runs locally without an API key.
Requirements
Steps for running this example in the shell
- Install dependencies:
bash
npm install- Run the script:
bash
npm startOutput
The script streams Hello, world! to the terminal.