本页还没有译文
本页 4 段还没译成简体中文,下面显示的是英文原文。Structured Outputs (Moved)
还没翻译译自英文(tanstack.com)本页 4 段都还没译
The structured-outputs guide has moved to its own top-level section, split by what you're building. Pick the journey that fits:
- Overview — what structured output is, schema library options, provider support, and "which page do I read?"
- One-Shot Extraction — single prompt in, single typed object out. Use this when you don't need streaming or chat history.
- Streaming UIs —
useChat({ outputSchema })withpartialandfinalpopulating a UI field by field. - Multi-Turn Chat — each successfully completed structured-output run adds a typed response to message history, and
messages[i].parts.find(p => p.type === "structured-output").datais typed by your schema. - With Tools — combining
outputSchemawith the agent loop, including pause/resume for server-tool approvals and client-tool invocations. - Harness Agents — a coding agent in a sandbox inspects files, then returns a typed object.
Note: This URL is kept for backward compatibility. New content lives under
/structured-outputs/*— update existing bookmarks when you can.
AI 翻译查看英文原文