跳到正文
Vercel Blog· Jerilyn Zheng·· 2 天前精選AI 評分68

Vercel AI Gateway 現已正式上線 OpenAI Decisions API

OpenAI Decisions API now available on AI Gateway

AI 導讀

OpenAI Decisions API 現已在 Vercel AI Gateway 上可用,現有 SDK 只需改 base URL、憑證與模型 ID,即可直接切換。

推薦理由

OpenAI Decisions API 現已在 Vercel AI Gateway 上可用,SDK 只需改 URL、憑證與模型 ID,即可直接切換,便捷擴充套件決策模型應用。

正文

OpenAI’s Decisions API is now available through AI Gateway at /v1/decisions. It uses the same request and response format as OpenAI, so existing OpenAI SDK integrations can switch by changing the base URL, credentials, and model ID.

Decision models answer typed questions about shared input and return structured answers rather than generated text. In one request, you can ask a model to:

  • Estimate the probability that a condition is true with a predicate question

  • Select from supplied options with a choice question

  • Rate the input against an ordered rubric with a score question

Use these answers for tasks such as classification, routing, triage, and rubric-based scoring.

The endpoint works with any decision model on AI Gateway, including Jev, Liquid d1, and Laya. Use openai/gpt-6-luna-decisions for OpenAI’s GPT-6 Luna Decisions model. This is separate from openai/gpt-6-luna, which generates text.

With OpenAI SDK 7.30.0 or later for JavaScript or 3.26.0 or later for Python, point the client at AI Gateway and call decisions.create:

The response returns answers in question order, each with the corresponding question’s name.

See the OpenAI Decisions API documentation for Python and cURL examples. To use decision models with the AI SDK or /v1/evaluate, see the decision documentation.

Read more

來源:Vercel Blog · vercel.com