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

tool插件 有关的一切都在这个文档里 #776

Open
goldfishh opened this issue Apr 8, 2023 · 49 comments
Open

tool插件 有关的一切都在这个文档里 #776

goldfishh opened this issue Apr 8, 2023 · 49 comments
Labels
documentation Improvements or additions to documentation

Comments

@goldfishh
Copy link
Contributor

goldfishh commented Apr 8, 2023

Note: tool-hub 自0.4.4版本后将处于维护状态,新工具新特性的开发将放缓,如有问题请提issue或pr

介绍

tool插件给予chatgpt使用工具的能力,你能用它来做些chatgpt之前做不到的事情

tool插件有4个开箱即用的工具:terminal、python、url-get、meteo-weather,具体工具介绍见:tool readme

安装

本插件依赖chatgpt-on-wechat的“拓展依赖”,你需要确保执行命令: pip3 install -r requirements-optional.txt 并且没有报错

验证 执行: pip list | grep chatgpt-tool-hub 显示tool-hub具体安装版本

使用说明

#plist 检查是否加载tool 插件 如没有tool,排查是否有依赖没有安装上

#help tool: 获取当前加载的工具列表。

默认你已经触发bot回复条件

$tool 命令: 根据给出的命令使用一些可用工具尽力为你得到结果。
$tool reset: 重置工具。

常见问题

@goldfishh
Copy link
Contributor Author

goldfishh commented Apr 8, 2023

旧工具调优记录:

目前的工具为了提高易用性还在持续调优中,目前我已经做好terminal工具的调优,所以我这里仅展示terminal的执行效果(为了方便未在wechat测试,测试仅使用默认工具,无上下文信息),其他tool的调优敬请期待:

goldfishh/chatgpt-tool-hub#3

@zhayujie zhayujie pinned this issue Apr 8, 2023
@hy546880109
Copy link

很棒的介绍

@zwssunny
Copy link
Contributor

zwssunny commented Apr 9, 2023

我发现链不了外网,能否接受代理设置,最好根调用openai的proxy一致

@goldfishh
Copy link
Contributor Author

我发现链不了外网,能否接受代理设置,最好根调用openai的proxy一致

tool插件访问openai目前跟本项目的config.json的proxy保持一致
你指的是可能是哪个tool?
某些访问外网的tool proxy功能我还在加

@congxuma
Copy link

congxuma commented Apr 9, 2023

用上了很棒,Railway可以支持使用环境变量的方式传递API token么?

@lanvent lanvent added the documentation Improvements or additions to documentation label Apr 9, 2023
@goldfishh goldfishh changed the title [tool插件] 介绍新出的tool插件带来的新功能 [tool插件] (4.10更新meteo) 介绍新出的tool插件带来的新功能 Apr 9, 2023
@Maddaxman
Copy link

Maddaxman commented Apr 11, 2023

我发现链不了外网,能否接受代理设置,最好根调用openai的proxy一致

tool插件访问openai目前跟本项目的config.json的proxy保持一致 你指的是可能是哪个tool? 某些访问外网的tool proxy功能我还在加

@goldfishh 在群里使用会报错,私聊可以,这是什么情况
image
image

@goldfishh
Copy link
Contributor Author

我发现链不了外网,能否接受代理设置,最好根调用openai的proxy一致

tool插件访问openai目前跟本项目的config.json的proxy保持一致 你指的是可能是哪个tool? 某些访问外网的tool proxy功能我还在加

@goldfishh 在群里使用会报错,私聊可以,这是什么情况 image image

如果群聊和私聊相同问题结果有区别那么唯一的解释是上下文干扰导致的

@goldfishh goldfishh changed the title [tool插件] (4.10更新meteo) 介绍新出的tool插件带来的新功能 [tool插件] (4.12更新-news,tool插件升级至0.3.8版本) 介绍新出的tool插件带来的新功能 Apr 11, 2023
@goldfishh goldfishh changed the title [tool插件] (4.12更新-news,tool插件升级至0.3.8版本) 介绍新出的tool插件带来的新功能 [tool插件] (4.12更新-新增morning-news,tool插件升级至0.3.8版本) 介绍新出的tool插件带来的新功能 Apr 11, 2023
@goldfishh goldfishh changed the title [tool插件] (4.12更新-新增morning-news,tool插件升级至0.3.8版本) 介绍新出的tool插件带来的新功能 [tool插件] (4.12更新-新增morning-news,tool插件升级至0.3.9版本) 介绍新出的tool插件带来的新功能 Apr 11, 2023
@Maddaxman
Copy link

@goldfishh 刚更新到0.3.9 触发早报的时候报错
image

@Maddaxman
Copy link

Maddaxman commented Apr 12, 2023

@goldfishh 执行查天气的时候

image

image

image

image

@zpc126
Copy link

