# Svelte Cookbook - AI SDK Recipes A collection of practical recipes for building AI-powered applications with SvelteKit and the Vercel AI SDK. ## Available Recipes ### Getting Started - **Slug**: getting-started - **Description**: Build AI-powered Svelte apps in minutes. Installation, setup, and your first chat. - **Tags**: introduction, setup, sveltekit - **Documentation**: /cookbook/getting-started - **llms.txt**: /cookbook/getting-started/llms.txt ### Generate Text - **Slug**: generate-text - **Description**: Learn how to generate text using AI models with simple prompts - **Tags**: text, generation, basics - **Documentation**: /cookbook/generate-text - **llms.txt**: /cookbook/generate-text/llms.txt ### Stream Text - **Slug**: stream-text - **Description**: Stream text responses in real-time for better user experience - **Tags**: text, streaming, real-time - **Documentation**: /cookbook/stream-text - **llms.txt**: /cookbook/stream-text/llms.txt ### Generate Object - **Slug**: generate-object - **Description**: Generate structured data objects with type-safe schemas - **Tags**: object, generation, structured-data - **Documentation**: /cookbook/generate-object - **llms.txt**: /cookbook/generate-object/llms.txt ### Stream Object - **Slug**: stream-object - **Description**: Stream structured objects in real-time with progressive updates - **Tags**: object, streaming, structured-data - **Documentation**: /cookbook/stream-object - **llms.txt**: /cookbook/stream-object/llms.txt ### Call Tool - **Slug**: call-tool - **Description**: Enable AI to call custom tools and functions to perform actions - **Tags**: tools, function-calling, zod - **Documentation**: /cookbook/call-tool - **llms.txt**: /cookbook/call-tool/llms.txt ### Call Tool Multiple Steps - **Slug**: call-tool-multiple-steps - **Description**: Chain multiple tool calls where each step depends on the previous result - **Tags**: tools, multi-step, chaining - **Documentation**: /cookbook/call-tool-multiple-steps - **llms.txt**: /cookbook/call-tool-multiple-steps/llms.txt ### Chat with PDFs - **Slug**: chat-with-pdfs - **Description**: Build an AI assistant that can read and answer questions about PDF documents - **Tags**: pdf, chat, documents - **Documentation**: /cookbook/chat-with-pdfs - **llms.txt**: /cookbook/chat-with-pdfs/llms.txt ### Send Custom Body - **Slug**: send-custom-body - **Description**: Send additional data alongside chat messages to your API endpoint - **Tags**: custom-data, personalization, api - **Documentation**: /cookbook/send-custom-body - **llms.txt**: /cookbook/send-custom-body/llms.txt ### Render Visual Interface - **Slug**: render-visual-interface - **Description**: Render custom UI components for different tool outputs - **Tags**: ui-components, interactive, tools - **Documentation**: /cookbook/render-visual-interface - **llms.txt**: /cookbook/render-visual-interface/llms.txt ### Generate Text with Chat Prompt - **Slug**: generate-text-with-chat-prompt - **Description**: Generate text using conversational chat prompts for more natural interactions - **Tags**: text, generation, chat - **Documentation**: /cookbook/generate-text-with-chat-prompt - **llms.txt**: /cookbook/generate-text-with-chat-prompt/llms.txt ### Stream Text with Chat Prompt - **Slug**: stream-text-with-chat-prompt - **Description**: Combine streaming with chat prompts for responsive conversational AI - **Tags**: text, streaming, chat - **Documentation**: /cookbook/stream-text-with-chat-prompt - **llms.txt**: /cookbook/stream-text-with-chat-prompt/llms.txt ### Markdown Chatbot - **Slug**: markdown-chatbot - **Description**: Create a chatbot that renders responses in beautiful markdown format - **Tags**: markdown, chat, formatting - **Documentation**: /cookbook/markdown-chatbot - **llms.txt**: /cookbook/markdown-chatbot/llms.txt ## Resources - Vercel AI SDK: https://ai-sdk.dev - SvelteKit: https://kit.svelte.dev - OpenRouter: https://openrouter.ai