structured-output
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStructured Output
结构化输出
Extract structured data from unstructured text using Zod schema validation. Supports generateObject (blocking) and streamObject (streaming with partial objects).
使用Zod模式验证从非结构化文本中提取结构化数据。支持generateObject(阻塞式)和streamObject(流式返回部分对象)。
Capabilities
功能特性
- Entity extraction: Pull names, dates, amounts from text
- Classification: Categorize content into predefined types
- Data transformation: Convert prose into structured JSON
- Streaming: Get partial objects as they build up
- 实体提取:从文本中提取姓名、日期、金额
- 分类:将内容归类为预定义类型
- 数据转换:将散文转换为结构化JSON
- 流式处理:在对象构建过程中获取部分对象
Example
示例
"Extract all people, dates, and locations from this article"
"Classify this support ticket as billing/technical/account"
"Convert this meeting notes into structured action items"
"从这篇文章中提取所有人物、日期和地点"
"将此支持工单分类为计费/技术/账户类"
"将此会议记录转换为结构化行动项"