zpc126 commented Apr 12, 2023

早报 用不了 兄弟

@goldfishh
Copy link
Contributor Author

早报功能需要等晚会的一个pr

@zhangzhanhui
Copy link

#enablep tool操作报错如下:
[plugin_manager.py:120] - Failed to init TOOL, disabled. str expected, not int

请问是哪里问题?配置文件吗?

@doublet44
Copy link
Contributor

#enablep tool操作报错如下: [plugin_manager.py:120] - Failed to init TOOL, disabled. str expected, not int

请问是哪里问题?配置文件吗?

进plugins/tool 文件夹执行git pull再试一下

@DayDreammy
Copy link
Contributor

DayDreammy commented Apr 22, 2023

您好,请问使用Railway 一键部署的,如何修改config.json呢?

我在
apply_optional_tool.md
看到了

所有api-key有两种配置方式:config.json、或设置环境变量(变量名为对应英文大写)

@DayDreammy
Copy link
Contributor

您好,请问使用Railway 一键部署的,如何修改config.json呢?

我在 apply_optional_tool.md 看到了

所有api-key有两种配置方式:config.json、或设置环境变量(变量名为对应英文大写)

您好,请问使用Railway 一键部署的,需要api的直接设置环境变量可以添加对应的插件,但是没有api的比如Wikipedia如何添加呢?

@A1ways0nline
Copy link

我将项目clone到plugins/tool目录下之后,也使用pip安装了requirements_all.txt,并且配置了config.json,然后重启chatgpt-on-wechat之后,显示[ERROR] 插件不存在或未启用,是什么原因呢?
image
image

@Mydtlwn
Copy link

Mydtlwn commented May 11, 2023

能否增加一个关于新冠变种信息查询的插件,关于信息源信息参考

@goldfishh goldfishh changed the title [tool插件] (4.12更新-新增morning-news,tool插件升级至0.3.9版本) 介绍新出的tool插件带来的新功能 tool插件 有关的一切都在这个文档里 May 15, 2023
@HaclyonDev
Copy link

我将项目clone到plugins/tool目录下之后,也使用pip安装了requirements_all.txt,并且配置了config.json,然后重启chatgpt-on-wechat之后,显示[ERROR] 插件不存在或未启用,是什么原因呢? 图像 图像

同样的问题,在本地可以显示插件tool,在服务器上昨天还显示,今天就不显示了

@bentennysonyoung
Copy link

bentennysonyoung commented May 20, 2023

使用meteo-weather插件,chatGPT的思考和反思很奇怪。
明明已经得到了答案,却还是做了两次无用的反思和思考,很浪费TOKEN。
请问如何调整参数,具体修改那个文件?

[INFO][2023-05-20 10:03:49][wechat_channel.py:124] - Wechat login success, user_id: @ac26a67f73ec10f2f868cbb276d053d34cda8af7f417fa21c3df4321035d98fb, nickname: Amadeus
Start auto replying.
[INFO][2023-05-20 10:08:01][bridge.py:30] - create bot chatGPT for chat
[INFO][2023-05-20 10:08:01][victorinox.py:111] - 提问: 使用metro-weather查今天上海天气
[INFO][2023-05-20 10:08:15][base.py:226] - LLM-OS的内心独白: 推理:用户需要查询上海今天的天气信息,meteo-weather工具可以提供这个功能
思考:使用meteo-weather工具查询上海今天的天气
反思:需要确认用户是否需要查询具体时间段内的天气信息,如果需要,需要进一步询问用户

