浏览 EmpirioLabs 提供的决策模型模型,并通过一个按量计费的 API 调用它们。
Aplomb 1 通过 POST /v1/decisions 回答关于你的内容的问题。将内容放入 state,将问题放入 questions,连同模型 ID aplomb-1 一起发送。每个答案返回概率和置信度,而不是生成的文本。 可以把 model ID 换成上面的任意模型。 在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}
}
}
}'EmpirioLabs 列出了2 决策模型模型 API(包括 Aplomb 1, Aplomb 1 Omni)。每个模型都有自己的 API 页面,包含实时价格、参数和快速上手。
每个决策模型模型都按量计费,没有月度最低消费。准确的价格表在各模型页面上,并且始终与 API 的实际计费一致。
不需要。这里的每个模型都能在EmpirioLabs Playground中运行,那是一个友好的浏览器界面,不写代码就能设置选项并查看结果。需要自动化时,同一个模型也可以通过 API 使用。