fanchunke / chatgpt-wecom

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

0.1.5 获取企业微信access token时候报错 #44

Open vshen009 opened 1 year ago

vshen009 commented 1 year ago
    2023-03-10T07:25:49Z INFO   ../../../app/internal/api/receive.go:116 > [AgentId: 1000019] [UserId: SHEN] Start Send Wecom Response: 欢迎来到 ChatGPT,在这里您可以和我对话,我将尽我所能回答您的问题。如果想关闭会话,请回复“/restart”。

2023-03-10T07:25:49Z DEBUG  ../../../app/pkg/wecom/wecom.go:58 > [Request] URL: /cgi-bin/gettoken, Method: GET, Query: map[corpid:[XXXXX] corpsecret:[XXXXXX]], Form: map[], Body: <nil>, Headers: map[]

2023/03/10 07:25:54.269922 ERROR RESTY Get "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=XXXX&corpsecret=XXXXX": context deadline exceeded (Client.Timeout exceeded while awaiting headers), Attempt 1

在Get token 时候报错, 同样的参数在浏览器用get 可以看到正确的access token.

{"errcode":0,"errmsg":"ok","access_token":"-fuxLajhLWGmioaIxfWnpg3FpM552-hAsV4QU4kmwKCAbcGFsV3WVWCYAng","expires_in":7200}

vshen009 commented 1 year ago

补充,直接用二进制文件执行是成功的.