[INFO][2023-05-20 10:08:15][base.py:177] - 执行Tool: meteo-weather中...
[INFO][2023-05-20 10:08:15][base.py:115] - 输入: 上海 今天 按天
[INFO][2023-05-20 10:08:15][tool_engine.py:134] - 我将给工具发送如下信息: 
上海 今天 按天
[INFO][2023-05-20 10:08:25][base.py:77] - URL 构造: https://api.open-meteo.com/v1/forecast?latitude=31.2304&longitude=121.4737&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,rain_sum,weathercode,sunrise,sunset,windspeed_10m_max,windgusts_10m_max,winddirection_10m_dominant&timezone=Asia/Shanghai&start_date=2023-05-20&end_date=2023-05-20
[INFO][2023-05-20 10:08:26][base.py:87] - API 响应: '{"latitude":31.25,"longitude":121.5,"generationtime_ms":0.3260374069213867,"utc_offset_seconds":28800,"timezone":"Asia/Shanghai","timezone_abbreviation":"CST","elevation":5.0,"daily_units":{"time":"iso8601","temperature_2m_max":"°C","temperature_2m_min":"°C","precipitation_sum":"mm","rain_sum":"mm","weathercode":"wmo code","sunrise":"iso8601","sunset":"iso8601","windspeed_10m_max":"km/h","windgusts_10m_max":"km/h","winddirection_10m_dominant":"°"},"daily":{"time":["2023-05-20"],"temperature_2m_max":[24.7],"temperature_2m_min":[16.0],"precipitation_sum":[0.00],"rain_sum":[0.00],"weathercode":[3],"sunrise":["2023-05-20T04:54"],"sunset":["2023-05-20T18:46"],"windspeed_10m_max":[9.4],"windgusts_10m_max":[27.7],"winddirection_10m_dominant":[140]}}'
[INFO][2023-05-20 10:08:43][tool_engine.py:163] - 工具 meteo-weather 返回内容: 根据API文档生成的API URL,我们可以获得上海今天的天气预报信息。根据API的响应结果,我们可以看到上海今天的最高气温为24.7摄氏度,最低气温为16.0摄氏度,降水量为0.00毫米,天气代码为3,风速最大值为9.4千米/小时,阵风最大值为27.7千米/小时,风向为140度。因此,上海今天的天气预报信息已经被API所覆盖,我们可以通过API获得所需的必要信息。
[INFO][2023-05-20 10:08:43][tool_engine.py:193] - 我从[meteo-weather]中获得了一些信息:
'根据API文档生成的API URL,我们可以获得上海今天的天气预报信息。根据API的响应结果,我们可以看到上海今天的最高气温为24.7摄氏度,最低气温为16.0摄氏度,降水量为0.00毫米,天气代码为3,风速最大值为9.4千米/小时,阵风最大值为27.7千米/小时,风向为140度。因此,上海今天的天气预报信息已经被API所覆盖,我们可以通过API获得所需的必要信息。'
[INFO][2023-05-20 10:08:59][base.py:226] - LLM-OS的内心独白: 推理:用户需要将上海今天的天气信息转换为华氏度,python工具可以提供这个功能
思考:使用python工具将上海今天的天气信息转换为华氏度
反思:需要确认用户需要转换的具体温度值,如果需要,需要进一步询问用户

[INFO][2023-05-20 10:08:59][base.py:177] - 执行Tool: python中...
[INFO][2023-05-20 10:08:59][base.py:115] - 输入: fahrenheit = (24.7 * 1.8) + 32; print(fahrenheit)
[INFO][2023-05-20 10:08:59][tool_engine.py:134] - 我将给工具发送如下信息: 
fahrenheit = (24.7 * 1.8) + 32; print(fahrenheit)
[INFO][2023-05-20 10:08:59][tool_engine.py:163] - 工具 python 返回内容: 76.46000000000001

[INFO][2023-05-20 10:08:59][tool_engine.py:193] - 我从[python]中获得了一些信息:
'76.46000000000001'
[INFO][2023-05-20 10:09:12][base.py:226] - LLM-OS的内心独白: 推理:我们已经查询了上海今天的天气信息并将其转换为华氏度,但是用户可能需要查询其他城市的天气信息,需要向用户确认
思考:使用answer-user工具向用户确认是否需要查询其他城市的天气信息
反思:如果用户需要查询其他城市的天气信息,我们需要进一步询问用户需要查询的城市名称

[INFO][2023-05-20 10:09:12][base.py:115] - 输入: 请问您是否需要查询其他城市的天气信息?
[INFO][2023-05-20 10:09:13][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=[Amadeus] 请问您是否需要查询其他城市的天气信息?), receiver=@d9f8e24eba06457c8960402ac40308579a56b8938000ee050863725b42616a51
[INFO][2023-05-20 10:09:42][chat_gpt_bot.py:49] - [CHATGPT] query=不需要
[INFO][2023-05-20 10:09:51][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=[Amadeus] 好的,以下是今天上海的天气信息:

- 天气:多云
- 温度:最高27°C,最低21°C
- 空气质量:良

config.json文件如下:

{
  "open_ai_api_key": "sk-h4jw64********************************************j5D9Un",
  "model": "gpt-3.5-turbo",
  "proxy": "",
  "single_chat_prefix": [
    "A*******s"
  ],
  "single_chat_reply_prefix": "[Amadeus] ",
  "group_chat_prefix": [
    "A*******s",
    "@A*******s"
  ],
  "group_name_white_list": [
    "A********s_Test",
    "******"
  ],
  "group_chat_in_one_session": [
    "A*******s_Test"
  ],
  "image_create_prefix": [
    "画",
    "看",
    "找"
  ],
  "speech_recognition": true,
  "group_speech_recognition": true,
  "voice_reply_voice": true,
  "conversation_max_tokens": 1000,
  "expires_in_seconds": 1200,
  "character_desc": "你是*****",
  "subscribe_msg": "感谢您的关注!\n这里是A*******s,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。",
  "text_to_voice": "azure",
  "azure_voice_api_key": "d2fcf0c***********************cc3d2",
  "azure_voice_region": "japaneast"
}

@KngJmmy
Copy link

KngJmmy commented May 28, 2023

tool插件,我使用了bing-search ,但是发现返回401,我按照了教程里面来部署,也拿到了subscription key ,检查了2遍,确认没有黏贴错key,开了debug,登录后日志如下,我尝试了一下搜索:
nt=[INFO]
这是一个能让chatgpt联网,搜索,数字运算的插件,将赋予强大且丰富的扩展能力。
使用说明:
$tool 命令: 根据给出的{命令}使用一些可用工具尽力为你得到结果。
$tool reset: 重置工具。

已加载工具列表:
meteo-weather, python, bing-search, url-get, terminal), receiver=@8d94e58b1874a314c4ba0c9a6cddd2a3
[DEBUG][2023-05-28 20:53:20][victorinox.py:136] - Now memory: []
[INFO][2023-05-28 20:53:20][victorinox.py:111] - 提问: bing-search 2023年5月28日 NBA比赛结果
[INFO][2023-05-28 20:53:25][base.py:227] - LLM-OS的内心独白:
推理:用户需要查询2023年5月28日的NBA比赛结果,可以使用bing-search工具进行搜索。

