Giter Site home page Giter Site logo

wechat-chatgpt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wechat-chatgpt's Issues

编译后运行项目,访问127.0.0.1:7458提示404 Page not found

如题,我已经在config.json中填好了session-token和cf_clearance,并用提供的命令(替换了微信Token)进行编译,但运行起来之后访问接口提示404 Page not found.

curl 127.0.0.1:7458 404 page not found

此时服务端的日志如下:

INFO[2022-12-13 18:57:14] Server listening at [::]:7458 INFO[2022-12-13 19:00:31] "GET http://127.0.0.1:7458/ HTTP/1.1" from 127.0.0.1:37668 - 404 19B in 18.37µs

请问可能是哪里出了问题?

在本机启动该程序是不是就不用想办法获取cf_clearance了?

我的思路是这样的: 本机启动程序, 然后session-token, cf_clearance, user-agent3个值都直接通过浏览器复制过来, 再通过内网穿透工具提供给微信开放平台调用, 实际也都配置成功了, 但是调用的时候还是不行, 报错见下图:
image
好像还是 cf_clearance这里出错了, 然后程序就退出了
是这种方式不行么, 还是那里配置错了? 求解答

接收消息时报错

1670900791685
其中xml这一段是收到的消息体,byte数组打印是在SendMsg函数中convert.ToChatRes(endBlock)打印的endBlock参数

Mac 系统遇到一些初始化错误

当我在 sessionToken 中增加 __Secure-next-auth.session-token 后,运行出现错误
错误代码如下:

$ go run main.go
2022/12/09 16:45:16 net/http: invalid byte '\n' in Cookie.Value; dropping invalid bytes
INFO[2022-12-09 16:45:16] Server listening at [::]:7458
panic: interface conversion: interface {} is nil, not string

goroutine 6 [running]:
wx-ChatGPT/chatGPT.(*ChatGPT).updateSessionToken(0xc000024520)
/Users/li/chatGPT/wechat-chatGPT/chatGPT/chatGPT.go:83 +0x525
wx-ChatGPT/chatGPT.newChatGPT.func1()
/Users/li/chatGPT/wechat-chatGPT/chatGPT/chatGPT.go:45 +0x25
created by wx-ChatGPT/chatGPT.newChatGPT
/Users/li/chatGPT/wechat-chatGPT/chatGPT/chatGPT.go:44 +0xef
exit status 2

请求超时,导致服务自动退出

目前已经能正常开启对话,但仅能建立握手信息,提出问题就会超时。

INFO[2022-12-13 23:09:16] 用户 ogY6UuP9-yMo-VAyj4zlyBvYrOLY 启动新的对话
INFO[2022-12-13 23:09:21] [消息接收] Type: text, From: ogY6UuP9-yMo-VAyj4zlyBvYrOLY, MsgId: 23922168065204906, Content: 你好
INFO[2022-12-13 23:09:26] [消息接收] Type: text, From: ogY6UuP9-yMo-VAyj4zlyBvYrOLY, MsgId: 23922168065204906, Content: 你好
INFO[2022-12-13 23:09:28] "POST http://shenjia.de/weChatGPT?signature=c23ca0374ab7c05c78c7dc8be414eaacd7951638&timestamp=1670944156&nonce=364379646&openid=ogY6UuP9-yMo-VAyj4zlyBvYrOLY HTTP/1.1" from 127.0.0.1:42182 - 200 342B in 11.500110323s
INFO[2022-12-13 23:09:28] "POST http://shenjia.de/weChatGPT?signature=c23ca0374ab7c05c78c7dc8be414eaacd7951638&timestamp=1670944156&nonce=364379646&openid=ogY6UuP9-yMo-VAyj4zlyBvYrOLY HTTP/1.1" from 127.0.0.1:43854 - 200 342B in 1.417098614s
INFO[2022-12-13 23:09:28] "POST http://shenjia.de/weChatGPT?signature=c23ca0374ab7c05c78c7dc8be414eaacd7951638&timestamp=1670944156&nonce=364379646&openid=ogY6UuP9-yMo-VAyj4zlyBvYrOLY HTTP/1.1" from 127.0.0.1:43850 - 200 342B in 6.427933569s
INFO[2022-12-13 23:09:45] [消息接收] Type: text, From: ogY6UuP9-yMo-VAyj4zlyBvYrOLY, MsgId: 23922167016461479, Content: 为什么你的请求总超时?
INFO[2022-12-13 23:09:45] 用户 ogY6UuP9-yMo-VAyj4zlyBvYrOLY 继续对话
INFO[2022-12-13 23:09:50] [消息接收] Type: text, From: ogY6UuP9-yMo-VAyj4zlyBvYrOLY, MsgId: 23922167016461479, Content: 为什么你的请求总超时?
INFO[2022-12-13 23:09:55] [消息接收] Type: text, From: ogY6UuP9-yMo-VAyj4zlyBvYrOLY, MsgId: 23922167016461479, Content: 为什么你的请求总超时?
panic: context canceled

goroutine 27 [running]:
wxChatGPT/chatGPT/handler.(*UserInfo).SendMsg(0xc0003db700, {0x8051d8, 0xc000059980}, {0xc000259200, 0x45f}, 0xc000079b30, {0xc00045b6e0?, 0x0?})
/root/wechat-chatGPT/chatGPT/handler/userHandler.go:58 +0x678
wxChatGPT/chatGPT.(*ChatGPT).SendMsg(0xc000012468, {0xc00045b6e0, 0x21}, {0xc0001748c0, 0x1c}, {0x8051d8, 0xc000059980})
/root/wechat-chatGPT/chatGPT/chatGPT.go:119 +0x22f
wxChatGPT/chatGPT.(*ChatGPT).SendMsgChan.func1()
/root/wechat-chatGPT/chatGPT/chatGPT.go:102 +0x3e
created by wxChatGPT/chatGPT.(*ChatGPT).SendMsgChan
/root/wechat-chatGPT/chatGPT/chatGPT.go:101 +0x12e
exit status 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.