有佬友问咋用 我来个具体点例子吧
就是你要请求这个端点 然后描述你的问题 一般包括state,questions
然后questions可以包括多选题(choice),分数(score),真假题(noul)
然后你就可以把问题组织成下面的形式了 然后开玩!
PS: 虽然下面的例子都是严肃的问题,但是玩法^-^不止这点,只要能够设定为这样离散选项的都可以玩,比如说
- 给定一个网页的html作为state,然后你说要找到输入框,这样就变成了一个CUA(Computer Use Agent)问题,可以帮你自动搜索/买东西/甚至弄点gpt
- 给定游戏的内部state和操作(上下左右)就可以打游戏啦! ^-^
import requests
KEY = "sk-gl-你的key" # 从 keys_*.txt 里取一行
resp = requests.post(
"https://sub.nekopeer.com/v1/systemone",
headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
},
json={
"state": "客户三天没连上 Stripe,很着急,马上要丢单。",
"model": "jev-latest",
"questions": {
"department": {
"type": "choice",
"instructions": "哪个团队应该处理",
"criteria": {
"billing": "付款或订阅问题",
"technical": "Bug 或集成问题",
"sales": "价格或账号问题",
},
},
"frustration": {
"type": "score",
"instructions": "客户有多不满",
"criteria": [
"平静,只是陈述事实",
"不满但克制",
"非常生气,用词激烈",
],
},
"is_urgent": {
"type": "noul",
"instructions": "这条消息是否表达紧迫性或时间敏感",
},
},
},
timeout=60,
)
resp.raise_for_status()
print(resp.json())