[INFO][2023-05-28 20:53:25][base.py:177] - 执行Tool: bing-search中...
[INFO][2023-05-28 20:53:25][base.py:115] - 输入: 2023年5月28日 NBA比赛结果
[INFO][2023-05-28 20:53:25][tool_engine.py:134] - 我将给工具发送如下信息:
2023年5月28日 NBA比赛结果
[ERROR][2023-05-28 20:53:25][wrapper.py:51] - RequestsWrapper.get status_code is not good: HTTPError('401 Client Error: Access Denied for url: https://api.bing.microsoft.com/v7.0/search?q=2023%E5%B9%B45%E6%9C%8828%E6%97%A5+NBA%E6%AF%94%E8%B5%9B%E7%BB%93%E6%9E%9C&count=3&textDecorations=True&textFormat=HTML')
[ERROR][2023-05-28 20:53:25][wrapper.py:41] - [bing_search] KeyError('webPages')
[INFO][2023-05-28 20:53:25][tool_engine.py:163] - 工具 bing-search 返回内容: No good Bing Search Result was found
[INFO][2023-05-28 20:53:25][tool_engine.py:193] - 我从[bing-search]中获得了一些信息:
'No good Bing Search Result was found'
[INFO][2023-05-28 20:53:31][base.py:222] - LLM-OS想和你说:很抱歉,没有找到2023年5月28日的NBA比赛结果。
[INFO][2023-05-28 20:53:31][base.py:227] - LLM-OS的内心独白:

[INFO][2023-05-28 20:53:31][base.py:115] - 输入: 很抱歉,没有找到2023年5月28日的NBA比赛结果。
[INFO][2023-05-28 20:53:32][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=很抱歉,没有找到2023年5月28日的NBA比赛结果。), receiver=@8d94e58b1874a314c4ba0c9a6cddd2a3

@KngJmmy
Copy link

KngJmmy commented May 28, 2023

@goldfishh 有空的话,还请大佬帮忙看看我的问题

tool插件,我使用了bing-search ,但是发现返回401,我按照了教程里面来部署,也拿到了subscription key ,检查了2遍,确认没有黏贴错key,开了debug,登录后日志如下,我尝试了一下搜索: nt=[INFO] 这是一个能让chatgpt联网,搜索,数字运算的插件,将赋予强大且丰富的扩展能力。 使用说明: $tool 命令: 根据给出的{命令}使用一些可用工具尽力为你得到结果。 $tool reset: 重置工具。

已加载工具列表: meteo-weather, python, bing-search, url-get, terminal), receiver=@8d94e58b1874a314c4ba0c9a6cddd2a3 [DEBUG][2023-05-28 20:53:20][victorinox.py:136] - Now memory: [] [INFO][2023-05-28 20:53:20][victorinox.py:111] - 提问: bing-search 2023年5月28日 NBA比赛结果 [INFO][2023-05-28 20:53:25][base.py:227] - LLM-OS的内心独白: 推理:用户需要查询2023年5月28日的NBA比赛结果,可以使用bing-search工具进行搜索。

