
回答是或否、选择、评分以及关于文本、JSON、图片、视频和音频的工具问题,能读取最多100万个token,并且能在答案不存在时说出来。
回答是或否、选择、评分以及关于文本、JSON、图片、视频和音频的工具问题,能读取最多100万个token,并且能在答案不存在时说出来。
将状态和输入问题发送至 POST /v1/decisions.答案是带有置信值的概率;不生成文本。仅按输入令牌计费。
也称为 EmpirioLabs Aplomb
aplomb/v1/decisionsempiriolabs/aplomb来自 EmpirioLabs 目录的实时按量计费价格。只为实际用量付费,没有月度最低消费。
Aplomb 通过 POST /v1/decisions 回答关于你的内容的问题。将内容放入 state,将问题放入 questions,连同模型 ID aplomb 一起发送。每个答案返回概率和置信度,而不是生成的文本。 在EmpirioLabs 控制台获取 API 密钥。
curl https://api.empiriolabs.ai/v1/decisions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "aplomb",
"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",
"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"])请求 发送内容(字符串、JSON 对象或数组)state,以及 1 到 128 个问题,按 questions 到 POST /v1/decisions 次。每个问题单独回答,并有概率和置信度值。不生成文本。问题类型- noul:是或否,按概率回答是。- choice:2 到 255 个选项之一,回答所选选项和完整分布。- score:2 到 10 个有序层级,回答期望层级和分布。- tool:调用 1 到 254 种函数工具中的哪一个,包含其枚举和布尔参数的分布。不在状态中 在noul、choice或 questions 0__问题后添加"abstain": true,使模型表示状态中不包含答案。答案随后包含 questions 1__,即该结果的概率,其余部分假设状态包含该答案。限制- 状态加最长问题:最多1,000,000个令牌。- 每个请求最多512个评估问题。工具问题计为每个枚举或布尔参数加一加一。- 媒体:最多16张图片(每个20 MB),8个音频片段(每个25 MB,每段10分钟),4个视频(每段100 MB,10分钟),作为公开的 HTTPS URL 或内联 base64。计费 仅输入令牌:每个请求一次状态,每个问题的文本,以及每个媒体项目的令牌。输出始终为零。
在 EmpirioLabs,Aplomb 按量计费。本页的实时价格表始终与 API 的实际计费一致。
Aplomb 支持 1M token 的上下文窗口。
Aplomb 通过 api.empiriolabs.ai 上的 POST /v1/decisions 提供,使用标准的 Bearer 令牌认证。
可以。EmpirioLabs Playground在浏览器中以与 API 相同的参数运行 Aplomb,你可以在写代码之前先测试提示词。
创建 EmpirioLabs 账户,然后在控制台的 API Keys生成密钥。计费使用按量付费的额度,只为实际发出的请求付费。