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

linkai文档识别功能,群聊中无法命令开启 #1952

Closed
2 tasks done
13860605362 opened this issue May 9, 2024 · 3 comments
Closed
2 tasks done

linkai文档识别功能,群聊中无法命令开启 #1952

13860605362 opened this issue May 9, 2024 · 3 comments

Comments

@13860605362
Copy link

前置确认

  • 我确认我运行的是最新版本的代码,并且安装了所需的依赖,在FAQS中也未找到类似问题。

⚠️ 搜索issues中是否已存在类似问题

  • 我已经搜索过issues和disscussions,没有跟我遇到的问题相关的issue

操作系统类型?

Docker

运行的python版本是?

python 3.7

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

插件config.json中,linkai下summary的group_enabled设置false,群聊中无法通过命令行开启文章总结。

问题描述 😯

当group_enabled=true,则默认开启群聊对话,可以通过$linkai sum close关闭$linkai sum open开启文章总结。
但是group_enabled=false,则默认关闭群聊对话,输入命令行后正常提示文章总结开启/关闭,但实际任为关闭状态。
我不知道这是bug还是就是这样设计,但我觉得既然有命令用以开启/关闭,就不必因config.json中填false对其限制。
我需要他默认关闭,以防影响正常发文件图片,仅在需要时开启。目前仅设置为true才可使用,但当我重启项目之后则需要对所有群聊发送$linkai sum close以防止正常交流。

还有一点,在群聊中即使配置group_enabled=true,图片依然无法识别,而私聊则一切正常

终端日志 📒

<[INFO][2024-05-09 20:33:57][bridge.py:59] - create bot linkai for chat
[INFO][2024-05-09 20:33:57][wechat_channel.py:217] - [WX] sendMsg=Reply(type=INFO, content=[INFO]
认证成功), receiver=@46ba55edf2c8548def1b8772ffb530cd
[INFO][2024-05-09 20:34:11][chat_channel.py:117] - [WX]receive group at
[INFO][2024-05-09 20:34:11][wechat_channel.py:55] - Wechat message 3456438551725719616 already received, ignore
[INFO][2024-05-09 20:34:11][wechat_channel.py:55] - Wechat message 3456438551725719616 already received, ignore
[INFO][2024-05-09 20:34:11][wechat_channel.py:217] - [WX] sendMsg=Reply(type=INFO, content=[INFO]
文章总结功能开启), receiver=@@e3540671d0ce6ca074da3c6bb98e09daeaded994c32f1631008a0ff5879bb54a
[INFO][2024-05-09 20:34:19][wechat_channel.py:55] - Wechat message 2683481841383670645 already received, ignore
[INFO][2024-05-09 20:34:19][wechat_channel.py:55] - Wechat message 2683481841383670645 already received, ignore
[INFO][2024-05-09 20:35:06][wechat_channel.py:55] - Wechat message 5403449057788237871 already received, ignore
[INFO][2024-05-09 20:35:06][wechat_channel.py:55] - Wechat message 5403449057788237871 already received, ignore
>
@13860605362
Copy link
Author

<Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 537, in _make_request
    response = conn.getresponse()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 466, in getresponse
    httplib_response = super().getresponse()
  File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse
    response.begin()
  File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 470, in increment
    raise reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/util.py", line 38, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 537, in _make_request
    response = conn.getresponse()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 466, in getresponse
    httplib_response = super().getresponse()
  File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse
    response.begin()
  File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/lib/itchat/components/login.py", line 301, in maintain_loop
    msgList, contactList = self.get_msg()
  File "/app/lib/itchat/components/login.py", line 390, in get_msg
    r = self.s.post(url, data=json.dumps(data),
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 637, in post
    return self.request("POST", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 501, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

[INFO][2024-05-14 19:29:55][wechat_channel.py:55] - Wechat message 4354407905525412130 already received, ignore>

@6vision
Copy link
Collaborator

6vision commented May 22, 2024

不是不生效,看起来是网络问题,可以更新项目到最新,降低了国内网络访问的时延

@6vision 6vision closed this as completed May 22, 2024
@13860605362
Copy link
Author

不是不生效,看起来是网络问题,可以更新项目到最新,降低了国内网络访问的时延

我已经更新到最新版,结果还是一样,当"group_enabled": true时,可以正常使用,并且后续可以通过$linkai sum close关闭$linkai sum open开启文章总结。
但是当"group_enabled": false时,通过以上命令开启/关闭,机器人会有回复
[INFO]
文章总结功能开启
但实际并无效果。

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

No branches or pull requests

2 participants