lich0821 / wechatrobot Goto Github PK
View Code? Open in Web Editor NEW微信机器人,接入Gemini、ChatGPT、ChatGLM、讯飞星火、Tigerbot;成语接龙、天气预报、新闻摘要、定时任务。
License: MIT License
微信机器人,接入Gemini、ChatGPT、ChatGLM、讯飞星火、Tigerbot;成语接龙、天气预报、新闻摘要、定时任务。
License: MIT License
描述这个 bug
对 bug 作一个清晰简明的描述:
想做什么?
调用 wcfhttp 里面发送文本消息的 /text
接口。
现在怎么做?
这是我的数据格式
{
"msg": "689789 @",
"receiver": "xxxxx@chatroom",
"aters": "xxx1111"
}
遇到什么问题?
我上面返回的数据是 689789 @,我希望变成 689789 @张三
希望优化下 msg 发送的格式,你 py 里面 sendTextMsg 已经查询过群成员昵称了,是不是可以直接帮我拼接到 msg 里面,不然我还要自己再查询一次群成员昵称,拼接在 msg 后面,然后再调用 /text 接口
使用环境(请补全下列信息):
讯飞星火在为微信上并不能直接发出图片,只会返回一个图片链接或者叫图片文件,我想能不能实现直接显示图片
启动失败
[error] [WCF] [sdk.cpp::56::WxInitSDK] Failed to Inject DLL into WeChat
能否支持星火大模型多个账号同时运行,随即切换,增加容错率,省得被封号
微信版本太低,无法登陆.怎么解决?
现在微信已经是3.9.10,安装旧版本,扫码登陆提示版本太低.
感谢作者提供如此优秀的工具,请问能拿到微信客户端的二维码图片吗,还有能解密OpenIMContact.db吗,企业微信来的消息或人员获取还有点问题
描述这个 bug
对 bug 作一个清晰简明的描述:运行python main.py时提示连接失败
python main.py
2024-05-29 14:14:58 wcferry version: 39.0.14.1
2024-05-29 14:15:02 连接失败: Connection refused
使用环境(请补全下列信息):
屏幕截图
添加屏幕截图以帮助解释您的问题。(可选)
你希望添加的功能是否与某个问题相关?
当 [我接收到机器人发送的视频] 时,点开视频总是压缩画质,需要点击“查看原视频”,很不方便。
描述你希望的解决方案
单独设置变量控制是否勾选原画,或者不切实际一点,直接发送原画,但接收方不显示“查看原视频”(将原画视频替换掉压缩视频后发送?)
描述你考虑的替代方案
直接发送压缩后的视频,即不勾选原画。
其他
不小心直接关闭而不是Crtl + c
已经没法用了。请问一下该如何使用
chatglm3代码模式,生成了爱心,但结果图片没有发送到微信,只提示:这就是一个爱心形状的图形。希望你会喜欢!如果你有其他要求或需要进一步的调整,请告诉我。
这是为什么?我看了目录也生成了照片,就是没有回复到微信中。
请大神指点。
感谢回答
描述这个 bug
对 bug 作一个清晰简明的描述:
使用环境(请补全下列信息):
运行一段时候后,不打印这个日志了
def enableReceivingMsg(self) -> None:
def innerProcessMsg(wcf: Wcf):
while wcf.is_receiving_msg():
now_time = str(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
print(f"{now_time}【等待消息】************************")
try:
msg = wcf.get_msg()
if msg.roomid and msg.roomid not in self.config.GROUPS:
self.all_room.update({msg.roomid: "未知"})
with open("room/all_room.json", "w") as f:
f.write(json.dumps(self.all_room))
return
self.LOG.info(f"msg:roomid: {msg.roomid}, sender: {msg.sender}, content: {msg.content}")
flag = self.baseFunc.manage_command(msg, self) # 首先执行管理指令
self.LOG.info(f"【管理指令】是否是管理执行指令 {flag}")
if not flag:
self.processMsg(msg)
# self.processMsg(msg)
except Empty:
now_time = str(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
print(f"{now_time}【空消息】!!!!!!!!!!!!!! ")
continue # Empty message
except Exception as e:
traceback.print_exc()
self.LOG.error(f"Receiving message error: {e}")
self.wcf.enable_receiving_msg()
Thread(target=innerProcessMsg, name="GetMessage", args=(self.wcf,), daemon=True).start()
最开始就发现这个问题,然后在群里也有其他人遇到,群友他自己 print 打印日志后就咩有这个问题,但是我依旧存在这个问题
然后我就想看看运行的多线程情况,如下图
图上半截是正常运行的,下半截是不接受消息时的,线程丢失了
这个项目只支持windows系统吗?
如果我想接入chatgpt,该如何去抓取我账号里的那些参数
可不可以直接用本地的电脑开启v2使用国外的代理,然后不填proxy的参数啊
描述这个 bug
对 bug 作一个清晰简明的描述。
使用环境(请补全下列信息):
当别人艾特尔我的时候
wcf.get_self_wxid()获取到的为当前微信号
而wcf_pb2.WxMsg里获取到的sender=我之前的微信号
描述这个 bug
微信3.7.0.30,登录后,执行python main.py,微信崩溃退出。试过几次都是崩溃。
使用环境(请补全下列信息):
崩溃信息
请见附件
*另外,在win11上第一次运行崩溃退出,再次运行却可以了。以下是win10出错时系统自动给出的log文件
描述这个 bug
对 bug 作一个清晰简明的描述。
使用环境(请补全下列信息):
屏幕截图
添加屏幕截图以帮助解释您的问题。(可选)
崩溃信息
微信崩溃原因描述文件内容。(可选)
想进群学习,老兄。
描述这个 bug
对 bug 作一个清晰简明的描述:
这个bug来自于Google Gemini模型,它并没有正确的识别到提示词,它认为“我是 Gemini,是 Google 开发的多模态 AI 语言模型。”
我在提示词的地方正确设置了,可是它似乎没有正确的生效?
具体可以查看屏幕截图
如果需要作者可以联系我[email protected]
使用环境(请补全下列信息):
使用环境(请补全下列信息):
描述这个 bug
google gemini的API接口调用失败
Traceback (most recent call last):
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\api_core\grpc_helpers.py", line 79, in error_remapped_callable
return callable_(*args, **kwargs)
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\grpc_channel.py", line 1160, in call
return _end_unary_response_blocking(state, call, False, None)
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\grpc_channel.py", line 1003, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:172.217.160.106:443: socket is null"
debug_error_string = "UNKNOWN:Error received from peer {created_time:"2023-12-16T00:55:14.7024441+00:00", grpc_status:14, grpc_message:"failed to connect to all addresses; last error: UNKNOWN: ipv4:172.217.160.106:443: socket is null"}"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\api_core\retry.py", line 207, in retry_target
result = target()
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\api_core\timeout.py", line 120, in func_with_timeout
return func(*args, **kwargs)
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\api_core\grpc_helpers.py", line 81, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.ServiceUnavailable: 503 failed to connect to all addresses; last error: UNKNOWN: ipv4:172.217.160.106:443: socket is null
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Python\wechat\new\WeChatRobot\test_gemini.py", line 9, in
response = model.generate_content("The opposite of hot is")
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\generativeai\generative_models.py", line 243, in generate_content
response = self._client.generate_content(request)
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\ai\generativelanguage_v1beta\services\generative_service\client.py", line 566, in generate_content
response = rpc(
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\api_core\gapic_v1\method.py", line 131, in call
return wrapped_func(*args, **kwargs)
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\api_core\retry.py", line 372, in retry_wrapped_func
return retry_target(
File "D:\Python\wechat\new\WeChatRobot\venv\lib\site-packages\google\api_core\retry.py", line 226, in retry_target
raise exceptions.RetryError(
google.api_core.exceptions.RetryError: Deadline of 60.0s exceeded while calling target function, last exception: 503 failed to connect to all addresses; last error: UNKNOWN: ipv4:172.217.160.106:443: socket is null
例如我希望使用3.5-turbo-16k,或者gpt4的接口,但是默认他调用的模型太老了,数据仅停留在2020年
描述这个 bug
对 bug 作一个清晰简明的描述。
使用环境(请补全下列信息):
屏幕截图
添加屏幕截图以帮助解释您的问题。(可选)
崩溃信息
微信崩溃原因描述文件内容。(可选)
工作日定时发送自定义消息的功能。
还有请问下,为什么天气预报功能不能正常使用(时间不对),是因为我接入的是chatgpt3.5吗? 如果要正常使用是不是需要接入chatgpt4.0?
如果只想针对某一个群发送信息应该怎么操作啊,应该怎么只对特定群的消息进行处理呢
描述你希望的解决方案
希望机器人可以接收图片或视频,另外是否可以控制机器人发送图片和视频时选择原图发送
1.如何让机器人撤回
2.如何让机器人防止其他人撤回
希望大佬指点一下
旧版open ai软件包不能
连接图片制作
问题背景: 在管理用户请求的系统中,某些用户可能因为各种原因需要被临时或永久屏蔽对话请求。比如,滥用服务、发送垃圾信息等行为。目前,系统缺乏直接通过用户的微信ID来快速屏蔽对话请求的功能。
期望的解决方案: 实现一个功能,让管理员或系统维护者能通过添加用户的微信ID到一个黑名单中,来自动屏蔽或忽略这些用户的对话请求。这个功能应该包括:
一个界面或命令行工具,用于输入需要屏蔽的用户wxid。
一个黑名单数据库或列表,存储被屏蔽用户的wxid。
一个逻辑判断机制,在接收到用户请求时检查其wxid是否在黑名单中。
如果用户的wxid在黑名单中,则自动忽略或拒绝其对话请求,可能伴随一条通知消息告知用户。
考虑的替代方案:
基于用户行为的自动屏蔽: 系统根据用户的行为自动判断是否需要屏蔽,如发送消息频率、内容质量等指标。
举报机制: 允许其他用户举报不当行为,当举报达到一定数量时自动触发屏蔽逻辑。
时间限制屏蔽: 不是永久屏蔽用户wxid,而是给予一定时间的禁言或屏蔽,过后自动解除。
描述这个 bug
对 bug 作一个清晰简明的描述。
群里直接拷贝@消息后发送,processMsg函数中调用msg.is_at(self.wxid)接口识别为非群@消息。
使用环境(请补全下列信息):
屏幕截图
添加屏幕截图以帮助解释您的问题。(可选)
崩溃信息
微信崩溃原因描述文件内容。(可选)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.