fanchunke / chatgpt-wecom

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

数据库内已看到对话记录,但企业微信内没有返回消息。 #10

Closed Jas0nxlee closed 1 year ago

Jas0nxlee commented 1 year ago

数据库内已看到对话记录,但企业微信内没有返回消息。

GeFengJue commented 1 year ago

我也遇到了这个问题

Jas0nxlee commented 1 year ago

我也遇到了这个问题

我已经解决了,注意检查以下内容:

企业微信应用配置 corp_id:在企业微信后台【我的企业】-【企业信息】处获取【企业ID】 corp_secret:在企业微信后台【应用管理】处获取【Secret】 agent_id:在企业微信后台【应用管理】处获取【AgentId】 encoding_aes_key:企业微信后台 【接收消息】- 【API 接收消息】获取【EncodingAESKey】,可以随机生成 token:企业微信后台 【接收消息】- 【API 接收消息】获取【Token】,可以随机生成

fanchunke commented 1 year ago

@GeFengJue 现在解决了吗?如果没有解决,可以把日志发出来看看。

infoBrainSys commented 1 year ago

@GeFengJue 现在解决了吗?如果没有解决,可以把日志发出来看看。

[GIN] 2023/02/20 - 13:28:37 | 404 | 2.246837ms | 124.223.204.128 | POST "/wecom/receive/cgi-bin/message/send?access_token=" 2023-02-20T13:28:37Z DEBUG ../../../app/internal/middleware/logger.go:154 > 返回响应 duration=2.110211 method=POST requestId=cfpnb1fkpq5j5o9dsp4g response= status=404 url=/wecom/receive/cgi-bin/message/send?access_token= 2023-02-20T13:28:37Z DEBUG ../../../app/pkg/wecom/wecom.go:69 > [Response] Status: 404, Body: 404 page not found, Headers; map[Content-Length:[18] Content-Type:[text/plain] Date:[Mon, 20 Feb 2023 13:28:37 GMT] Server:[nginx] X-Request-Id:[cfpnb1fkpq5j5o9dsp4g]] 2023/02/20 13:28:37.776192 ERROR RESTY 请求失败, Attempt 1 2023-02-20T13:28:37Z ERROR ../../../app/pkg/wecom/wecom.go:92 > 请求失败 error="请求失败" 2023-02-20T13:28:37Z ERROR ../../../app/internal/api/receive.go:43 > Get GPT Response error: Send Lark Message failed: 请求失败 error="Send Lark Message failed: 请求失败"

fanchunke commented 1 year ago

@GeFengJue 现在解决了吗?如果没有解决,可以把日志发出来看看。

[GIN] 2023/02/20 - 13:28:37 | 404 | 2.246837ms | 124.223.204.128 | POST "/wecom/receive/cgi-bin/message/send?access_token=" 2023-02-20T13:28:37Z DEBUG ../../../app/internal/middleware/logger.go:154 > 返回响应 duration=2.110211 method=POST requestId=cfpnb1fkpq5j5o9dsp4g response= status=404 url=/wecom/receive/cgi-bin/message/send?access_token= 2023-02-20T13:28:37Z DEBUG ../../../app/pkg/wecom/wecom.go:69 > [Response] Status: 404, Body: 404 page not found, Headers; map[Content-Length:[18] Content-Type:[text/plain] Date:[Mon, 20 Feb 2023 13:28:37 GMT] Server:[nginx] X-Request-Id:[cfpnb1fkpq5j5o9dsp4g]] 2023/02/20 13:28:37.776192 ERROR RESTY 请求失败, Attempt 1 2023-02-20T13:28:37Z ERROR ../../../app/pkg/wecom/wecom.go:92 > 请求失败 error="请求失败" 2023-02-20T13:28:37Z ERROR ../../../app/internal/api/receive.go:43 > Get GPT Response error: Send Lark Message failed: 请求失败 error="Send Lark Message failed: 请求失败"

@infoBrainSys 看企业微信接口的请求地址,你应该是修改过配置文件里企业微信的url吧,配置文件里企业微信的地址保持不变就可以了。

infoBrainSys commented 1 year ago

@GeFengJue 现在解决了吗?如果没有解决,可以把日志发出来看看。

[GIN] 2023/02/20 - 13:28:37 | 404 | 2.246837ms | 124.223.204.128 | POST "/wecom/receive/cgi-bin/message/send?access_token=" 2023-02-20T13:28:37Z DEBUG ../../../app/internal/middleware/logger.go:154 > 返回响应 duration=2.110211 method=POST requestId=cfpnb1fkpq5j5o9dsp4g response= status=404 url=/wecom/receive/cgi-bin/message/send?access_token= 2023-02-20T13:28:37Z DEBUG ../../../app/pkg/wecom/wecom.go:69 > [Response] Status: 404, Body: 404 page not found, Headers; map[Content-Length:[18] Content-Type:[text/plain] Date:[Mon, 20 Feb 2023 13:28:37 GMT] Server:[nginx] X-Request-Id:[cfpnb1fkpq5j5o9dsp4g]] 2023/02/20 13:28:37.776192 ERROR RESTY 请求失败, Attempt 1 2023-02-20T13:28:37Z ERROR ../../../app/pkg/wecom/wecom.go:92 > 请求失败 error="请求失败" 2023-02-20T13:28:37Z ERROR ../../../app/internal/api/receive.go:43 > Get GPT Response error: Send Lark Message failed: 请求失败 error="Send Lark Message failed: 请求失败"

@infoBrainSys 看企业微信接口的请求地址,你应该是修改过配置文件里企业微信的url吧,配置文件里企业微信的地址保持不变就可以了。

已解决!