Skip to main content
在 Manus 中运行任何 Skill
一键导入
$pwd:

ai-core-structured-outputs

// Type-safe JSON schema responses from LLMs using outputSchema on chat() and useChat(). Supports Zod, ArkType, and Valibot schemas. The adapter handles provider-specific strategies transparently — never configure structured output at the provider level. Pass stream:true alongside outputSchema for incremental JSON deltas + a terminal validated object via the `structured-output.complete` event. Every assistant turn in useChat carries its own typed `StructuredOutputPart` on `messages[i].parts`, so multi-turn structured chats preserve history automatically — partial/final derive from the latest assistant turn's part. convertSchemaToJsonSchema() for manual schema conversion.

$ git log --oneline --stat
stars:2,684
forks:214
updated:2026年5月21日 05:42
SKILL.md
readonly