[INFO][2023-05-28 20:53:25][base.py:177] - 执行Tool: bing-search中... [INFO][2023-05-28 20:53:25][base.py:115] - 输入: 2023年5月28日 NBA比赛结果 [INFO][2023-05-28 20:53:25][tool_engine.py:134] - 我将给工具发送如下信息: 2023年5月28日 NBA比赛结果 [ERROR][2023-05-28 20:53:25][wrapper.py:51] - RequestsWrapper.get status_code is not good: HTTPError('401 Client Error: Access Denied for url: https://api.bing.microsoft.com/v7.0/search?q=2023%E5%B9%B45%E6%9C%8828%E6%97%A5+NBA%E6%AF%94%E8%B5%9B%E7%BB%93%E6%9E%9C&count=3&textDecorations=True&textFormat=HTML') [ERROR][2023-05-28 20:53:25][wrapper.py:41] - [bing_search] KeyError('webPages') [INFO][2023-05-28 20:53:25][tool_engine.py:163] - 工具 bing-search 返回内容: No good Bing Search Result was found [INFO][2023-05-28 20:53:25][tool_engine.py:193] - 我从[bing-search]中获得了一些信息: 'No good Bing Search Result was found' [INFO][2023-05-28 20:53:31][base.py:222] - LLM-OS想和你说:很抱歉,没有找到2023年5月28日的NBA比赛结果。 [INFO][2023-05-28 20:53:31][base.py:227] - LLM-OS的内心独白:

[INFO][2023-05-28 20:53:31][base.py:115] - 输入: 很抱歉,没有找到2023年5月28日的NBA比赛结果。 [INFO][2023-05-28 20:53:32][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=很抱歉,没有找到2023年5月28日的NBA比赛结果。), receiver=@8d94e58b1874a314c4ba0c9a6cddd2a3

@KngJmmy
Copy link

KngJmmy commented May 28, 2023

@goldfishh 有空的话,还请大佬帮忙看看我的问题

tool插件,我使用了bing-search ,但是发现返回401,我按照了教程里面来部署,也拿到了subscription key ,检查了2遍,确认没有黏贴错key,开了debug,登录后日志如下,我尝试了一下搜索: nt=[INFO] 这是一个能让chatgpt联网,搜索,数字运算的插件,将赋予强大且丰富的扩展能力。 使用说明: $tool 命令: 根据给出的{命令}使用一些可用工具尽力为你得到结果。 $tool reset: 重置工具。
已加载工具列表: meteo-weather, python, bing-search, url-get, terminal), receiver=@8d94e58b1874a314c4ba0c9a6cddd2a3 [DEBUG][2023-05-28 20:53:20][victorinox.py:136] - Now memory: [] [INFO][2023-05-28 20:53:20][victorinox.py:111] - 提问: bing-search 2023年5月28日 NBA比赛结果 [INFO][2023-05-28 20:53:25][base.py:227] - LLM-OS的内心独白: 推理:用户需要查询2023年5月28日的NBA比赛结果,可以使用bing-search工具进行搜索。
[INFO][2023-05-28 20:53:25][base.py:177] - 执行Tool: bing-search中... [INFO][2023-05-28 20:53:25][base.py:115] - 输入: 2023年5月28日 NBA比赛结果 [INFO][2023-05-28 20:53:25][tool_engine.py:134] - 我将给工具发送如下信息: 2023年5月28日 NBA比赛结果 [ERROR][2023-05-28 20:53:25][wrapper.py:51] - RequestsWrapper.get status_code is not good: HTTPError('401 Client Error: Access Denied for url: https://api.bing.microsoft.com/v7.0/search?q=2023%E5%B9%B45%E6%9C%8828%E6%97%A5+NBA%E6%AF%94%E8%B5%9B%E7%BB%93%E6%9E%9C&count=3&textDecorations=True&textFormat=HTML') [ERROR][2023-05-28 20:53:25][wrapper.py:41] - [bing_search] KeyError('webPages') [INFO][2023-05-28 20:53:25][tool_engine.py:163] - 工具 bing-search 返回内容: No good Bing Search Result was found [INFO][2023-05-28 20:53:25][tool_engine.py:193] - 我从[bing-search]中获得了一些信息: 'No good Bing Search Result was found' [INFO][2023-05-28 20:53:31][base.py:222] - LLM-OS想和你说:很抱歉,没有找到2023年5月28日的NBA比赛结果。 [INFO][2023-05-28 20:53:31][base.py:227] - LLM-OS的内心独白:
[INFO][2023-05-28 20:53:31][base.py:115] - 输入: 很抱歉,没有找到2023年5月28日的NBA比赛结果。 [INFO][2023-05-28 20:53:32][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=很抱歉,没有找到2023年5月28日的NBA比赛结果。), receiver=@8d94e58b1874a314c4ba0c9a6cddd2a3

已经自己解决了这个问题,在/xxx/chatgpt-on-wechat/plugins/tool/的config.json中
{
"tools": ["wikipedia", "你想要添加的其他工具"], // 填入你想用到的额外工具名
"kwargs": {
"debug": true, // 当你遇到问题求助时,需要配置
"request_timeout": 120, // openai接口超时时间
"no_default": false, // 是否不使用默认的4个工具
// 带*工具需要申请api-key,在这里填入,api_name参考前述申请方法
}
}
我在另一个页面中看到有以下的配置项:
{
"tools": ["bing-search"],
"kwargs": {
"llm_api_key": "",
"proxy": "",
"debug": false,
"no_default": false,
"model_name": "gpt-3.5-turbo",
"bing_subscription_key": "13bab6no0valid43d3a889sx8e9d374e22" // sample key
}
}
我将“llm_api_key”填写了我的chatgpt的api key,就会报401的错,我删除掉这个参数的值就成功了!

