mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
refactor: remove unavailable channels
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
```
|
||||
|
||||
- `isgroup`: `Context`是否是群聊消息。
|
||||
- `msg`: `itchat`中原始的消息对象。
|
||||
- `msg`: the original message object from the channel.
|
||||
- `receiver`: 需要回复消息的对象ID。
|
||||
- `session_id`: 会话ID(一般是发送触发bot消息的用户ID,如果在群聊中并且`conf`里设置了`group_chat_in_one_session`,那么此处便是群聊ID)
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ COMMANDS = {
|
||||
},
|
||||
"id": {
|
||||
"alias": ["id", "用户"],
|
||||
"desc": "获取用户id", # wechaty和wechatmp的用户id不会变化,可用于绑定管理员
|
||||
"desc": "获取用户id",
|
||||
},
|
||||
"reset": {
|
||||
"alias": ["reset", "重置会话"],
|
||||
@@ -204,7 +204,7 @@ class Godcmd(Plugin):
|
||||
COMMANDS["reset"]["alias"].append(custom_command)
|
||||
|
||||
self.password = gconf["password"]
|
||||
self.admin_users = gconf["admin_users"] # 预存的管理员账号,这些账号不需要认证。itchat的用户名每次都会变,不可用
|
||||
self.admin_users = gconf["admin_users"]
|
||||
global_config["admin_users"] = self.admin_users
|
||||
self.isrunning = True # 机器人是否运行中
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ class Keyword(Plugin):
|
||||
response = requests.get(reply_text)
|
||||
with open(file_path, "wb") as f:
|
||||
f.write(response.content)
|
||||
#channel/wechat/wechat_channel.py和channel/wechat_channel.py中缺少ReplyType.FILE类型。
|
||||
reply = Reply()
|
||||
reply.type = ReplyType.FILE
|
||||
reply.content = file_path
|
||||
|
||||
@@ -216,11 +216,6 @@ class Tool(Plugin):
|
||||
"browser_use_summary": kwargs.get("browser_use_summary", True), # 是否对返回结果使用tool功能
|
||||
# for url-get tool
|
||||
"url_get_use_summary": kwargs.get("url_get_use_summary", True), # 是否对返回结果使用tool功能
|
||||
# for wechat tool
|
||||
"wechat_hot_reload": kwargs.get("wechat_hot_reload", True), # 是否使用热重载的方式发送wechat
|
||||
"wechat_cpt_path": kwargs.get("wechat_cpt_path", os.path.join(get_appdata_dir(), "itchat.pkl")), # wechat 配置文件(`itchat.pkl`)
|
||||
"wechat_send_group": kwargs.get("wechat_send_group", False), # 是否向群组发送消息
|
||||
"wechat_nickname_mapping": kwargs.get("wechat_nickname_mapping", "{}"), # 关于人的代号映射关系。键为代号值为微信名(昵称、备注名均可)
|
||||
# for wikipedia tool
|
||||
"wikipedia_top_k_results": kwargs.get("wikipedia_top_k_results", 2), # 只返回前k个搜索结果
|
||||
# for wolfram-alpha tool
|
||||
|
||||
Reference in New Issue
Block a user