
回答yes/no、选择、评分和工具题,内容包括文本、JSON、图片、视频和音频,最多可达100万个标记,并能判断输入中是否缺少答案。
回答yes/no、选择、评分和工具题,内容包括文本、JSON、图片、视频和音频,最多可达100万个标记,并能判断输入中是否缺少答案。
将状态和输入问题发送至 POST /v1/decisions.答案是带有置信值的概率;不生成文本。仅按输入令牌计费。
也称为 EmpirioLabs Aplomb 1
aplomb-1/v1/decisionsPOST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1beta/models/aplomb-1:generateContentaplombempiriolabs/aplomb-1empiriolabs/aplomb来自 EmpirioLabs 目录的实时按量计费价格。只为实际用量付费,没有月度最低消费。
Aplomb 1 通过 POST /v1/decisions 回答关于你的内容的问题。将内容放入 state,将问题放入 questions,连同模型 ID aplomb-1 一起发送。每个答案返回概率和置信度,而不是生成的文本。 在EmpirioLabs 控制台获取 API 密钥。
curl https://api.empiriolabs.ai/v1/decisions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "aplomb-1",
"state": "I was charged twice for my subscription this month. Please refund the duplicate charge today.",
"questions": {
"is_urgent": {"type": "noul", "instructions": "Does the customer need a resolution today?"},
"department": {
"type": "choice",
"instructions": "Which team should handle this message?",
"criteria": {"billing": null, "technical": null, "sales": null}
}
}
}'import requests
response = requests.post(
"https://api.empiriolabs.ai/v1/decisions",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
json={
"model": "aplomb-1",
"state": "I was charged twice for my subscription this month. Please refund the duplicate charge today.",
"questions": {
"is_urgent": {"type": "noul", "instructions": "Does the customer need a resolution today?"},
"department": {
"type": "choice",
"instructions": "Which team should handle this message?",
"criteria": {"billing": None, "technical": None, "sales": None},
},
},
},
)
answers = response.json()["answers"]
print(answers["is_urgent"]["noul"], answers["department"]["choice"])EmpirioLabs 上 Aplomb 1 API 支持的请求参数。省略字段时使用默认值。
| 参数 | 类型 | 默认值 | 范围 / 值 | 描述 |
|---|---|---|---|---|
| long_context | enum | fast | fast, full | 读取超过131,072个令牌的状态:快速(默认)回答需几秒,完整读取每个令牌。较短状态总是完整读取。 |
发送内容state(字符串、JSON 对象或数组)和 1 到 128 个问题,按 questions 到 POST /v1/decisions 发送。每个问题单独回答,带有概率和置信值。不生成任何文本。决策 API 指南记录了每个问题选项,其 聊天格式部分涵盖了通过 /v1/chat/completions、/v1/responses、/v1/messages 和 Gemini generateContent 的请求。
在noul、choice或score问题上加上"abstain": true,使模型表示该状态不包含该答案。答案随后包含abstain,即该结果的概率,其余部分假设该状态包含该答案。
基准测试结果见启动帖子。
仅输入代币:每个请求一次状态,每个问题的文本,以及每个媒体项目的代币。输出始终为零。
在 EmpirioLabs,Aplomb 1 按量计费。本页的实时价格表始终与 API 的实际计费一致。
Aplomb 1 支持 1M token 的上下文窗口。
兼容。Aplomb 1 提供 OpenAI 兼容的 Chat Completions API,现有 OpenAI SDK 只需把 base_url 指向 https://api.empiriolabs.ai/v1 并把模型 ID 设为 aplomb-1 即可使用。
可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 Aplomb 1,你可以在写代码之前先测试提示词。
创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。