本页还没有译文
本页 11 段还没译成简体中文,下面显示的是英文原文。Overview
还没翻译译自英文(ai-sdk.dev)本页 11 段都还没译
Large Language Models (LLMs) are advanced programs that can understand, create, and engage with human language on a large scale. They are trained on vast amounts of written material to recognize patterns in language and predict what might come next in a given piece of text.
AI SDK Core simplifies working with LLMs by offering a standardized way of integrating them into your app - so you can focus on building great AI applications for your users, not waste time on technical details.
For example, here’s how you can generate text with various models using the AI SDK:
This part of the page is interactive; see it on the original page.
AI SDK Core Functions
AI SDK Core has various functions designed for text generation, structured data generation, and tool usage. These functions take a standardized approach to setting up prompts and settings, making it easier to work with different models.
generateText: Generates text and tool calls. This function is ideal for non-interactive use cases such as automation tasks where you need to write text (e.g. drafting email or summarizing web pages) and for agents that use tools.streamText: Stream text and tool calls. You can use thestreamTextfunction for interactive use cases such as chat bots and content streaming.
Both generateText and streamText support structured output via the output property (e.g. Output.object(), Output.array()), allowing you to generate typed, schema-validated data for information extraction, synthetic data generation, classification tasks, and streaming generated UIs.
API Reference
Please check out the AI SDK Core API Reference for more details on each function.