TypeSafe·Jev

Jev

jev-latest · TypeSafe

TypeSafe的决策模型:给一段内容和一组带类型的问题,返回概率、选项和打分,每个都带置信度;只按输入token计费。

判断

接口

参数

改一个值,右边的请求就跟着变。

state*

状态 · 所有问题都针对这段内容:文字,或一段JSON。英文最准。

默认 "I was charged twice for my subscription this month. Please refund the extra charge."

questions*

问题 · JSON对象,键是问题名,值是一道题:noul(是/否,可带true / false判据)、choice(criteria为选项名到说明)、score(criteria为2–10个从低到高的等级)。答案按问题名返回。

默认 "{\n \"billing\": {\n \"type\": \"noul\",\n \"instructions\": \"Is this message about billing?\"\n },\n \"tone\": {\n \"type\": \"choice\",\n \"instructions\": \"What is the tone of this message?\",\n \"criteria\": {\n \"angry\": \"An upset or hostile message\",\n \"calm\": \"A neutral or polite message\",\n \"excited\": \"An enthusiastic or eager message\"\n }\n },\n \"urgency\": {\n \"type\": \"score\",\n \"instructions\": \"How urgent is this message?\",\n \"criteria\": [\n \"Can wait\",\n \"Needs attention this week\",\n \"Needs attention today\"\n ]\n }\n}"