跳到正文
Ollama Blog(ollama.com)·· 2024-12-06精選品質評分68

Ollama 釋出結構化輸出功能,支援 JSON schema 定義

Structured outputs

重點導讀

Ollama 於 2024 年 12 月 6 日正式推出結構化輸出功能,允許使用 JSON schema 定義回傳格式。

  • 功能範圍:支援 Python、JavaScript 兩大語言庫,可直接傳入 Pydantic 或 Zod 定義的 schema,並以 format 引數指定。
推薦理由

結合 Pydantic 或 Zod,開發者可將模型回傳對映至結構化資料,提升資料處理效率與可靠性。

信源出處ollama.com

Structured outputs

本文為 888news 精選之重點導讀。若需閱讀作者完整原文、技術細節與官方討論,請前往原始網站。

開啟原文
來源: Ollama Blog (ollama.com)
開啟原文