@freeze-1
Copy link

你好,在私聊窗口用Bot,能激活插件并且使用,在群里@就没反应了,且再群里用$tool 等命令根本无法识别,是什么情况

@GesiIvy128
Copy link

GesiIvy128 commented Jun 17, 2023

请问railway部署应该如何设置管理员口令和添加tools的kwargs呢


已解决,删除了dockerfile, 自己拉取private仓库到本地修改、再push后部署的(如果我没理解错的话)

@freeze-1
Copy link

freeze-1 commented Jun 17, 2023 via email

@wudi7758521521
Copy link

请问在调用tools时,必须要输入$tool +命令吗?是否可以通过自然语言的输入,让llm自己调用并确定调用何种工具?目前chatgpt及langchain已更新此种方法。

@freeze-1
Copy link

freeze-1 commented Jul 13, 2023 via email

@GesiIvy128
Copy link

并没有, 天气啥的还是很难用(它会自己反思然后吞答案)
arxiv也难用,它会自己概括摘要,输出的时候由于长度限制,只有后面两篇,前面的就全吞了(哪怕我把arxiv插件的概括选项关了也是)

请问railway部署应该如何设置管理员口令和添加tools的kwargs呢

已解决,删除了dockerfile, 自己拉取private仓库到本地修改、再push后部署的(如果我没理解错的话)

你用railway 插件那些已经可以正常使用了吗?

@Kevin-free
Copy link

请问现在早报新闻功能要怎么用?需要哪些插件和参数?我装了 news,morning-news,配了 API,token,但是 $tool news 都用不了呢。

@D1654
Copy link

D1654 commented Sep 9, 2023

大佬们,$tool命令的配置在哪里,我想让bot默认使用tool

@freeze-1
Copy link

freeze-1 commented Sep 9, 2023 via email

@ZhuQian0909
Copy link

使用meteo-weather插件,chatGPT的思考和反思很奇怪。 明明已经得到了答案,却还是做了两次无用的反思和思考,很浪费TOKEN。 请问如何调整参数,具体修改那个文件?

[INFO][2023-05-20 10:03:49][wechat_channel.py:124] - Wechat login success, user_id: @ac26a67f73ec10f2f868cbb276d053d34cda8af7f417fa21c3df4321035d98fb, nickname: Amadeus
Start auto replying.
[INFO][2023-05-20 10:08:01][bridge.py:30] - create bot chatGPT for chat
[INFO][2023-05-20 10:08:01][victorinox.py:111] - 提问: 使用metro-weather查今天上海天气
[INFO][2023-05-20 10:08:15][base.py:226] - LLM-OS的内心独白: 推理:用户需要查询上海今天的天气信息,meteo-weather工具可以提供这个功能
思考:使用meteo-weather工具查询上海今天的天气
反思:需要确认用户是否需要查询具体时间段内的天气信息,如果需要,需要进一步询问用户

