Basic text generation with the AI SDK
This example calls generateText() from the Vercel AI SDK with MockLanguageModelV3 from ai/test, so it runs locally without any API key.
Requirements
Steps for running this example in the shell
- Install dependencies:
bash
npm install- Run the script:
bash
npm startOutput
The script prints the generated text from the mock model.