fanchunke / chatgpt-wecom

企业微信接入 GPT3
MIT License
352 stars 98 forks source link

gpt-3.5版本gpt返回企业微信返回失败 #42

Closed eeezae closed 1 year ago

eeezae commented 1 year ago

引用:https://github.com/fanchunke/chatgpt-wecom/issues/10

[GIN] 2023/03/09 - 08:45:10 | 404 |     555.801µs |   54.249.18.254 | POST     "/wecom/receive/v2/cgi-bin/message/send?access_token="
2023-03-09T08:45:10Z DEBUG  ../../Users/fanchunke/workspace/chatgpt/chatgpt-wecom/pkg/wecom/wecom.go:69 > [Response] Status: 404, Body: 404 page not found, Headers; map[Connection:[keep-alive] Content-Length:[18] Content-Type:[text/plain] Date:[Thu, 09 Mar 2023 08:45:10 GMT] Server:[nginx/1.18.0] X-Request-Id:[cg4pp5hlg1eth8fn8qig]]
2023/03/09 08:45:10.682357 ERROR RESTY 请求失败, Attempt 1
2023-03-09T08:45:10Z ERROR  ../../Users/fanchunke/workspace/chatgpt/chatgpt-wecom/pkg/wecom/wecom.go:92 > 请求失败 error="请求失败"
2023-03-09T08:45:10Z ERROR  ../../Users/fanchunke/workspace/chatgpt/chatgpt-wecom/internal/api/receive.go:83 > Send Wecom Response error: Send Wecom Message failed: 请求失败 error="Send Wecom Message failed: 请求失败"
2023/03/09 08:45:10 Send Wecom Message failed: 请求失败
eeezae commented 1 year ago

发送消息成功,数据库有记录,openai有返回,但是企业微信无法收到消息

eeezae commented 1 year ago

URL无论是使用conf原有配置还是gpt-3.5配置都是404

text-davinci-003 版本:http://ip:port/wecom/receive
gpt-3.5-turbo 版本:http://ip:port/wecom/receive/v2
eeezae commented 1 year ago

使用text-davinci-003原有配置返回

[GIN] 2023/03/09 - 08:49:51 | 404 |      509.07µs |   54.249.18.254 | POST     "/wecom/receive/cgi-bin/message/send?access_token="
2023-03-09T08:49:51Z DEBUG  ../../Users/fanchunke/workspace/chatgpt/chatgpt-wecom/pkg/wecom/wecom.go:69 > [Response] Status: 404, Body: 404 page not found, Headers; map[Connection:[keep-alive] Content-Length:[18] Content-Type:[text/plain] Date:[Thu, 09 Mar 2023 08:49:51 GMT] Server:[nginx/1.18.0] X-Request-Id:[cg4prbplg1ethr3n79d0]]
2023/03/09 08:49:51.453521 ERROR RESTY 请求失败, Attempt 1
2023-03-09T08:49:51Z ERROR  ../../Users/fanchunke/workspace/chatgpt/chatgpt-wecom/pkg/wecom/wecom.go:92 > 请求失败 error="请求失败"
2023-03-09T08:49:51Z ERROR  ../../Users/fanchunke/workspace/chatgpt/chatgpt-wecom/internal/api/receive.go:83 > Send Wecom Response error: Send Wecom Message failed: 请求失败 error="Send Wecom Message failed: 请求失败"
2023/03/09 08:49:51 Send Wecom Message failed: 请求失败
fanchunke commented 1 year ago

@eeezae /wecom/receive/v2 这个路径是配置在企业微信消息接收上的。给企业微信发消息的地址是 https://qyapi.weixin.qq.com,不要更改这个地址

eeezae commented 1 year ago

谢谢,已解决!