[INFO][2023-05-20 10:08:15][base.py:177] - 执行Tool: meteo-weather中...
[INFO][2023-05-20 10:08:15][base.py:115] - 输入: 上海 今天 按天
[INFO][2023-05-20 10:08:15][tool_engine.py:134] - 我将给工具发送如下信息: 
上海 今天 按天
[INFO][2023-05-20 10:08:25][base.py:77] - URL 构造: https://api.open-meteo.com/v1/forecast?latitude=31.2304&longitude=121.4737&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,rain_sum,weathercode,sunrise,sunset,windspeed_10m_max,windgusts_10m_max,winddirection_10m_dominant&timezone=Asia/Shanghai&start_date=2023-05-20&end_date=2023-05-20
[INFO][2023-05-20 10:08:26][base.py:87] - API 响应: '{"latitude":31.25,"longitude":121.5,"generationtime_ms":0.3260374069213867,"utc_offset_seconds":28800,"timezone":"Asia/Shanghai","timezone_abbreviation":"CST","elevation":5.0,"daily_units":{"time":"iso8601","temperature_2m_max":"°C","temperature_2m_min":"°C","precipitation_sum":"mm","rain_sum":"mm","weathercode":"wmo code","sunrise":"iso8601","sunset":"iso8601","windspeed_10m_max":"km/h","windgusts_10m_max":"km/h","winddirection_10m_dominant":"°"},"daily":{"time":["2023-05-20"],"temperature_2m_max":[24.7],"temperature_2m_min":[16.0],"precipitation_sum":[0.00],"rain_sum":[0.00],"weathercode":[3],"sunrise":["2023-05-20T04:54"],"sunset":["2023-05-20T18:46"],"windspeed_10m_max":[9.4],"windgusts_10m_max":[27.7],"winddirection_10m_dominant":[140]}}'
[INFO][2023-05-20 10:08:43][tool_engine.py:163] - 工具 meteo-weather 返回内容: 根据API文档生成的API URL,我们可以获得上海今天的天气预报信息。根据API的响应结果,我们可以看到上海今天的最高气温为24.7摄氏度,最低气温为16.0摄氏度,降水量为0.00毫米,天气代码为3,风速最大值为9.4千米/小时,阵风最大值为27.7千米/小时,风向为140度。因此,上海今天的天气预报信息已经被API所覆盖,我们可以通过API获得所需的必要信息。
[INFO][2023-05-20 10:08:43][tool_engine.py:193] - 我从[meteo-weather]中获得了一些信息:
'根据API文档生成的API URL,我们可以获得上海今天的天气预报信息。根据API的响应结果,我们可以看到上海今天的最高气温为24.7摄氏度,最低气温为16.0摄氏度,降水量为0.00毫米,天气代码为3,风速最大值为9.4千米/小时,阵风最大值为27.7千米/小时,风向为140度。因此,上海今天的天气预报信息已经被API所覆盖,我们可以通过API获得所需的必要信息。'
[INFO][2023-05-20 10:08:59][base.py:226] - LLM-OS的内心独白: 推理:用户需要将上海今天的天气信息转换为华氏度,python工具可以提供这个功能
思考:使用python工具将上海今天的天气信息转换为华氏度
反思:需要确认用户需要转换的具体温度值,如果需要,需要进一步询问用户

[INFO][2023-05-20 10:08:59][base.py:177] - 执行Tool: python中...
[INFO][2023-05-20 10:08:59][base.py:115] - 输入: fahrenheit = (24.7 * 1.8) + 32; print(fahrenheit)
[INFO][2023-05-20 10:08:59][tool_engine.py:134] - 我将给工具发送如下信息: 
fahrenheit = (24.7 * 1.8) + 32; print(fahrenheit)
[INFO][2023-05-20 10:08:59][tool_engine.py:163] - 工具 python 返回内容: 76.46000000000001

[INFO][2023-05-20 10:08:59][tool_engine.py:193] - 我从[python]中获得了一些信息:
'76.46000000000001'
[INFO][2023-05-20 10:09:12][base.py:226] - LLM-OS的内心独白: 推理:我们已经查询了上海今天的天气信息并将其转换为华氏度,但是用户可能需要查询其他城市的天气信息,需要向用户确认
思考:使用answer-user工具向用户确认是否需要查询其他城市的天气信息
反思:如果用户需要查询其他城市的天气信息,我们需要进一步询问用户需要查询的城市名称

