Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重连功能无法正常使用 #3

Open
Meeeeero opened this issue Jan 11, 2023 · 4 comments
Open

重连功能无法正常使用 #3

Meeeeero opened this issue Jan 11, 2023 · 4 comments

Comments

@Meeeeero
Copy link

CharacterAI 发送重连指令后虽然提示重连成功
但是再尝试聊天报错:

[Error]msgDistribute.go:179: 收取aiTalk回复失败,error: 消息发送时出现问题 {"abort": true, "error": "Chat Error - Please try again" }

消息数达到7,调用aiChat.Renew()后也出现同样情况

刷新后可以继续使用

@PICOF
Copy link
Owner

PICOF commented Jan 11, 2023

感谢反馈!可能是上次为了破解 characterAi 的反爬做相关修改时有所疏忽,我会尽快排查出问题并修正或给出具体原因,并推送至仓库

@PICOF
Copy link
Owner

PICOF commented Jan 12, 2023

@Meeeeero 昨天晚上抽空看了一下 characterAi 的接口,并重新测试了一遍,发现他们这次把用户 token 跟聊天绑定在一起了(貌似跟着反爬一起加的,上次太匆忙没来得及测),更换 guest 就直接报错,考虑改成使用官方账号,但是这就需要自己申请一个账号了,否则现在使用临时账号就只能聊7次QAQ

@Meeeeero
Copy link
Author

Meeeeero commented Jan 12, 2023

@PICOF 如果使用账号的话,可以参考 https://github.com/RichardDorian/node-character.ai 这个API的方法
access_token请求https://beta.character.ai/dj-rest-auth/auth0/,获取Headerauthorization的key
我试了下应该是能用的

@PICOF
Copy link
Owner

PICOF commented Jan 12, 2023

@Meeeeero 十分感谢您的宝贵建议和推荐!
不过事实上可以直接使用每次请求时 Header 中的 authorization 中的 Token 值,更方便找到而且也能正确验证身份~
(其实最大的理由应该是可以复用部分接口草)

1673511596611
1673511734260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants