1.从 kimi.moonshot.cn 获取refresh_token
进入kimi随便发起一个对话,然后F12打开开发者工具,从Application > Local Storage中找到refresh_token的值,这将作为Authorization的Bearer Token值:Authorization: Bearer TOKEN
得到key eyJhbGciOiJIUzUxMiIsInR5cCI6Ik...ZA
2.启动kimi服务
下载:· ChatGPTNextWeb/ChatGPT-Next-Web --- Releases · ChatGPTNextWeb/ChatGPT-Next-Web (github.com)
在D:\BaiduNetdiskWorkspace\慧实集团_工作\下载\kimi-free-api-master\kimi-free-api-master路径下打开终端
安装依赖
npm i
安装PM2进行进程守护
npm i -g pm2
编译构建,看到dist目录就是构建完成
npm run build
启动服务
pm2 start dist/index.js --name "kimi-free-api"
set-ExecutionPolicy RemoteSigned
3.对接第三方客户端:chatgpt-next-web
docker pull yidadaa/chatgpt-next-web
docker run -d -p 3000:3000 -e OPENAI_API_KEY="Authorization: Bearer eyJhbGcxxxB9pyZA" -e CODE= yidadaa/chatgpt-next-web
打开网页:http://localhost:3000/#/settings
输入key:yJhbGciOi...ZA、自定义模型为kimi、服务器地址输入:http://localhost:8000/
退出到聊天窗口,并且选择模型为kimi
参考
白嫖kimi项目地址