koishijs / chatgpt-bot

AI conversation based on ChatGPT | 基于 ChatGPT 的 AI 对话机器人
https://chatgpt.koishi.chat
MIT License
70 stars 13 forks source link

fix: extra endpoint arguments cause ENOTFOUND #31

Closed Seidko closed 1 year ago

Seidko commented 1 year ago

https://github.com/koishijs/chatgpt-bot/blob/38354f1adfc1d556368b2d05c894683ed4e0b95b/src/api.ts#L24-L27

L25 这里已经通过 configendpoint 传进去了

https://github.com/satorijs/satori/blob/1a7cddfade8aecd13707bd8b1ec2f907ba6d6f67/packages/axios/src/index.ts#L154

cordis-axios 这里也使用了 L25 传入的 endpoint

https://github.com/koishijs/chatgpt-bot/blob/38354f1adfc1d556368b2d05c894683ed4e0b95b/src/api.ts#L71 https://github.com/koishijs/chatgpt-bot/blob/38354f1adfc1d556368b2d05c894683ed4e0b95b/src/api.ts#L151

这里的this._endpoint +是完全多余的,导致host被识别成了 chat.openai.comhttps

shigma commented 1 year ago

已发布 1.3.2

MaikoTan commented 1 year ago

gook good to me, danke