LLM-Red-Team / kimi-free-api

🚀 KIMI AI 长文本大模型逆向API白嫖测试【特长:长文本解读整理】,支持高速流式输出、智能体对话、联网搜索、长文档解读、图像OCR、多轮对话,零配置部署,多路token支持,自动清理会话痕迹。
https://udify.app/chat/Po0F6BMJ15q5vu2P
GNU General Public License v3.0
3.74k stars 609 forks source link

api无法使用 #108

Closed Coolllh closed 5 months ago

Coolllh commented 5 months ago

我使用axios报{"code":-2001,"message":"请求失败","data":null}这个错误 使用httpclient和postman报Response content: {"code":-2000,"message":"Params body.messages invalid","data":null} 很奇怪

8efd77add3cb29c41d1033976a96a72

8ad3c5838e144ec4c5d1243f6fd9924

Vinlic commented 5 months ago
  1. 请求失败,查看日志确认还有确认refresh token是否可用
  2. 代表传送的不是json数据,或者数据缺失,或者content type不为application/json。
Coolllh commented 5 months ago

我的token和在https://kimi.moonshot.cn/chat/cpask2g967u5orrdimt0上面获取到的token是一样的

Coolllh commented 5 months ago
at checkResult (file:///app/dist/index.js:1581:11)
at createConversation (file:///app/dist/index.js:1219:7)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///app/dist/index.js:1266:68
at async /completions (file:///app/dist/index.js:1779:16) {

errcode: -2001, errmsg: '请求失败', data: undefined, httpStatusCode: undefined } [2024-05-28 20:42:06.028][info][index<983,30>] <- POST /v1/chat/completions 15853ms日志是这样的

Coolllh commented 5 months ago

不过我用check查询token是否可用得到的结果都是false

Vinlic commented 5 months ago

可以确认是refresh_token不正确,检查下refresh_token取值,取的位置是否正确

Coolllh commented 5 months ago

我是在这里取的token image

Vinlic commented 5 months ago

不是这里,查看文档,文档里有取的方法。

Coolllh commented 5 months ago

解决了!

Coolllh commented 5 months ago

Response content: {"code":-1000,"message":"Unexpected token 'm', \"[model=kimi\"... is not valid JSON","data":null} java我在使用fastjson和org.json库的时候都出现了这个问题,这应该如何解决