[INFO][2023-05-20 10:09:12][base.py:115] - 输入: 请问您是否需要查询其他城市的天气信息?
[INFO][2023-05-20 10:09:13][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=[Amadeus] 请问您是否需要查询其他城市的天气信息?), receiver=@d9f8e24eba06457c8960402ac40308579a56b8938000ee050863725b42616a51
[INFO][2023-05-20 10:09:42][chat_gpt_bot.py:49] - [CHATGPT] query=不需要
[INFO][2023-05-20 10:09:51][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=[Amadeus] 好的,以下是今天上海的天气信息:

- 天气:多云
- 温度:最高27°C,最低21°C
- 空气质量:良

config.json文件如下:

{
  "open_ai_api_key": "sk-h4jw64********************************************j5D9Un",
  "model": "gpt-3.5-turbo",
  "proxy": "",
  "single_chat_prefix": [
    "A*******s"
  ],
  "single_chat_reply_prefix": "[Amadeus] ",
  "group_chat_prefix": [
    "A*******s",
    "@A*******s"
  ],
  "group_name_white_list": [
    "A********s_Test",
    "******"
  ],
  "group_chat_in_one_session": [
    "A*******s_Test"
  ],
  "image_create_prefix": [
    "画",
    "看",
    "找"
  ],
  "speech_recognition": true,
  "group_speech_recognition": true,
  "voice_reply_voice": true,
  "conversation_max_tokens": 1000,
  "expires_in_seconds": 1200,
  "character_desc": "你是*****",
  "subscribe_msg": "感谢您的关注!\n这里是A*******s,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。",
  "text_to_voice": "azure",
  "azure_voice_api_key": "d2fcf0c***********************cc3d2",
  "azure_voice_region": "japaneast"
}

同样的问题,所有的插件都会重复去llm-os,不仅浪费,而且会造成最终给出答案有问题

@freeze-1
Copy link

freeze-1 commented Nov 4, 2023 via email

@chenwenfeng
Copy link

并没有, 天气啥的还是很难用(它会自己反思然后吞答案) arxiv也难用,它会自己概括摘要,输出的时候由于长度限制,只有后面两篇,前面的就全吞了(哪怕我把arxiv插件的概括选项关了也是)

请问railway部署应该如何设置管理员口令和添加tools的kwargs呢
已解决,删除了dockerfile, 自己拉取private仓库到本地修改、再push后部署的(如果我没理解错的话)

你用railway 插件那些已经可以正常使用了吗?

天气回复太慢了

@freeze-1
Copy link

freeze-1 commented Nov 22, 2023 via email

@chenwenfeng
Copy link

我将项目clone到plugins/tool目录下之后,也使用pip安装了requirements_all.txt,并且配置了config.json,然后重启chatgpt-on-wechat之后,显示[ERROR] 插件不存在或未启用,是什么原因呢? image image

pip安装了就行 不需要clone仓库

@chenwenfeng
Copy link

用下来 很奇怪的现象 到底是不是每次都要加$tool前缀
image
image

@shanggangli
Copy link

有没有大佬帮忙看看tool插件无法启动的问题:

背景

国内服务器、docker部署方式、使用微软Azure 提供的openAI 服务

报错情况

image image image

tool config

{
"godcmd": {
"password": "111231",
"admin_users": ["S
1231"]
},
"banwords": {
"action": "replace",
"reply_filter": true,
"reply_action": "ignore"
},
"tool": {
"tools": [
"python",
"url-get",
"terminal",
"meteo-weather",
"bing-search",
"arxiv",
"wikipedia"
],
"kwargs": {
"debug":true,
"top_k_results": 2,
"no_default": false,
"model_name": "s*****************_turbo",
"bing_subscription_key":"86d2b4*******************************f6dc9",
"meteo_weather_key":"9256c534245d",
"arxiv_summary":true,
"open_ai_api_key": "74417fd85
11111",
"open_ai_api_base": "https12312",
"azure_deployment_id": "s
gpt4",
"llm_api_key": "744171213"
}
},
"Apilot":{
"alapi_token":"XPuclv
1123",
"morning_news_text_enabled":false
},
"linkai": {
"group_app_map": {
"测试群1": "default",
"测试群2": "Kv2fXJcH"
},
"midjourney": {
"enabled": true,
"auto_translate": true,
"img_proxy": true,
"max_tasks": 3,
"max_tasks_per_user": 1,
"use_image_create_prefix": true
}
}
}

app config

{
"channel_type": "wx",
"model": "sg_gpt4",
"open_ai_api_key": "74417fd*****************2134",
"use_azure_chatgpt": true,
"open_ai_api_base": "https:azure.com/",
"azure_api_version": "2023-12-01-preview",
"azure_deployment_id": "pt4",
"text_to_image": "dalle3",
"voice_to_text": "azure",
"text_to_voice": "azure",
"proxy": "",
"hot_reload": false,
"single_chat_prefix": ["","bot"],
"single_chat_reply_prefix": "[bot] ",
"group_chat_prefix": [
"@bot","bot"
],
"group_name_white_list": ["ALL_GROUP"
],
"group_chat_in_one_session": [
"得
"
],
"image_create_prefix": [
"画"
],
"speech_recognition": true,
"group_speech_recognition": false,
"voice_reply_voice": false,
"conversation_max_tokens": 2500,
"expires_in_seconds": 3600,
"character_desc": "你是
使用多种语言与人交流。",
"temperature": 0.7,
"top_p": 1,
"subscribe_msg": "感谢您
igger_prefix}#help 查看详细指令。",
"use_linkai": false,
"linkai_api_key": "",
"linkai_app_code": ""
}

@colakang
Copy link

colakang commented Dec 23, 2023

请问可以增加支持Google gemini model吗

@freeze-1
Copy link

freeze-1 commented Dec 23, 2023 via email

@huluohu
Copy link

huluohu commented Jan 18, 2024

说实话,这个插件完全不知所云。。
#plist显示有插件,一去使用有提示没有插件

@freeze-1
Copy link

freeze-1 commented Jan 18, 2024 via email

@yuxiss
Copy link

yuxiss commented Mar 13, 2024

到底支持不支持tts这些非默认加载的模块,如何支持呢?README中有写,在config中添加就无法加载插件了……

@freeze-1
Copy link

freeze-1 commented Mar 13, 2024 via email

@mashagua
Copy link

tool 怎么发邮件或者发短信

@freeze-1
Copy link

freeze-1 commented Mar 27, 2024 via email

@you-know-m
Copy link

image

@freeze-1
Copy link

freeze-1 commented Apr 21, 2024 via email

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

No branches or pull requests