Giter Site home page Giter Site logo

goldfishh / chatgpt-tool-hub Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 142.0 1.01 MB

An open-source chatgpt tool ecosystem where you can combine tools with chatgpt and use natural language to do anything.

License: MIT License

Python 92.12% Jupyter Notebook 7.88%

chatgpt-tool-hub's Introduction

👋 Hello! I'm goldfish, aka `goldfis[h]+`

  • 📍 I’m currently working at Alibaba DAMO Academy.
  • 🌱 I’m an algorithm engineer, focusing on the engineering implementation of visual algorithms.
  • 💬 I enjoy programming and am particularly interested in projects that use LLM (Large Language Models).
  • ⌨️ I can use C++, Python, Java, and Go to implement ideas.
  • 💡 How to reach me: ZhihuBilibili
  • 😼 Fun fact: like white-haired catgirl

🔧 Recent Activity

Code Time

🐱 My GitHub Data

📦 33.8 kB Used in GitHub's Storage

🏆 170 Contributions in the Year 2024

🚫 Not Opted to Hire

📜 22 Public Repositories

🔑 6 Private Repositories

I'm an Early 🐤

🌞 Morning                419 commits         ███████████████░░░░░░░░░░   59.10 % 
🌆 Daytime                24 commits          █░░░░░░░░░░░░░░░░░░░░░░░░   03.39 % 
🌃 Evening                147 commits         █████░░░░░░░░░░░░░░░░░░░░   20.73 % 
🌙 Night                  119 commits         ████░░░░░░░░░░░░░░░░░░░░░   16.78 % 

📅 I'm Most Productive on Thursday

Monday                   98 commits          ███░░░░░░░░░░░░░░░░░░░░░░   13.82 % 
Tuesday                  83 commits          ███░░░░░░░░░░░░░░░░░░░░░░   11.71 % 
Wednesday                117 commits         ████░░░░░░░░░░░░░░░░░░░░░   16.50 % 
Thursday                 136 commits         █████░░░░░░░░░░░░░░░░░░░░   19.18 % 
Friday                   81 commits          ███░░░░░░░░░░░░░░░░░░░░░░   11.42 % 
Saturday                 88 commits          ███░░░░░░░░░░░░░░░░░░░░░░   12.41 % 
Sunday                   106 commits         ████░░░░░░░░░░░░░░░░░░░░░   14.95 % 

📊 This Week I Spent My Time On

🕑︎ Time Zone: Asia/Shanghai

💬 Programming Languages: 
Python                   46 mins             █████████████████░░░░░░░░   68.36 % 
C++                      9 mins              ████░░░░░░░░░░░░░░░░░░░░░   14.46 % 
JSON                     5 mins              ██░░░░░░░░░░░░░░░░░░░░░░░   07.47 % 
CMake                    2 mins              █░░░░░░░░░░░░░░░░░░░░░░░░   03.42 % 
Other                    1 min               █░░░░░░░░░░░░░░░░░░░░░░░░   02.75 % 

💻 Operating System: 
Mac                      1 hr 8 mins         █████████████████████████   100.00 % 

Last Updated on 02/06/2024 01:17:44 UTC


📆 Github Stats

github stats


📊 Visit Count

chatgpt-tool-hub's People

Contributors

6vision avatar goldfishh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgpt-tool-hub's Issues

新闻类的工具调用不是很准确

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

已拉取更新最新代码,依赖
chatgpt-on-wechat版本:1.2.5
chatgpt-tool-hub版本:0.4.3

  1. 你复现时的config.json,注意抹去你的api-key
{
  "tools": [
    "news",
    "arxiv",
    "debug",
    "summary",
    "url-get",
    "terminal",
    "wikipedia",
    "bing-search",
    "meteo-weather",
    "wolfram-alpha"

  ],
  "kwargs": {
    "top_k_results": 2,
    "no_default": true,
    "debug": true,
    "searx_host": "",
    "model_name": "gpt-3.5-turbo",
    "bing_subscription_key": "278fc47d0cd218",
    "news_api_key":"f2fddd62b941",
    "wolfram_alpha_appid":"7UH8R7RJ4H",
    "google_api_key": "vhrasGFEwAkp3Fm1-Mg",
    "google_cse_id": "dc84eb3",
    "zaobao_api_key": "8Qwk"
  }
}
  1. 你的问题:
无论怎么引导,它却只调用news-api,而不调用morning-news
或者还是说我询问的方式不对?
  1. 收到ai的回复:
    image
    image

  2. debug模式终端打印的日志:
    image

环境

  • 操作系统类型 Linux:Ubuntu-22.04-x64
  • Python版本:3.10
  • pip版本 pip -V:22.0.2

morningnews和wolfram-alpha插件添加报错

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

image

还有morningnews也是添加不了的

早报获取失败 超过重试次数

[INFO][2023-04-12 10:26:34][base.py:109] - 执行Tool: news中...
[INFO][2023-04-12 10:26:34][bot.py:87] - 行动输入: 给我今天的早报
[ERROR][2023-04-12 10:26:39][victorinox.py:86] - [APP] catch a Exception: Invalid URL 'Sorry, the API documentation is missing. Without the API documentation, I cannot generate the full API URL to answer the user question. Please provide the API documentation.': No scheme supplied. Perhaps you meant https://Sorry, the API documentation is missing. Without the API documentation, I cannot generate the full API URL to answer the user question. Please provide the API documentation.?
[INFO][2023-04-12 10:26:43][base.py:109] - 执行Tool: news中...
[INFO][2023-04-12 10:26:43][bot.py:87] - 行动输入: 给我今天的早报
[ERROR][2023-04-12 10:26:47][victorinox.py:86] - [APP] catch a Exception: Invalid URL 'Sorry, the API documentation is missing. Please provide the necessary information to generate the API url.': No scheme supplied. Perhaps you meant https://Sorry, the API documentation is missing. Please provide the necessary information to generate the API url.?
[ERROR][2023-04-12 10:26:47][victorinox.py:90] - exceed retry_num
[ERROR][2023-04-12 10:26:47][tool.py:92] - 超过重试次数
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 84, in ask
return self.bot.run(query)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 156, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 122, in _take_next_step
observation = tool.run(
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 73, in run
raise e
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 70, in run
observation = self._run(tool_input)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/news/news.py", line 41, in _run
return self.api_chain.run(query)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/api/base.py", line 73, in _call
api_response = self.requests_wrapper.get(api_url)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 93, in get
response = requests.get(url, headers=self.headers, params=params, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'Sorry, the API documentation is missing. Without the API documentation, I cannot generate the full API URL to answer the user question. Please provide the API documentation.': No scheme supplied. Perhaps you meant https://Sorry, the API documentation is missing. Without the API documentation, I cannot generate the full API URL to answer the user question. Please provide the API documentation.?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 84, in ask
return self.bot.run(query)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 156, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 122, in _take_next_step
observation = tool.run(
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 73, in run
raise e
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 70, in run
observation = self._run(tool_input)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/news/news.py", line 41, in _run
return self.api_chain.run(query)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/chains/api/base.py", line 73, in _call
api_response = self.requests_wrapper.get(api_url)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 93, in get
response = requests.get(url, headers=self.headers, params=params, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'Sorry, the API documentation is missing. Please provide the necessary information to generate the API url.': No scheme supplied. Perhaps you meant https://Sorry, the API documentation is missing. Please provide the necessary information to generate the API url.?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/chatgpt-on-wechat-1.2.1.2/plugins/tool/tool.py", line 88, in on_handle_context
_reply = self.app.ask(query, user_session)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 88, in ask
return self.ask(query, chat_history, retry_num + 1)
File "/usr/local/lib/python3.10/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 91, in ask
raise TimeoutError("超过重试次数")
TimeoutError: 超过重试次数
[ERROR][2023-04-12 10:26:47][tool.py:93] - 超过重试次数
[INFO][2023-04-12 10:26:47][chat_gpt_bot.py:36] - [CHATGPT] query=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理
[INFO][2023-04-12 10:27:05][wechat_channel.py:174] - [WX] sendMsg=Reply(type=TEXT, content=[GPT] 嘿,你好啊!非常抱歉,我需要告诉你一件事。这个问题需要使用特定的工具插件来处理,而目前我的系统暂时没有这些插件。因此,我不能为您提供解决方案。但是别担心,我一直在快速学习和发展,希望不久的将来,我可以回答所有您的问题。非常感谢您的理解!), receiver=@45c666477c9b891bdfc3396a9547cf48cabd79e5d17e5650a31b03a69c980484

早报请求超时的问题

chatgpt-on-wechat版本:1.2.3
chatgpt-tool-hub版本:0.3.9

从昨天开始早报就一直请求超时,看了下接口调用日志是有返回内容的,是我哪里配置的不对吗?


[INFO][2023-04-13 15:03:29][bridge.py:28] - create bot chatGPT for chat
[INFO][2023-04-13 15:03:56][base.py:109] - 执行Tool: morning-news中...
[INFO][2023-04-13 15:03:56][bot.py:87] - 行动输入: 给我今天的早报
[WARNING][2023-04-13 15:04:57][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
[ERROR][2023-04-13 15:06:01][victorinox.py:86] - [APP] catch a Exception: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60)
[INFO][2023-04-13 15:06:36][base.py:109] - 执行Tool: morning-news中...
[INFO][2023-04-13 15:06:36][bot.py:87] - 行动输入: 给我今天的早报
[WARNING][2023-04-13 15:07:36][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
[ERROR][2023-04-13 15:08:41][victorinox.py:86] - [APP] catch a Exception: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60)
[ERROR][2023-04-13 15:08:41][victorinox.py:90] - exceed retry_num
[ERROR][2023-04-13 15:08:41][tool.py:92] - 超过重试次数

image

我是试着修改下面的配置,但还是没用
"request_timeout": 300,
"timeout": 300,

Meteo Weather需要设置APIkey么?天气查询失败

[INFO][2023-04-11 09:39:13][base.py:99] - 执行Tool: Meteo Weather中...
[INFO][2023-04-11 09:39:13][bot.py:87] - 行动输入: 查询沈阳4月11日的天气怎么样
[INFO][2023-04-11 09:39:51][bot.py:87] - 行动输入: 由于API密钥无效,我无法获取沈阳4月11日的天气信息。请提供有效的API密钥以获取天气信息。
[INFO][2023-04-11 09:39:53][wechat_channel.py:164] - [WX] sendMsg=Reply(type=TEXT, content=[bot]由于API密钥无效,我无法获取沈阳4月11日的天气信息。请提供有效的API密钥以获取天气信息。), receiver=@4d7df954e1085ea9dfb9ed45c772fce6

为什么news用不了

image
image
这是log
'''
已加载工具列表:
terminal, wikipedia, wolfram-alpha, url-get, meteo-weather, python), receiver=@c95520fffe8bxxxxxxxxxxx
[INFO][2023-05-15 19:24:27][init.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[WARNING][2023-05-15 19:24:27][tool.py:171] - [tool] filter invalid tool: 'news'
[WARNING][2023-05-15 19:24:27][tool.py:171] - [tool] filter invalid tool: 'morning-news'
[INFO][2023-05-15 19:24:27][init.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[WARNING][2023-05-15 19:24:27][victorinox.py:41] - refresh the config of tools
[WARNING][2023-05-15 19:24:27][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[INFO][2023-05-15 19:24:27][victorinox.py:86] - use_tools=['terminal', 'wikipedia', 'wolfram-alpha', 'url-get', 'meteo-weather', 'python'], params: {'debug': False, 'openai_api_key': 'sk-', 'open_ai_api_base': 'https://chatgp/v1', 'proxy': '', 'request_timeout': 120, 'model_name': 'gpt-3.5-turbo', 'no_default': False, 'top_k_results': 3, 'news_api_key': 'd650dxxxxxxxx069e0a', 'bing_subscription_key': '', 'google_api_key': '', 'google_cse_id': '', 'searx_search_host': '', 'wolfram_alpha_appid': '8EWxxxxxxxTXA', 'morning_news_api_key': 'N0VxxxxxxxxxxL0U', 'cuda_device': 'cpu', 'think_depth': 3, 'arxiv_summary': True, 'morning_news_use_llm': False}
[INFO][2023-05-15 19:24:27][wechat_channel.py:184] - [WX] sendMsg=Reply(type=TEXT, content=[bot] 重置工具成功), receiver=@c95520fffxxxxxxxxxxx
[INFO][2023-05-15 19:24:33][wechat_channel.py:187] - [WX] sendMsg=Reply(type=INFO, content=[INFO]
这是一个能让chatgpt联网,搜索,数字运算的插件,将赋予强大且丰富的扩展能力。
使用说明:
$tool 命令: 根据给出的{命令}使用一些可用工具尽力为你得到结果。
$tool reset: 重置工具。

已加载工具列表:
terminal, wikipedia, wolfram-alpha, url-get, meteo-weather, python), receiver=@c95520fffe8b2xxxxxxxxxxxxxxxxx
'''

多此一举地问一下,LLM-OS返回的结果可以再characterize一道吗(

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

/
  1. 你的问题:
就是让$tool的回复也能role play
  1. 收到ai的回复:
/
  1. debug模式终端打印的日志:
/

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

LLM-OS 海外服务器连接超时

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

海外服务器未设置代理,LLM-OS好像是连接不上网络,需要设置代理吗?

  1. 你复现时的config.json,注意抹去你的api-key
----config.json-----

{
  "tools": [
    "news",
    "arxiv",
    "debug",
    "summary",
    "url-get",
    "wikipedia",
    "bing-search",
    "meteo-weather",
    "wolfram-alpha"

  ],
  "kwargs": {
    "model_name": "gpt-3.5-turbo",
    "proxy": "",
    "searx_host": "",
    "top_k_results": 2,
    "no_default": true,
    "debug": true,
    "morning_news_use_llm": true,
    "arxiv_summary": false,
    "bing_subscription_key": " 8a278fc47d08",
    "news_api_key":"9698f2fddd62b941",
    "wolfram_alpha_appid":"R7RJ4H",
    "google_api_key": "FEwAkp3Fm1-Mg",
    "google_cse_id": "ddc84eb3",
    "morning_news_api_key": "8Qwk"
  }
}

---- .env -------

LLM_API_KEY=sk-xIszmyGxY
LLM_API_BASE_URL=
MODEL_NAME=
THINK_DEPTH=
REQUEST_TIMEOUT=
PROXY=
DEBUG=true



  1. debug模式终端打印的日志:
root@ser074585755966:~# cd chatgpt-tool-hub
root@ser074585755966:~/chatgpt-tool-hub# python3 terminal_io.py
chatgpt-tool-hub version: 0.4.3
Debug 模式 已开启
user 你好 👋  欢迎进入 LLM-OS! 
输入 `/help` 可以获得帮助信息 
目前LLM-OS开发者只有我 能预见有大量🔧不能兼顾 请见谅 😣 
欢迎提issue和pr 希望这个项目变得更好 📈
> user: hello
错误: 超过重试次数. 
> user: 你好
错误: 超过重试次数. 

用url-get从谷歌或者其他搜索引擎下获得解码出现问题。

INFO][2023-04-19 10:50:51][base.py:107] - 执行Tool: url-get中...
[INFO][2023-04-19 10:50:51][bot.py:91] - 输入: https://www.google.com/search?q=%E4%B8%AD%E7%89%B9%E4%BC%B0
DEBUG][2023-04-19 10:50:53][tool_engine.py:139] - llm received: `"UnicodeEncodeError('gbk', '中特估 - Google 検索×数秒たってもリダイレクトされない場合は、ここをクリックしてください。\r\nすべてニュース画像動画 地図 ショッピング 書籍 検索ツール\r\nすべての言語すべての言語日本語のページを検索期間指定なし期間指定なし 1 時間以内 24 時間以内 1 週間以内 1 か月以内 1 年以内すべての結果すべての結果完全一致“中特估”是什么? - 新浪财经finance.sina.com.cn › jjzl › doc-imymrxkr99179312023/03/21 · “中特估”主要以央企、国企以及一些特殊行业的上市公司为主

天气无法获取(内含日志)

在执行“使用meteo,告诉我今天广州天气”时出现问题,以下是日志

[INFO][2023-04-15 05:32:39][base.py:109] - 执行Tool: meteo-weather中...
[INFO][2023-04-15 05:32:39][bot.py:87] - 行动输入: 今天广州的天气 daily
[WARNING][2023-04-15 05:32:39][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method..
[ERROR][2023-04-15 05:32:44][victorinox.py:86] - [APP] catch a Exception: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
[ERROR][2023-04-15 05:32:44][victorinox.py:90] - exceed retry_num
[ERROR][2023-04-15 05:32:44][tool.py:92] - 超过重试次数
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f3fe8dd93a0>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.weather.com.cn', port=443): Max retries exceeded with url: /data/cityinfo/101280101.html (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3fe8dd93a0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 84, in ask
return self.bot.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 156, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 122, in _take_next_step
observation = tool.run(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 73, in run
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 70, in run
observation = self._run(tool_input)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/meteo/meteo_weather.py", line 36, in _run
return self.api_chain.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/api/base.py", line 73, in _call
api_response = self.requests_wrapper.get(api_url)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 93, in get
response = requests.get(url, headers=self.headers, params=params, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.weather.com.cn', port=443): Max retries exceeded with url: /data/cityinfo/101280101.html (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3fe8dd93a0>: Failed to establish a new connection: [Errno -2] Name or service not known'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 84, in ask
return self.bot.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 156, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 122, in _take_next_step
observation = tool.run(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 73, in run
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 70, in run
observation = self._run(tool_input)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/meteo/meteo_weather.py", line 36, in _run
return self.api_chain.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/api/base.py", line 66, in _call
api_url = self.api_request_chain.predict(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 151, in predict
return self(kwargs)[self.output_key]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 57, in _call
return self.apply([inputs])[0]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 118, in apply
response = self.generate(input_list)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 62, in generate
return self.llm.generate_prompt(prompts, stop)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 78, in generate_prompt
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 75, in generate_prompt
output = self.generate(prompt_messages, stop=stop)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 52, in generate
results = [self._generate(m, stop=stop) for m in messages]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 52, in
results = [self._generate(m, stop=stop) for m in messages]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 274, in _generate
response = self.completion_with_retry(messages=message_dicts, **params)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 234, in completion_with_retry
return _completion_with_retry(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 325, in iter
raise retry_exc.reraise()
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 158, in reraise
raise self.last_attempt.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 232, in _completion_with_retry
return self.client.create(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 619, in _interpret_response
self._interpret_response_line(
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(
openai.error.RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/chatgpt-on-wechat/plugins/tool/tool.py", line 88, in on_handle_context
_reply = self.app.ask(query, user_session)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 88, in ask
return self.ask(query, chat_history, retry_num + 1)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 91, in ask
raise TimeoutError("超过重试次数")
TimeoutError: 超过重试次数
[ERROR][2023-04-15 05:32:44][tool.py:93] - 超过重试次数
[DEBUG][2023-04-15 05:32:44][chat_channel.py:146] - [WX] ready to handle context: type=TEXT, content=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理
[INFO][2023-04-15 05:32:44][chat_gpt_bot.py:35] - [CHATGPT] query=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理
[DEBUG][2023-04-15 05:32:44][session_manager.py:66] - prompt tokens used=353
[DEBUG][2023-04-15 05:32:44][chat_gpt_bot.py:53] - [CHATGPT] session query=[{'role': 'system', 'content': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}, {'role': 'assistant', 'content': '哟~这个问题我可不大清楚喔,不好意思啊。 ChatGPT 我的确可以回答大部分问题,但是有些问题在当前的工具插件上还无法处理呢。\n\n听说你想知道广州今天的天气?很遗憾啊~ 我们的工具插件目前无法提供对天气预报的支持,因此我无法为您进行相关查询。\n\n不过别灰心,还有许多其他问题可以向我提出哦。我会尽我所能地帮助您解答疑问。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}]
[WARNING][2023-04-15 05:32:44][chat_gpt_bot.py:120] - [CHATGPT] RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
[WARNING][2023-04-15 05:32:49][chat_gpt_bot.py:139] - [CHATGPT] 第1次重试
[WARNING][2023-04-15 05:32:49][chat_gpt_bot.py:120] - [CHATGPT] RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
[WARNING][2023-04-15 05:32:54][chat_gpt_bot.py:139] - [CHATGPT] 第2次重试
[DEBUG][2023-04-15 05:33:03][chat_gpt_bot.py:62] - [CHATGPT] new_query=[{'role': 'system', 'content': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}, {'role': 'assistant', 'content': '哟~这个问题我可不大清楚喔,不好意思啊。 ChatGPT 我的确可以回答大部分问题,但是有些问题在当前的工具插件上还无法处理呢。\n\n听说你想知道广州今天的天气?很遗憾啊~ 我们的工具插件目前无法提供对天气预报的支持,因此我无法为您进行相关查询。\n\n不过别灰心,还有许多其他问题可以向我提出哦。我会尽我所能地帮助您解答疑问。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}], session_id=filehelper, reply_cont=Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。

似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。

不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。, completion_tokens=145
[DEBUG][2023-04-15 05:33:03][session_manager.py:77] - raw total_tokens=498, savesession tokens=503
[DEBUG][2023-04-15 05:33:03][chat_channel.py:134] - [WX] ready to decorate reply: Reply(type=TEXT, content=Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。

似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。

不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。)
[DEBUG][2023-04-15 05:33:03][chat_channel.py:225] - [WX] ready to send reply: Reply(type=TEXT, content=[bot] Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。

似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。

不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。), context: Context(type=TEXT, content=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e32d00>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[INFO][2023-04-15 05:33:03][wechat_channel.py:164] - [WX] sendMsg=Reply(type=TEXT, content=[bot] Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。

似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。

不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。), receiver=filehelper
[DEBUG][2023-04-15 05:33:03][chat_channel.py:241] - Worker return success, session_id = filehelper
[WARNING][2023-04-15 05:33:26][wechat_message.py:52] - [WX]get other_user_id failed: 'NickName'
[DEBUG][2023-04-15 05:33:26][wechat_channel.py:138] - [WX]receive text msg: {"MsgId": "8282463993774320030", "FromUserName": "@5cb59c41bbcaf32c0077b60f5507b3379f90af814f7e432a8f57c82d3237f0d2", "ToUserName": "filehelper", "MsgType": 1, "Content": "bot #debug", "Status": 3, "ImgStatus": 1, "CreateTime": 1681536806, "VoiceLength": 0, "PlayLength": 0, "FileName": "", "FileSize": "", "MediaId": "", "Url": "", "AppMsgType": 0, "StatusNotifyCode": 0, "StatusNotifyUserName": "", "RecommendInfo": {"UserName": "", "NickName": "", "QQNum": 0, "Province": "", "City": "", "Content": "", "Signature": "", "Alias": "", "Scene": 0, "VerifyFlag": 0, "AttrStatus": 0, "Sex": 0, "Ticket": "", "OpCode": 0}, "ForwardFlag": 0, "AppInfo": {"AppID": "", "Type": 0}, "HasProductId": 0, "Ticket": "", "ImgHeight": 0, "ImgWidth": 0, "SubMsgType": 0, "NewMsgId": 8282463993774320030, "OriContent": "", "EncryFileName": "", "User": {"UserName": "filehelper", "MemberList": []}, "Type": "Text", "Text": "bot #debug"}, cmsg=ChatMessage: id=8282463993774320030, create_time=1681536806, ctype=TEXT, content=bot #debug, from_user_id=@5cb59c41bbcaf32c0077b60f5507b3379f90af814f7e432a8f57c82d3237f0d2, from_user_nickname=LINK, to_user_id=filehelper, to_user_nickname=None, other_user_id=filehelper, other_user_nickname=None, is_group=False, is_at=False, actual_user_id=None, actual_user_nickname=None
[DEBUG][2023-04-15 05:33:26][chat_channel.py:282] - [WX] consume context: Context(type=TEXT, content=#debug, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e37130>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[DEBUG][2023-04-15 05:33:26][chat_channel.py:130] - [WX] ready to handle context: Context(type=TEXT, content=#debug, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e37130>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[DEBUG][2023-04-15 05:33:26][plugin_manager.py:157] - Plugin GODCMD triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-15 05:33:26][godcmd.py:196] - [Godcmd] on_handle_context. content: #debug
[DEBUG][2023-04-15 05:33:26][godcmd.py:349] - [Godcmd] admin command: debug by filehelper
[DEBUG][2023-04-15 05:33:26][chat_channel.py:134] - [WX] ready to decorate reply: Reply(type=INFO, content=DEBUG模式已开启)
[DEBUG][2023-04-15 05:33:26][chat_channel.py:225] - [WX] ready to send reply: Reply(type=INFO, content=[INFO]
DEBUG模式已开启), context: Context(type=TEXT, content=#debug, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e37130>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[INFO][2023-04-15 05:33:26][wechat_channel.py:167] - [WX] sendMsg=Reply(type=INFO, content=[INFO]
DEBUG模式已开启), receiver=filehelper
[DEBUG][2023-04-15 05:33:26][chat_channel.py:241] - Worker return success, session_id = filehelper

tool 插件的问题, 采用tool命令,确生成聊天的summary

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
  "tools": [],
  "kwargs": {
      "debug": true  // debug模式一定要打开
  }
}
  1. 你的问题:
[替换我]

正常启动插件,但是问题都变成被summary
3. 收到ai的回复:

![image](https://user-images.githubusercontent.com/15274284/234745136-148abda1-6878-48f0-9b30-7f6e46754340.png)

  1. debug模式终端打印的日志:

[DEBUG][2023-04-27 02:24:56][chat_channel.py:262] - Worker return success, session_id = @838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee
[DEBUG][2023-04-27 02:25:01][wechat_channel.py:161] - [WX]receive text msg: {"MsgId": "5353332160588795729", "FromUserName": "@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee", "ToUserName": "@f8e8a4dc864139b4bc6d8d26044cac26e6c32c4d1c9b7d604cc5e4cb1f090b95", "MsgType": 1, "Content": "b $tool 使用metro,查询4月27日北京的天气", "Status": 3, "ImgStatus": 1, "CreateTime": 1682562300, "VoiceLength": 0, "PlayLength": 0, "FileName": "", "FileSize": "", "MediaId": "", "Url": "", "AppMsgType": 0, "StatusNotifyCode": 0, "StatusNotifyUserName": "", "RecommendInfo": {"UserName": "", "NickName": "", "QQNum": 0, "Province": "", "City": "", "Content": "", "Signature": "", "Alias": "", "Scene": 0, "VerifyFlag": 0, "AttrStatus": 0, "Sex": 0, "Ticket": "", "OpCode": 0}, "ForwardFlag": 0, "AppInfo": {"AppID": "", "Type": 0}, "HasProductId": 0, "Ticket": "", "ImgHeight": 0, "ImgWidth": 0, "SubMsgType": 0, "NewMsgId": 5353332160588795729, "OriContent": "", "EncryFileName": "", "User": {"MemberList": [], "Uin": 0, "UserName": "@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee", "NickName": "博洋", "HeadImgUrl": "/cgi-bin/mmwebwx-bin/webwxgeticon?seq=751762527&username=@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee&skey=@crypt_650a1e63_2de85d1cb97dde1c6714be1dc1aee511", "ContactFlag": 1, "MemberCount": 0, "RemarkName": "", "HideInputBarFlag": 0, "Sex": 1, "Signature": "人菜瘾大", "VerifyFlag": 0, "OwnerUin": 0, "PYInitial": "BY", "PYQuanPin": "boyang", "RemarkPYInitial": "", "RemarkPYQuanPin": "", "StarFriend": 0, "AppAccountFlag": 0, "Statues": 0, "AttrStatus": 102437, "Province": "北京", "City": "", "Alias": "", "SnsFlag": 257, "UniFriend": 0, "DisplayName": "", "ChatRoomId": 0, "KeyWord": "", "EncryChatRoomId": "", "IsOwner": 0}, "Type": "Text", "Text": "b $tool 使用metro,查询4月27日北京的天气"}, cmsg=ChatMessage: id=5353332160588795729, create_time=1682562300, ctype=TEXT, content=b $tool 使用metro,查询4月27日北京的天气, from_user_id=@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee, from_user_nickname=博洋, to_user_id=@f8e8a4dc864139b4bc6d8d26044cac26e6c32c4d1c9b7d604cc5e4cb1f090b95, to_user_nickname=RBQ3.0, other_user_id=@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee, other_user_nickname=博洋, is_group=False, is_at=False, actual_user_id=None, actual_user_nickname=None
[DEBUG][2023-04-27 02:25:01][plugin_manager.py:163] - Plugin SUMMARY triggered by event Event.ON_RECEIVE_MESSAGE
[DEBUG][2023-04-27 02:25:01][main.py:90] - [Summary] insert record: 博洋 5353332160588795729 博洋 b $tool 使用metro,查询4月27日北京的天气 TEXT 1682562300 1
[DEBUG][2023-04-27 02:25:01][chat_channel.py:307] - [WX] consume context: Context(type=TEXT, content=$tool 使用metro,查询4月27日北京的天气, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WechatMessage object at 0x7fa4aa9fab90>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': '@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee', 'receiver': '@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee'})
[DEBUG][2023-04-27 02:25:01][chat_channel.py:141] - [WX] ready to handle context: Context(type=TEXT, content=$tool 使用metro,查询4月27日北京的天气, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WechatMessage object at 0x7fa4aa9fab90>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': '@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee', 'receiver': '@838b60254824f07db26549e650b2f45d7f54b32fc8e76c8b0b8a96871c45d6ee'})
[DEBUG][2023-04-27 02:25:01][plugin_manager.py:163] - Plugin GODCMD triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-27 02:25:01][godcmd.py:206] - [Godcmd] on_handle_context. content: $tool 使用metro,查询4月27日北京的天气
[DEBUG][2023-04-27 02:25:01][plugin_manager.py:163] - Plugin KEYWORD triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-27 02:25:01][keyword.py:52] - [keyword] on_handle_context. content: $tool 使用metro,查询4月27日北京的天气
[DEBUG][2023-04-27 02:25:01][plugin_manager.py:163] - Plugin SDWEBUI triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-27 02:25:01][plugin_manager.py:163] - Plugin ROLE triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-27 02:25:01][plugin_manager.py:163] - Plugin DUNGEON triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-27 02:25:01][dungeon.py:73] - [Dungeon] on_handle_context. content: ['$tool', '使用metro,查询4月27日北京的天气']
[DEBUG][2023-04-27 02:25:01][plugin_manager.py:163] - Plugin SUMMARY triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-27 02:25:01][main.py:221] - [Summary] on_handle_context. content: $tool 使用metro,查询4月27日北京的天气
[DEBUG][2023-04-27 02:25:01][chat_gpt_session.py:63] - Warning: model not found. Using cl100k_base encoding.
[DEBUG][2023-04-27 02:25:01][main.py:195] - [Summary] summary all 75 messages
[DEBUG][2023-04-27 02:25:01][chat_gpt_session.py:63] - Warning: model not found. Using cl100k_base encoding.
[DEBUG][2023-04-27 02:25:01][main.py:199] - [Summary] session query: [{'role': 'system', 'content': '你是一位群聊机器人,需要对聊天记录进行简明扼要的总结,用列表的形式输出。\n聊天记录格式:[x]是emoji表情或者是对图片和声音文件的说明,消息最后出现表示消息触发了群聊机器人的回复,内容通常是提问,若带有特殊符号如#和$则是触发你无法感知的某个插件功能,聊天记录中不包含你对这类消息的回复,可降低这些消息的权重。请不要在回复中包含聊天记录格式中出现的符号。\n'}, {'role': 'user', 'content': '需要你总结的聊天记录如下:\n\n博洋: "b #auth 4621130" \n\n博洋: "b #installp sdwebui" \n\n博洋: "b #scanp" \n\n博洋: "b 画一个鸭子" \n\n博洋: "b 画 横版 高清 二次元:cat" \n\n博洋: "b #help" \n\n博洋: "b #plist" \n\n博洋: "b #help summary" \n\n博洋: "b 总结博洋
总结50"" \n\n博洋: "b "$总结 100"" \n\n博洋: "b $总结 100" \n\n博洋: "b #help tool" \n\n博洋: "b $tool 查一下今天的天气" \n\n博洋: "b $tool 用 meteo-weather 查看一下今天北京的天气情况 " \n\n博洋: "b $tool 用 meteo-weather 查看一下今天北京的天气情况 " \n\n博洋: "b $tool 查看一下今天北京的天气情况 " \n\n博洋: "b $tool 查看一下NBA比赛新闻" \n\n博洋: "b $tool reset" \n\n博洋: "b $tool 查一下今天的新闻" \n\n博洋: "[IMAGE]"\n\n博洋: "b #plist" \n\n博洋: "b #auth 4621130" \n\n博洋: "b #plist" \n\n博洋: "b #auth 4621130" \n\n博洋: "b #plist" \n\n博洋: "b #enablep sdwebui" \n\n博洋: "b #auth 4621130" \n\n博洋: "b #enablep sdwebui" \n\n博洋: "b 画个小鸭子" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair, up half body" \n\n博洋: "b #enablep sdwebui" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair, up half body" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画横版 高清 水墨:长城" \n\n博洋: "b #auth 4621130" \n\n博洋: "b #plist" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b #plist" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b #enablep sdwebui" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b #enablep sdwebui" \n\n博洋: "b #auth 4621130" \n\n博洋: "b #plist" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:girl,cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画横版 高清 水墨**画:greatwall" \n\n博洋: "[IMAGE]"\n\n博洋: "b #auth 4621130" \n\n博洋: "b #plist" \n\n博洋: "b #enablep sdwebui" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 画竖版 高清 二次元:cat ear,glasses, purple eye, black hair" \n\n博洋: "b 使用Terminal,查找我的用户目录有那些文件" \n\n博洋: "b $tool 使用Terminal,查找我的用户目录有那些文件" \n\n博洋: "b" \n\n博洋: "b #help tool" \n\n博洋: "b $tool 使用Terminal, ls -l" \n\n博洋: "b $tool 使用Terminal, ls -l" \n\n博洋: "b $tool 使用Terminal" \n\n博洋: "b $tool 激活tool插件" \n\n博洋: "b $tool" \n\n博洋: "b $tool 使用metro,查询4月27日北京的天气" \n\n博洋: "b #auth 4621130" \n\n博洋: "b $tool 使用metro,查询4月27日北京的天气" '}], prompt_tokens: 1876
[DEBUG][2023-04-27 02:25:20][main.py:202] - [Summary] total_tokens: 2276, completion_tokens: 400, reply_content: - 发送了指令#auth 4621130

发送了指令#installp sdwebui
发送了指令#scanp
发送了指令#help
发送了指令#plist
发送了指令#help summary
发送了指令$总结50
发送了指令$总结50
发送了指令$总结100
发送了指令$总结100
发送了指令#help tool
发送了指令$tool 查一下今天的天气
发送了指令$tool 用 meteo-weather 查看一下今天北京的天气情况
发送了指令$tool 查看一下今天北京的天气情况
发送了指令$tool 查看一下NBA比赛新闻
发送了指令$tool reset
发送了指令$tool 查一下今天的新闻

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

如果想让chatgpt自动补充当前或未来最新日期这个可以如何实现或者给他prompt

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

我想让chatgpt知道我们说的某一个事情是哪一天,比如我说明天我要去聚餐,我要让chatgpt自动改成 2023年5月14日要去聚餐。
现在我用tool工具里面的python是可以查询系统最新日期,但是chatgpt没有办法自动知道当前日期,能否在那个地方直接设置让他自动先调用工具查询今天最新日期,然后推测出我说的明天或后天对应是那个日期?

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
  "tools": [],
  "kwargs": {
      "debug": true  // debug模式一定要打开
  }
}
  1. 你的问题:
[替换我]
  1. 收到ai的回复:
[替换我]
  1. debug模式终端打印的日志:
[替换我]

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

有个疑问,鉴于工具现在能自动执行终端和python命令,如何确保自动操作的安全性

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

有个疑问,鉴于工具现在能自动执行终端和python命令,如何确保自动操作的安全性

【需求】能否写一个调用网页版newbing的插件

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

能否写一个调用网页版newbing的插件,实现是否能够参考这个项目https://github.com/josStorer/chatGPTBox ,现在调用bing和google 获得的回答并不理想。

升级了tool-hub0.4.1 还是没能启动tool,请问这个该怎么解决?

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key
    {
    "tools": ["python", "url-get", "terminal", "meteo-weather","wolfram-alpha"],
    "kwargs": {
    "top_k_results": 2,
    "openai_api_key": "1234",
    "proxy": "",
    "debug": true,
    "no_default": false,
    "model_name": "gpt-3.5-turbo",
    "wolfram_alpha_appid": "1234"
    }
    }


2. 你的问题:

```text
[升级了0.4.1的tool-hub,输入 bot$tool,报错,未知插件命令,输入bot # help tool,插件不存在活未启用,输入bot # help python,插件不存在活未启用],我主要是想启动wolfram。请问这个该怎么解决?
  1. 收到ai的回复:
[替换我]
  1. debug模式终端打印的日志:
[替换我]

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

关于News新闻和天气的两个小问题

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

chatgpt-on-wechat:1.2.3.2
chatgpt-tool-hub:0.4.1

问题描述

AI在发送新闻内容的前面会带上一串字符,在获取天气的时候AI回复的是英文

image
image

{
"tools": [
"news",
"url-get",
"terminal",
"wikipedia",
"bing-search",
"meteo-weather",
"wolfram-alpha"

],
"kwargs": {
"top_k_results": 2,
"no_default": true,
"debug": true,
"searx_host": "",
"model_name": "gpt-3.5-turbo",
"bing_subscription_key": "81484fb4",
"news_api_key":"89eff01a",
"wolfram_alpha_appid":"Q93",
"google_api_key": "AIzaS",
"google_cse_id": "2300",
"zaobao_api_key": "0iLA5"
}
}

环境

  • 操作系统类型 :Ubuntu-22.04-x64
  • Python版本 :3.10
  • pip版本 ( 执行 pip -V):

[交流] 关于如何更好的使用tool的技巧

旧tool调优记录:

1. terminal

借助wechat和chatgpt-on-wechat,你获得了一个便携的向服务器执行shell命令的方法
如果你的服务器没有公网地址,那么你就获得一个内网穿透的替代方案
PS: 该tool已对危险指令实现了一个简单的过滤

1. 使用Terminal,查找我的用户目录有那些文件

您的用户目录下有许多文件和文件夹,包括Applications、Desktop、Documents、Downloads、Library、Movies、Music、Pictures等等。

2. 使用Terminal,告诉我当前用户名、所在组

我已经使用Terminal工具,获取到了当前用户名为goldfish,所在组为staff、everyone、localaccounts、_appserverusr、admin、_appserveradm、_lpadmin、com.apple.access_screensharing、_appstore、_lpoperator、_developer、_analyticsusers、com.apple.access_ftp、com.apple.access_ssh、com.apple.access_remote_ae。

3. 使用Terminal, ls -l

您输入了命令"ls -l",我在终端中执行了该命令,并返回了当前目录下的文件列表及其详细信息。

PS: 可在日志查看terminal确实执行该指令

4. 使用Terminal, 帮我查看chatgpt_tool_hub目录version.py文件包含内容是什么

无法使用Terminal查看chatgpt_tool_hub目录下的version.py文件,因为该目录不存在。请确认该目录是否存在或者输入是否正确。

5. 使用Terminal,帮我查看当前目录version.py文件包含内容是什么

当前目录下的version.py文件包含的内容是__version__ = ‘0.3.7’。

6. 使用Terminal,帮我查看当前目录version.py文件包含内容是什么(设置terminal了超时时间)

很抱歉,由于执行命令的时间超过了0.0001秒的限制,我无法查看当前目录下version.py文件的内容。请您尝试其他方法或者缩小文件范围。

terminal的调优将更新在chatgpt_tool_hub 0.3.7版本,如果你需要体验可执行更新tool插件依赖包的命令,之后重启chatgpt-on-wechat项目

pip install -i https://pypi.python.org/simple chatgpt_tool_hub==0.3.7

2. meteo-weather

回答你有关天气的询问, 需要获取时间、地点上下文信息,本工具使用了meteo open api

1. 使用meteo,查询4月10号杭州的天气情况

2023年4月10日杭州的天气情况是多云,气温在12.3°C到27.0°C之间。

meteo 接口返回:

{"latitude":30.25,"longitude":120.125,"generationtime_ms":0.14698505401611328,"utc_offset_seconds":28800,"timezone":"Asia/Shanghai","timezone_abbreviation":"CST","elevation":13.0,"hourly_units":{"time":"iso8601","temperature_2m":"°C"},"hourly":{"time":["2023-04-10T00:00","2023-04-10T01:00","2023-04-10T02:00","2023-04-10T03:00","2023-04-10T04:00","2023-04-10T05:00","2023-04-10T06:00","2023-04-10T07:00","2023-04-10T08:00","2023-04-10T09:00","2023-04-10T10:00","2023-04-10T11:00","2023-04-10T12:00","2023-04-10T13:00","2023-04-10T14:00","2023-04-10T15:00","2023-04-10T16:00","2023-04-10T17:00","2023-04-10T18:00","2023-04-10T19:00","2023-04-10T20:00","2023-04-10T21:00","2023-04-10T22:00","2023-04-10T23:00"],"temperature_2m":[12.3,11.6,11.3,11.0,10.7,10.5,10.3,11.6,14.5,17.6,20.6,23.1,24.8,26.1,26.8,27.0,26.3,24.8,22.7,20.6,18.9,18.5,17.9,17.6]},"daily_units":{"time":"iso8601"},"daily":{"time":["2023-04-10"]}}

chatgpt能自己推断出城市到经纬度的映射关系确实很神奇
截屏2023-04-09 23 39 29

2. 使用meteo,明天北京会下雨吗?

根据API的响应,无法确定明天北京是否会下雨。API调用仅提供2023年4月10日的降水和天气代码信息,但没有指定是否会下雨。

meteo 接口返回:

{"latitude":39.875,"longitude":116.375,"generationtime_ms":0.1609325408935547,"utc_offset_seconds":28800,"timezone":"Asia/Shanghai","timezone_abbreviation":"CST","elevation":47.0,"hourly_units":{"time":"iso8601","precipitation":"mm"},"hourly":{"time":["2023-04-10T00:00","2023-04-10T01:00","2023-04-10T02:00","2023-04-10T03:00","2023-04-10T04:00","2023-04-10T05:00","2023-04-10T06:00","2023-04-10T07:00","2023-04-10T08:00","2023-04-10T09:00","2023-04-10T10:00","2023-04-10T11:00","2023-04-10T12:00","2023-04-10T13:00","2023-04-10T14:00","2023-04-10T15:00","2023-04-10T16:00","2023-04-10T17:00","2023-04-10T18:00","2023-04-10T19:00","2023-04-10T20:00","2023-04-10T21:00","2023-04-10T22:00","2023-04-10T23:00"],"precipitation":[0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00]},"daily_units":{"time":"iso8601","weathercode":"wmo code"},"daily":{"time":["2023-04-10"],"weathercode":[3]}}

注:严谨的chatgpt没有觉得全天降雨量均为0能推断出明天北京是否会下雨。

一番prompt tuning后:

抱歉,根据OpenMeteo API的响应,无法确定明天北京是否会下雨。API只提供未来24小时的天气代码和降水数据,但它不指示明天是否会下雨。因此,我无法提供明确的答案。API响应只包括2023年4月11日的每小时天气数据,并没有提供明天是否会下雨的明确指示。

PS:我从tuning结果分析,觉得chatgpt有道理。这一块我没有用prompt暗示chatgpt能从降雨数据推断出下雨

3. 使用meteo,明天北京云量怎么样?

我很抱歉,我无法回答您的问题。我尝试使用meteo-weather工具获取明天北京的云量信息,但是该API无法提供云量信息。我还尝试使用url-get工具搜索相关信息,但是搜索结果并没有提供明确的答案。很抱歉无法帮助您解决问题。

中间过程出现错误,一番prompt tuning后:

{"latitude":39.875,"longitude":116.375,"generationtime_ms":0.1800060272216797,"utc_offset_seconds":28800,"timezone":"Asia/Shanghai","timezone_abbreviation":"CST","elevation":47.0,"hourly_units":{"time":"iso8601","cloudcover":"%"},"hourly":{"time":["2023-04-11T00:00","2023-04-11T01:00","2023-04-11T02:00","2023-04-11T03:00","2023-04-11T04:00","2023-04-11T05:00","2023-04-11T06:00","2023-04-11T07:00","2023-04-11T08:00","2023-04-11T09:00","2023-04-11T10:00","2023-04-11T11:00","2023-04-11T12:00","2023-04-11T13:00","2023-04-11T14:00","2023-04-11T15:00","2023-04-11T16:00","2023-04-11T17:00","2023-04-11T18:00","2023-04-11T19:00","2023-04-11T20:00","2023-04-11T21:00","2023-04-11T22:00","2023-04-11T23:00"],"cloudcover":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"daily_units":{"time":"iso8601"},"daily":{"time":["2023-04-11"]}}

根据OpenMeteo API的响应,似乎无法回答这个问题,因为2023年4月11日北京的云量信息不可用。 API响应仅包括2023年4月11日的每小时云量数据,所有小时的值均为0。因此,明天北京的云量信息不可用。

PS:输出结果的可解释性更强了,我认为从所有小时的值均为0推断出云量信息不可用有道理。

4. 使用meteo,昨天北京日出时间是多少?

{"latitude":39.875,"longitude":116.375,"generationtime_ms":0.16307830810546875,"utc_offset_seconds":28800,"timezone":"Asia/Shanghai","timezone_abbreviation":"CST","elevation":47.0,"daily_units":{"time":"iso8601","sunrise":"iso8601"},"daily":{"time":["2023-04-09","2023-04-10","2023-04-11","2023-04-12","2023-04-13","2023-04-14","2023-04-15","2023-04-16"],"sunrise":["2023-04-09T05:45","2023-04-10T05:43","2023-04-11T05:42","2023-04-12T05:40","2023-04-13T05:38","2023-04-14T05:37","2023-04-15T05:35","2023-04-16T05:34"]}}

根据您的要求,我使用了meteo-weather工具来获取昨天北京的日出时间。根据API的响应,昨天北京的日出时间是05:45。

PS:回答精准,不过你们应该看不见中间prompt失败的过程,真的不来tool的仓库点一个star吗?chatgpt-tool-hub

tuning后meteo的实用性大大增强了,由于最近项目重构有些接口改变,暂时不打新版本的包

注:该工具比较耗时、耗token

3. morning-news

这是一个最近从issue 800看到的一个需求,这个需求获取的内容很简单,每天1点更新一次当日新闻,我觉得挺实用就跟进了

PS:如果有类似的需求欢迎PR到chatgpt-tool-hub,仅用半小时就能实现

  1. 给我今天的早报
早报日期:2023-04-11
微语:撑不住的时候可以说“我好累”,但永远不要说“我不行”。

早报新闻列表:
1、**气象台发布沙尘暴蓝色预警,预计至11日,15省区市有扬沙或浮尘天气,内蒙古局部有强沙尘暴;北京空气质量陷入重度污染,大风沙尘持续至11日傍晚结束,景区关停大型游乐设施等户外游乐项目;
2、国铁集团:4月13日起中老铁路开行国际旅客列车,全程10小时30分,昆明至万象间可实现当日通达;
3、发改委:为杜绝浪费,单桌1500元以上(不含酒水)宴会套餐拟被重点监管;
4、东部战区:圆满完成环台岛战备警巡和“联合利剑“演习各项任务,全面检验了实战条件下多兵种联合作战能力;台媒:歼-15从山东舰起飞进入台东南空域,验证不用导弹就能锁台;美议员称支持向**派兵,“愿为**而战“,网友批:战争贩子!;
5、前**首富、汉能系创始人李河君被有关部门带走数月后,汉能系9家原主体公司将破产清算;
6、北京市住建委:多子女家庭购房“一区一策“措施或将在房山区试点;
7、一辆河南自驾游轿车在山西晋城坠崖,或因驾驶员操作不当引起,救援人员:落差近百米,约有20层楼高,车内2人死亡;
8、**足协明确:俱乐部不得就裁判判罚提出抗议。职业联赛争议判罚申诉制度推行一年后被废止;
9、比亚迪发布“云辇“智能车身控制系统,王传福:更舒适更安全,掉了一个轮子车辆仍能正常行驶;
10、韩国海警又以所谓“非法捕捞“为由扣押3艘**渔船;
11、巴基斯坦西南部俾路支省首府奎达发生爆炸袭击事件,致4死15伤;美国肯塔基州当地10日发生枪击事件,造成至少5死6伤;
12、俄媒:以购买力平价计算,金砖国家经济总量已超七国集团;俄媒:不到一个月时间,客户从美国银行系统提走近5000亿美元,50年来美国最严重的存款流出;
13、NASA:一个“逃逸“黑洞正撕裂宇宙,距离地球75亿光年;
14、拜登称他计划参加2024年美国大选,“但尚未准备好正式宣布”,若其参选,或将依靠数百名“网红“帮助宣传;
15、德国计划于今年6月12日至24日,主导北约史上最大规模空中军演,届时将有24个参演国出动220余架战机;

早报图片:https://file.alapi.cn/60s/202304111681149603.png

terminal的调优将更新在chatgpt_tool_hub 0.3.9版本,如果你需要体验meteo最新的调优效果和morning-news工具可执行更新tool插件依赖包的命令,之后重启chatgpt-on-wechat项目

pip install -i https://pypi.python.org/simple chatgpt_tool_hub==0.3.9

执行指令失败

为什么有些指令会这么回复
image


Action Input: curl google.com), receiver=@3e06c0e43443ade5f24389fc5228e75f3dd800eda69d84a44295a181f47f68b5
[INFO][2023-04-10 14:38:58][base.py:99] - 执行Tool: requests_get中...
[INFO][2023-04-10 14:38:58][bot.py:87] - 行动输入: https://finance.sina.cn/tech/2023-04-09/detail-imypvaue8116083.d.html

[INFO][2023-04-10 14:39:03][bot.py:87] - 行动输入: None
[INFO][2023-04-10 14:39:09][wechat_channel.py:164] - [WX] sendMsg=Reply(type=TEXT, content=the response to the original input question in chineseNew input: 总结这个链接的内容 https://finance.sina.cn/tech/2023-04-09/detail-imypvaue8116083.d.html
Thought: Do I need to use a tool? Yes
Action: requests_get
Action Input: https://finance.sina.cn/tech/2023-04-09/detail-imypvaue8116083.d.html), receiver=@3e06c0e43443ade5f24389fc5228e75f3dd800eda69d84a44295a181f47f68b5
[WARNING][2023-04-10 14:39:50][wechat_message.py:52] - [WX]get other_user_id failed: 'UserName'
[WARNING][2023-04-10 14:41:53][wechat_message.py:52] - [WX]get other_user_id failed: 'UserName'

项目依赖均已更新至最新,tool工具用不起来,提示未知插件命令!

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
  "tools": [
    "python",
    "url-get",
    "terminal",
    "meteo-weather",
    "requests",
    "morning-news",
    "wikipedia",
    "bing-search",
    "wolfram-alpha"
  ],
  "kwargs": {
    "top_k_results": 2,
    "no_default": false,
    "model_name": "gpt-3.5-turbo",
    "zaobao_api_key": "1234"
  }
}

2. 你的问题:

我pip3 install -r requirements.txt,pip3 install -r requirements-optional.txt这两个依赖都更新了,项目也用git pull更新了,都正常,但是启动后$tool,就是不能用。我输入$tool,
查看日志:
[INFO][2023-04-23 03:39:11][wechat_channel.py:196] - [WX] sendMsg=Reply(type=ERROR, content=[ERROR]
未知插件命令
查看插件命令列表请输入#help 插件名
), receiver=@9905db42e440cdcd2aacd2df992549f1

3. 收到ai的回复:
[ERROR]
未知插件命令
查看插件命令列表请输入#help 插件名.]。
之前默认的4个还可以用,现在全部不能用了,这是啥原因?

4. debug模式终端打印的日志:

```text
[替换我]

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

chatgpt-on-wechat中扩展tool工具无法生效

前置确认

1. 网络能够访问openai接口

可以

2. git pull 拉取最新代码

已拉取

3. 执行pip install -r requirements.txt,检查依赖是否满足

满足

4. 在已有 issue 中未搜索到类似问题

不能

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

chatgpt-on-wechat中tool/下增减config.json未生效

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
    "tools":[
        "news",
        "google-search",
        "morning-news"
    ],
    "kwargs":{
        "debug":false,
        "request_timeout":120,
        "no_default":false,
        "model_name":"gpt-3.5-turbo",
        "news_api_key":" ",
        "google_api_key":" ",
        "google_cse_id":" ",
        "morning_news_api_key":" "
    }
}
  1. debug模式终端打印的日志:
[INFO][2023-05-26 04:24:09][config.py:180] - [INIT] override config by environ args: group_chat_in_one_session=["ALL_GROUP"]
[INFO][2023-05-26 04:24:09][config.py:180] - [INIT] override config by environ args: group_name_white_list=["ALL_GROUP"]
[INFO][2023-05-26 04:24:09][config.py:180] - [INIT] override config by environ args: open_ai_api_key= 
[INFO][2023-05-26 04:24:09][config.py:195] - [INIT] load config: {'open_ai_api_key': '', 'model': 'gpt-3.5-turbo', 'proxy': '', 'single_chat_prefix': ['bot', '@bot'], 'single_chat_reply_prefix': '[bot] ', 'group_chat_prefix': ['@bot'], 'group_name_white_list': ['ALL_GROUP'], 'group_chat_in_one_session': ['ALL_GROUP'], 'image_create_prefix': ['画', '看', '找'], 'speech_recognition': False, 'group_speech_recognition': False, 'voice_reply_voice': False, 'conversation_max_tokens': 1000, 'expires_in_seconds': 3600, 'character_desc': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。', 'subscribe_msg': '感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。'}
[INFO][2023-05-26 04:24:09][config.py:145] - [Config] User datas file not found, ignore.
█
[INFO][2023-05-26 04:24:11][plugin_manager.py:50] - Loading plugins config...
[INFO][2023-05-26 04:24:11][plugin_manager.py:66] - Scaning plugins ...
chatgpt-tool-hub version: 0.4.3
[INFO][2023-05-26 04:24:14][plugin_manager.py:41] - Plugin tool_v0.4 registered, path=./plugins/tool
[INFO][2023-05-26 04:24:14][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword
[INFO][2023-05-26 04:24:14][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello
[INFO][2023-05-26 04:24:14][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd
[INFO][2023-05-26 04:24:14][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon
[INFO][2023-05-26 04:24:14][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords
[INFO][2023-05-26 04:24:15][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role
[INFO][2023-05-26 04:24:15][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish
[INFO][2023-05-26 04:24:15][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin GODCMD not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin KEYWORD not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin BANWORDS not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin TOOL not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin ROLE not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin DUNGEON not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin BDUNIT not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin HELLO not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][plugin_manager.py:101] - Plugin FINISH not found in pconfig, adding to pconfig...
[INFO][2023-05-26 04:24:15][godcmd.py:181] - [Godcmd] 因未设置口令,本次的临时口令为2894。
[INFO][2023-05-26 04:24:15][godcmd.py:196] - [Godcmd] inited
[INFO][2023-05-26 04:24:15][keyword.py:40] - [keyword] {}
[INFO][2023-05-26 04:24:15][keyword.py:42] - [keyword] inited.
[WARNING][2023-05-26 04:24:15][banwords.py:53] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords .
[ERROR][2023-05-26 04:24:15][plugin_manager.py:126] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt'
Traceback (most recent call last):
File "/app/plugins/plugin_manager.py", line 124, in activate_plugins
instance = plugincls()
File "/app/plugins/banwords/banwords.py", line 54, in __init__
raise e
File "/app/plugins/banwords/banwords.py", line 40, in __init__
with open(banwords_path, "r", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt'
[INFO][2023-05-26 04:24:15][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[INFO][2023-05-26 04:24:15][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[WARNING][2023-05-26 04:24:16][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[WARNING][2023-05-26 04:24:16][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[INFO][2023-05-26 04:24:16][victorinox.py:86] - use_tools=['python', 'meteo-weather', 'terminal', 'url-get'], params: {'debug': False, 'openai_api_key': ' ', 'open_ai_api_base': 'https://api.openai.com/v1';, 'proxy': '', 'request_timeout': 120, 'model_name': 'gpt-3.5-turbo', 'no_default': False, 'top_k_results': 3, 'news_api_key': '', 'bing_subscription_key': '', 'google_api_key': '', 'google_cse_id': '', 'searx_search_host': '', 'wolfram_alpha_appid': '', 'morning_news_api_key': '', 'cuda_device': 'cpu', 'think_depth': 3, 'arxiv_summary': True, 'morning_news_use_llm': False}
[INFO][2023-05-26 04:24:16][tool.py:32] - [tool] inited
[INFO][2023-05-26 04:24:16][role.py:69] - [Role] inited
[INFO][2023-05-26 04:24:16][dungeon.py:56] - [Dungeon] inited
[WARNING][2023-05-26 04:24:16][bdunit.py:47] - [BDunit] init failed, ignore
[ERROR][2023-05-26 04:24:16][plugin_manager.py:126] - Failed to init BDUNIT, diabled. config.json not found
Traceback (most recent call last):
File "/app/plugins/plugin_manager.py", line 124, in activate_plugins
instance = plugincls()
File "/app/plugins/bdunit/bdunit.py", line 48, in __init__
raise e
File "/app/plugins/bdunit/bdunit.py", line 36, in __init__
raise Exception("config.json not found")
Exception: config.json not found
[INFO][2023-05-26 04:24:16][hello.py:23] - [Hello] inited
[INFO][2023-05-26 04:24:16][finish.py:23] - [Finish] inited
Ready to login.
Getting uuid of QR code.
Downloading QR code.
You can also scan QRCode in any website below:
█▀▀▀▀▀▀▀█▀█▀██▀█▀▀█████▀▀▀▀▀▀▀█
█ █▀▀▀█ ██   ▀█ ▀█▀ ▄██ █▀▀▀█ █
█ █   █ █  █   █▀ ▀▀█▄█ █   █ █
█ ▀▀▀▀▀ █ █ ▄ ▄ █▀▄▀▄ █ ▀▀▀▀▀ █
█▀███▀█▀▀ █▄ ▄█  ▄ █▄ ▀▀▀▀▀██▀█
█▀▄▄▄▄ ▀▀  ▄ ▄▄▀ ▄█▄█▄█▄▄▄▄▄▄ █
█▄█ ▀██▀▀▀ ▀███▄▄▄ ▄▄ ▄█▄▄▄█ ▄█
███▀█▄ ▀▀▀▄▄▄▄ ▀▀▄▄ █▀█▄▄   ▄ █
██ ▄▄▀ ▀▄▄  ▄▄█ ▄▀ ▄█▀ █████ ▄█
█▄▄███▄▀▀▀█▀█▀█▀ ▄  ██▄ ▄ ▄▀▄ █
█▀▀▀▀▄▄▀▀ ▄ █▀█ █▄  █▀▀▀▀ ▀█▄ █
█▀▀▀▀▀▀▀█   ███▀ ▄▄ ▀ █▀█ ▀▀█ █
█ █▀▀▀█ █▀▄▀▄▀▀ ▀█ ▄  ▀▀▀ ▀█▄▀█
█ █   █ ██▀  █▀  ▄  █  ███▀▀▀ █
█ ▀▀▀▀▀ █▀▀▄▄▀█ ▀█ ▀█ ▀▄ █ █ ▄█
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Log in time out, reloading QR code.
Getting uuid of QR code.

环境

railway docker部署

tool.py运行失败

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

ubuntu@ip-172-31-24-107:~/chatgpt-on-wechat/plugins/tool$ python3 tool.py
chatgpt-tool-hub version: 0.4.1
Traceback (most recent call last):
File "/home/ubuntu/chatgpt-on-wechat/plugins/tool/tool.py", line 8, in
import plugins
ModuleNotFoundError: No module named 'plugins'
求助

  • 操作系统类型 (Mac/Windows/Linux):ubuntu
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

天气获取了不返回信息,只告诉我获取成功了。

问题描述

问天气,只告诉我获取成功了。
image

  1. 你复现时的config.json,注意抹去你的api-key
{
  "tools": [
    "google-search",
    "morning-news",
    "searxng-search"
  ],
  "kwargs": {
    "openai_api_key": "sk-",
    "proxy": "http://127.0.0.1:7890",
    "debug": false,
    "no_default": false,
    "model_name": "gpt-3.5-turbo",
    "google_api_key": "",
    "google_cse_id": "",
    "common_proxy": "http://127.0.0.1:7890",
    "zaobao_api_key": "",
    "request_timeout": 1000,
    "searx_search_host": "http://127.0.0.1:32283"
  }
}
  1. 你的问题:
 $tools   今天北京天气
  1. 收到ai的回复:
 根据您的输入,我已经为您获取了北京今天的天气信息。如果您还需要其他帮助,请告诉我。
  1. debug模式终端打印的日志:

环境

  • 操作系统类型 (/Linux):
  • Python版本 ( 执行 python -V ): Python 3.8.0
  • pip版本 ( 执行 pip -V):pip 23.0.1

建议加上安全限制

你好,目前工具是链接了个人订阅号,如果开启了tool,对于熟悉tool的用户来说,可能会使用这个tool来读取订阅号所在服务器的信息,甚至做一些非法操作。建议可以加上安全限制,比如使用口令,减少危险,也方便推广。谢谢。

关于插件的使用:请问google和terminal等插件都必须通过&tool 前缀唤起吗?直接对话均无法生效

[INFO][2023-05-27 04:07:45][passive_reply.py:97] - [wechatmp] Request 1 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125279246620709 162.62.81.123:13936
使用google搜索明天北京的天气
[INFO][2023-05-27 04:07:45][chat_gpt_bot.py:49] - [CHATGPT] query=使用google搜索明天北京的天气
[INFO][2023-05-27 04:07:50][passive_reply.py:97] - [wechatmp] Request 2 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125279246620709 162.62.80.8:50937
使用google搜索明天北京的天气
[INFO][2023-05-27 04:07:53][wechatmp_channel.py:84] - [wechatmp] text cached, receiver oW95L1Iovxvkd-mMpZqKXlhc_4AY
很抱歉,由于我是离线模型,无法直接进行网络搜索。但是我可以告诉你可以打开Google搜索页面并输入 "明天北京的天气" 来查找有关明天北京天气的信息。
[INFO][2023-05-27 04:07:53][passive_reply.py:151] - [wechatmp] Request 2 do send to oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125279246620709: 使用google搜索明天北京的天气
很抱歉,由于我是离线模型,无法直接进行网络搜索。但是我可以告诉你可以打开Google搜索页面并输入 "明天北京的天气" 来查找有关明天北京天气的信息。

[INFO][2023-05-27 04:07:56][passive_reply.py:97] - [wechatmp] Request 1 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125279276258309 162.62.80.8:51456
&tool 使用google搜索明天北京的天气
[INFO][2023-05-27 04:08:01][passive_reply.py:97] - [wechatmp] Request 2 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125279276258309 162.62.81.123:16492
&tool 使用google搜索明天北京的天气
[INFO][2023-05-27 04:08:06][passive_reply.py:97] - [wechatmp] Request 3 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125279276258309 162.62.81.123:17278
&tool 使用google搜索明天北京的天气
[INFO][2023-05-27 04:08:12][wechatmp_channel.py:84] - [wechatmp] text cached, receiver oW95L1Iovxvkd-mMpZqKXlhc_4AY
明天北京的天气为小雨,温度为25℃。
[INFO][2023-05-27 04:08:14][passive_reply.py:97] - [wechatmp] Request 1 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125285506234412 162.62.80.57:60892
1
[INFO][2023-05-27 04:08:14][passive_reply.py:151] - [wechatmp] Request 1 do send to oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125285506234412: 1
明天北京的天气为小雨,温度为25℃。

[INFO][2023-05-27 04:29:19][passive_reply.py:97] - [wechatmp] Request 1 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125302526223939 162.62.80.57:50056
&tool 使用terminal查询今天日期
[INFO][2023-05-27 04:29:24][passive_reply.py:97] - [wechatmp] Request 2 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125302526223939 162.62.80.57:50754
&tool 使用terminal查询今天日期
[INFO][2023-05-27 04:29:29][passive_reply.py:97] - [wechatmp] Request 3 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125302526223939 162.62.80.8:12213
&tool 使用terminal查询今天日期
[INFO][2023-05-27 04:29:31][wechatmp_channel.py:84] - [wechatmp] text cached, receiver oW95L1Iovxvkd-mMpZqKXlhc_4AY
今天的日期是:Sat May 27 04:29:24 +08 2023

[INFO][2023-05-27 04:29:42][passive_reply.py:97] - [wechatmp] Request 1 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125303223971757 162.62.81.123:6994
使用terminal查询今天日期
[INFO][2023-05-27 04:29:42][chat_gpt_bot.py:49] - [CHATGPT] query=使用terminal查询今天日期
[INFO][2023-05-27 04:29:47][passive_reply.py:97] - [wechatmp] Request 2 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125303223971757 162.62.80.8:13592
使用terminal查询今天日期
[INFO][2023-05-27 04:29:53][passive_reply.py:97] - [wechatmp] Request 3 from oW95L1Iovxvkd-mMpZqKXlhc_4AY 24125303223971757 162.62.80.57:55234
使用terminal查询今天日期
[INFO][2023-05-27 04:29:54][wechatmp_channel.py:84] - [wechatmp] text cached, receiver oW95L1Iovxvkd-mMpZqKXlhc_4AY
要在终端中查询今天的日期,您可以使用内置的date命令。只需打开终端并输入以下命令:

date

按“Enter”键后,终端将输出当前日期和时间,例如:

Sat May 27 04:29:24 +08 2023

请注意,输出日期和时间的格式和时区可能因您的计算机设置而有所不同。

[morning-news] init failed, error_info: ValueError('Did not find zaobao_api_key, please add an environment variable `ZAOBAO_API_KEY` which contains it, or pass `zaobao_api_key` as a named parameter.')

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
  "tools": [],
  "kwargs": {
      "debug": true  // debug模式一定要打开
  }
}
  1. 你的问题:
    log里面老是读不到可以 是要在哪里配置
[morning-news] init failed, error_info: ValueError('Did not find zaobao_api_key, please add an environment variable `ZAOBAO_API_KEY` which contains it, or pass  `zaobao_api_key` as a named parameter.')
[news-api] init failed, error_info: ValueError('Did not find news_api_key, please add an environment variable `NEWS_API_KEY` which contains it, or pass  `news_api_key` as a named parameter.')
  1. 收到ai的回复:
[替换我]
  1. debug模式终端打印的日志:
[替换我]

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

请问 config.json文件放在chatgpt-on-wechat 项目的哪个目录下

https://github.com/goldfishh/chatgpt-on-wechat/blob/master/plugins/tool/README.md#configjson-%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E

请问 config.json文件放在chatgpt-on-wechat 项目的哪个目录下,我放在plugins文件夹里,插件google_search文件夹也放了一个,但是聊天的时候输入$tool google-search 都没能触发谷歌搜索

配置如下:
{
"tools": ["google-search"], // 填入你想用到的额外工具名
"kwargs": {
"request_timeout": 60, // openai接口超时时间
"no_default": false, // 是否不使用默认的4个工具
"google_api_key": "AIzaSyBWVa_dQDG2SC***************",
"google_cse_id": "37bdde62**************"
}
}

工具思考的时候,触发了openai的频率限制,希望加个向chatgpt调用的频率限制,避免再命中频控

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

问:今天兰州天气怎么样?
我看他思考的时候,触发了openai的频率限制,希望加个向chatgpt调用的频率限制,避免再命中频控

  1. 你的问题:
兰州今天天气怎么样?
  1. 收到ai的回复:
兰州当前温度为21.7°C,天气代码为3,表示有阵雨。未来24小时每个小时的温度和天气代码也已经获取到了,您可以根据这些信息了解兰州未来的天气情况。
  1. debug模式终端打印的日志:
[INFO][2023-05-12 14:56:53][chat_channel.py:106] - [WX]receive group at
[INFO][2023-05-12 14:56:53][victorinox.py:111] - 提问: 兰州今天天气怎么样?
[INFO][2023-05-12 14:56:58][base.py:226] - LLM-OS的内心独白: 推理:用户输入了一个关于天气的问题,需要使用天气查询工具来获取信息
思考:用户想要查询兰州今天的天气信息
反思:需要确认用户想要查询的是今天的天气,还是其他时间段的天气信息

[INFO][2023-05-12 14:56:58][base.py:177] - 执行Tool: meteo-weather中...
[INFO][2023-05-12 14:56:58][base.py:115] - 输入: 兰州今天天气
[INFO][2023-05-12 14:56:58][tool_engine.py:134] - 我将给工具发送如下信息: 
兰州今天天气
[INFO][2023-05-12 14:57:01][base.py:77] - URL 构造: https://api.open-meteo.com/v1/forecast?latitude=36.0611&longitude=103.8343&hourly=temperature_2m,weathercode&current_weather=true&temperature_unit=celsius&timeformat=iso8601&timezone=Asia/Shanghai&start_date=2023-05-12&end_date=2023-05-12
[INFO][2023-05-12 14:57:02][base.py:87] - API 响应: '{"latitude":36.125,"longitude":104.0,"generationtime_ms":0.19800662994384766,"utc_offset_seconds":28800,"timezone":"Asia/Shanghai","timezone_abbreviation":"CST","elevation":1520.0,"current_weather":{"temperature":21.7,"windspeed":10.1,"winddirection":287.0,"weathercode":3,"is_day":1,"time":"2023-05-12T14:00"},"hourly_units":{"time":"iso8601","temperature_2m":"°C","weathercode":"wmo code"},"hourly":{"time":["2023-05-12T00:00","2023-05-12T01:00","2023-05-12T02:00","2023-05-12T03:00","2023-05-12T04:00","2023-05-12T05:00","2023-05-12T06:00","2023-05-12T07:00","2023-05-12T08:00","2023-05-12T09:00","2023-05-12T10:00","2023-05-12T11:00","2023-05-12T12:00","2023-05-12T13:00","2023-05-12T14:00","2023-05-12T15:00","2023-05-12T16:00","2023-05-12T17:00","2023-05-12T18:00","2023-05-12T19:00","2023-05-12T20:00","2023-05-12T21:00","2023-05-12T22:00","2023-05-12T23:00"],"temperature_2m":[11.7,10.8,10.7,10.2,9.6,8.6,7.9,7.5,10.2,12.5,15.0,17.7,19.7,20.9,21.7,22.2,22.4,22.1,21.7,21.0,19.6,17.4,15.3,14.2],"weathercode":[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3]}}'
[INFO][2023-05-12 14:57:08][tool_engine.py:163] - 工具 meteo-weather 返回内容: 根据API的响应结果,我们可以看到兰州的经纬度信息以及当前时间的天气情况。其中,当前时间的天气情况包括温度、风速、风向、天气代码等信息。而hourly部分则包含了未来24小时每个小时的温度和天气代码。

通过API的响应结果,我们可以回答用户提出的问题:兰州今天天气。根据API的响应结果,兰州当前时间的温度为21.7°C,天气代码为3,表示有阵雨。同时,API还提供了未来24小时每个小时的温度和天气代码,用户可以根据这些信息了解兰州未来的天气情况。
[INFO][2023-05-12 14:57:08][tool_engine.py:193] - 我从[meteo-weather]中获得了一些信息:
'根据API的响应结果,我们可以看到兰州的经纬度信息以及当前时间的天气情况。其中,当前时间的天气情况包括温度、风速、风向、天气代码等信息。而hourly部分则包含了未来24小时每个小时的温度和天气代码。\n\n通过API的响应结果,我们可以回答用户提出的问题:兰州今天天气。根据API的响应结果,兰州当前时间的温度为21.7°C,天气代码为3,表示有阵雨。同时,API还提供了未来24小时每个小时的温度和天气代码,用户可以根据这些信息了解兰州未来的天气情况。'
[WARNING][2023-05-12 14:57:08][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 15.0 seconds as it raised RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-eMFYvNIDh2JEBVj3a4OMyQss on requests per min. Limit: 3 / min. Please try again in 20s. Contact us through our help center at help.openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method..

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

运行后报错

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

chatgpt-tool-hub version: 0.3.12
chatgpt-tool-hub 0.3.8后,部分工具名将变更:requests -> url-get
[INFO][2023-04-18 13:54:27][init.py:13] - [news] init failed, error_info: ModuleNotFoundError("No module named 'chatgpt_tool_hub.tools.morning_news'")
[INFO][2023-04-18 13:54:27][init.py:13] - [morning_news] init failed, error_info: ModuleNotFoundError("No module named 'chatgpt_tool_hub.tools.morning_news'")
[WARNING][2023-04-18 13:54:27][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[WARNING][2023-04-18 13:54:27][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[ERROR][2023-04-18 13:54:27][load_tools.py:46] - All the tools currently supported are:['url-get', 'bing-search', 'google-search', 'meteo-weather', 'python', 'terminal', 'wikipedia', 'wolfram-alpha']
[ERROR][2023-04-18 13:54:27][victorinox.py:35] - Got unknown tool: morning-news
Traceback (most recent call last):
File "/Users/Documents/chatgpt/chatgpt-tool-hub/chatgpt-tool-hub/chatgpt_tool_hub/apps/victorinox.py", line 33, in create
tools = load_tools(tools_list, **tools_kwargs)
File "/Users/Documents/chatgpt/chatgpt-tool-hub/chatgpt-tool-hub/chatgpt_tool_hub/tools/load_tools.py", line 47, in load_tools
raise ValueError(f"Got unknown tool: {name}")
ValueError: Got unknown tool: morning-news

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/Documents/chatgpt/chatgpt-tool-hub/chatgpt-tool-hub/test.py", line 18, in
app = AppFactory().create_app(tools_list=config["tools"], **config["kwargs"])
File "/Users/Documents/chatgpt/chatgpt-tool-hub/chatgpt-tool-hub/chatgpt_tool_hub/apps/app_factory.py", line 49, in create_app
app.create(tools_list, **kwargs)
File "/Users/Documents/chatgpt/chatgpt-tool-hub/chatgpt-tool-hub/chatgpt_tool_hub/apps/victorinox.py", line 36, in create
raise RuntimeError("tool初始化失败")
RuntimeError: tool初始化失败

image

tool工具在win下使用时,总是提示文件被占用导致失败

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

- [WX] receiveMsg=ChatMessage: id=6671363862168960699, create_time=1682256903, ctype=TEXT, content=$tool 搜索今日热点, from_user_id=wxid_k10fvreqzcbf22, from_user_nickname=梁爽, to_user_id=wxid_tt9en9ft8fhf29, to_user_nickname=格蕾修, other_user_id=wxid_k10fvreqzcbf22, other_user_nickname=梁爽, is_group=False, is_at=False, actual_user_id=None, actual_user_nickname=None, context=Context(type=TEXT, content=$tool 搜索今日热点, kwargs={'isgroup': False, 'msg': <channel.wechat.wechaty_message.WechatyMessage object at 0x000002A174536050>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'wxid_k10fvreqzcbf22', 'receiver': 'wxid_k10fvreqzcbf22'})
[INFO][2023-04-23 21:35:04][victorinox.py:85] - 提问: 搜索今日热点
[INFO][2023-04-23 21:35:10][base.py:107] - 执行Tool: bing-search中...
[INFO][2023-04-23 21:35:10][bot.py:91] - 输入: 今日热点
[WARNING][2023-04-23 21:35:12][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[ERROR][2023-04-23 21:35:12][victorinox.py:88] - [APP] catch a Exception: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\lhwyw\\AppData\\Local\\Temp\\tmpws2in_jq'
[INFO][2023-04-23 21:35:12][victorinox.py:85] - 提问: 搜索今日热点
[INFO][2023-04-23 21:35:19][base.py:107] - 执行Tool: bing-search中...
[INFO][2023-04-23 21:35:19][bot.py:91] - 输入: 今日热点
[WARNING][2023-04-23 21:35:21][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[ERROR][2023-04-23 21:35:21][victorinox.py:88] - [APP] catch a Exception: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\lhwyw\\AppData\\Local\\Temp\\tmpl87ynly_'
[ERROR][2023-04-23 21:35:21][victorinox.py:92] - exceed retry_num
[ERROR][2023-04-23 21:35:21][tool.py:103] - 超过重试次数
Traceback (most recent call last):
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\apps\victorinox.py", line 86, in ask
    return self.bot.run(query)
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\chains\base.py", line 212, in run
    return self(args[0])[self.output_keys[0]]
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\chains\base.py", line 115, in __call__
    raise e
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\chains\base.py", line 112, in __call__
    outputs = self._call(inputs)
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\engine\tool_engine.py", line 158, in _call
    next_step_output = self._take_next_step(
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\engine\tool_engine.py", line 123, in _take_next_step
    observation = tool.run(
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\tools\base_tool.py", line 72, in run
    raise e

  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\tools\base_tool.py", line 69, in run
    observation = self._run(tool_input)
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\tools\bing_search\tool.py", line 28, in _run
    return self.api_wrapper.run(query)
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\tools\bing_search\wrapper.py", line 73, in run
    snippets.append(filter_text(result["snippet"]))
  File "C:\Python310\lib\site-packages\chatgpt_tool_hub\tools\web_requests\__init__.py", line 36, in filter_text
    os.remove(file_path)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'C:\\Users\\lhwyw\\AppData\\Local\\Temp\\tmpws2in_jq'

image

url-get和浏览器功能也是 有时会提示被占用,而占用的进程就是python.exe 就是他自己

python 3.10
windows11

关于代理配置问题

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
  "tools": [],
  "kwargs": {
      "debug": true  // debug模式一定要打开
  }
}
  1. 你的问题:
我不需要代理,所以我在配置中将PROXY置为空,但是程序仍然使用了代理并且报错
  1. 收到ai的回复:

  1. debug模式终端打印的日志:
[INFO][2023-05-10 16:03:32][terminal_io.py:591] - > xxx: hi
[INFO][2023-05-10 16:03:32][victorinox.py:111] - xx: hi
[WARNING][2023-05-10 16:03:32][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 15.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: Please check proxy URL. It is malformed and could be missing the host..

环境

  • 操作系统类型 (Mac/Windows/Linux):Mac
  • Python版本 ( 执行 python -V ):Python 3.11.3
  • pip版本 ( 执行 pip -V):pip 18.1

回复时间过长,经常出现HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12)

目前带有提示性使用tool,基本可以按照要求执行选择相应工具,但是经常链接api.openai.com超时,是由于请求超过频率了么。或者哪里使用不恰当,怎么使反应速度更快一点,亚马逊的机器和azure的机器都是这样!
日志记录如下:

[INFO][2023-04-08 01:58:36][SubscribeAccount.py:31] - [wechatmp] 162.62.81.123:36052 Receive post query ouhFW0hoT8cQC6k7HB9c3pJwNnSc 24064974339600504: $tool bing 查一下阿里公司的大模型
[INFO][2023-04-08 01:58:41][SubscribeAccount.py:31] - [wechatmp] 162.62.80.8:28940 Receive post query ouhFW0hoT8cQC6k7HB9c3pJwNnSc 24064974339600504: $tool bing 查一下阿里公司的大模型
[INFO][2023-04-08 01:58:46][SubscribeAccount.py:31] - [wechatmp] 162.62.80.57:50878 Receive post query ouhFW0hoT8cQC6k7HB9c3pJwNnSc 24064974339600504: $tool bing 查一下阿里公司的大模型
[WARNING][2023-04-08 01:58:48][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12).
[INFO][2023-04-08 01:58:50][SubscribeAccount.py:129] - [wechatmp] Three queries has finished For ouhFW0hoT8cQC6k7HB9c3pJwNnSc: 24064974339600504
[INFO][2023-04-08 01:58:56][base.py:99] - 执行Tool: Bing Search中...
[INFO][2023-04-08 01:58:56][bot.py:85] - 行动输入: 阿里公司大模型
[WARNING][2023-04-08 01:59:09][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12).
[WARNING][2023-04-08 01:59:25][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12).
[ERROR][2023-04-08 01:59:41][victorinox.py:87] - [APP] catch a Exception: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12)
[INFO][2023-04-08 01:59:45][base.py:99] - 执行Tool: Bing Search中...
[INFO][2023-04-08 01:59:45][bot.py:85] - 行动输入: 阿里公司大模型
[WARNING][2023-04-08 01:59:57][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12).
[WARNING][2023-04-08 02:00:13][before_sleep.py:65] - Retrying chatgpt_tool_hub.models.chatgpt.chatgpt.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12).
[ERROR][2023-04-08 02:00:29][victorinox.py:87] - [APP] catch a Exception: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12)
[ERROR][2023-04-08 02:00:29][victorinox.py:91] - exceed retry_num
[ERROR][2023-04-08 02:00:29][tool.py:92] - 超过重试次数
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 421, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 416, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 277, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 703, in reraise
raise value
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 423, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 330, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 516, in request_raw
result = _thread_context.session.request(
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 578, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 85, in ask
return self.bot.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 155, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 108, in _take_next_step
output = self.bot.plan(intermediate_steps, **inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot.py", line 115, in plan
action = self._get_next_action(full_inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot.py", line 83, in _get_next_action
full_output = self.llm_chain.predict(**full_inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 151, in predict
return self(kwargs)[self.output_key]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 57, in _call
return self.apply([inputs])[0]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 118, in apply
response = self.generate(input_list)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 62, in generate
return self.llm.generate_prompt(prompts, stop)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 78, in generate_prompt
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 75, in generate_prompt
output = self.generate(prompt_messages, stop=stop)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 52, in generate
results = [self._generate(m, stop=stop) for m in messages]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 52, in
results = [self._generate(m, stop=stop) for m in messages]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 272, in _generate
response = self.completion_with_retry(messages=message_dicts, **params)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 234, in completion_with_retry
return _completion_with_retry(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 325, in iter
raise retry_exc.reraise()
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 158, in reraise
raise self.last_attempt.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 232, in _completion_with_retry
return self.client.create(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 216, in request
result = self.request_raw(
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 527, in request_raw
raise error.Timeout("Request timed out: {}".format(e)) from e
openai.error.Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=12)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/wechat_mp/plugins/tool/tool.py", line 88, in on_handle_context
_reply = self.app.ask(query, user_session)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 89, in ask
return self.ask(query, chat_history, retry_num + 1)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 92, in ask
raise TimeoutError("超过重试次数")
TimeoutError: 超过重试次数
[ERROR][2023-04-08 02:00:29][tool.py:93] - 超过重试次数
[INFO][2023-04-08 02:00:29][chat_gpt_bot.py:36] - [CHATGPT] query=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理

提议一个summary的prompts,现在的太高度总结,会错失一些内容

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

如题,提议prompts:

summarize the chat content in the document and answer in Chinese
Use the following format:
Sender name 1:<>

  • <point_1>
    ..

Sender name 2:<>

  • <point_1>
    ..

Sender name 3:<>

  • <point_1>
    ..

Sender name 4:<>

  • <point_1>
    ..

以上prompts在我索引本地聊天记录文档时,能得到良好的总结

能说一下怎么在chatgpt-on-wechat项目上加google search吗

如题,我是小白,我把chatgpt-tool-hub项目里tool文件夹里的google_search文件复制到chatgpt-on-wechat项目里插件的文件夹里,配置了googlesearch的key和id,运行后,发送google search指令会报错,正确的操作方式应该是怎么样的
image

image

tool 插件运行 初始化失败

sample-chatgpt-on-wechat | chatgpt-tool-hub version: 0.3.14
sample-chatgpt-on-wechat | chatgpt-tool-hub 0.3.8后,部分工具名将变更:requests -> url-get
sample-chatgpt-on-wechat | [ERROR][2023-04-18 09:04:09][plugin_manager.py:110] - Failed to import plugin tool: No module named 'webdriver_manager'
sample-chatgpt-on-wechat | Traceback (most recent call last):
sample-chatgpt-on-wechat | File "/app/plugins/plugin_manager.py", line 105, in scan_plugins
sample-chatgpt-on-wechat | self.loaded[plugin_path] = importlib.import_module(
sample-chatgpt-on-wechat | File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
sample-chatgpt-on-wechat | return _bootstrap._gcd_import(name[level:], package, level)
sample-chatgpt-on-wechat | File "", line 1050, in _gcd_import
sample-chatgpt-on-wechat | File "", line 1027, in _find_and_load
sample-chatgpt-on-wechat | File "", line 1006, in _find_and_load_unlocked
sample-chatgpt-on-wechat | File "", line 688, in _load_unlocked
sample-chatgpt-on-wechat | File "", line 883, in exec_module
sample-chatgpt-on-wechat | File "", line 241, in _call_with_frames_removed
sample-chatgpt-on-wechat | File "/app/plugins/tool/init.py", line 1, in
sample-chatgpt-on-wechat | from .tool import *
sample-chatgpt-on-wechat | File "/app/plugins/tool/tool.py", line 4, in
sample-chatgpt-on-wechat | from chatgpt_tool_hub.apps import load_app
sample-chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/init.py", line 1, in
sample-chatgpt-on-wechat | from chatgpt_tool_hub.apps.load_app import load_app
sample-chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/apps/load_app.py", line 7, in
sample-chatgpt-on-wechat | from chatgpt_tool_hub.tools import dynamic_tool_loader
sample-chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/init.py", line 5, in
sample-chatgpt-on-wechat | from chatgpt_tool_hub.tools.web_requests.browser import BrowserTool
sample-chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/init.py", line 42, in
sample-chatgpt-on-wechat | from chatgpt_tool_hub.tools.web_requests.wrapper import RequestsWrapper
sample-chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 11, in
sample-chatgpt-on-wechat | from webdriver_manager.chrome import ChromeDriverManager
sample-chatgpt-on-wechat | ModuleNotFoundError: No module named 'webdriver_manager'

Tool插件-报错“超过重试次数”-星球提问

前置确认

1. 网络能够访问openai接口 ——能
2. git pull 拉取最新代码 ——是最新的代码
3. 执行pip install -r requirements.txt,检查依赖是否满足 ——安装chatgpt-tool-hub-master内的依赖,报错:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/setuptools/ 更换了很多节点,还是不行。但是chatgpt-on-wechat内的依赖都安装过了。

4. 在已有 issue 中未搜索到类似问题 ——和#14问题有点类似,但是我询问过lanvent后,得到的问题是:prxy error,该链接是:/v1/forecast?latitude=%7Blatitude%7D&longitude=%7Blongitude%7D&hourly=temperature_2m,rain&current_weather=true&timezone=auto&start_date=%7Btoday's%20date%7D&end_date=%7Btoday's%20date%7D

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述


0. 你的问题是否在test.py能复现?
在test.py中复现:最终报错还是“超过重试次数”,出错的代码是:
`[INFO][2023-04-16 20:15:41][__init__.py:13] - [news] init failed, error_
gpt_tool_hub.tools.news.api_docs_prompts'")
[INFO][2023-04-16 20:15:41][__init__.py:13] - [morning_news] init failed
ed 'chatgpt_tool_hub.tools.morning_news'")
[WARNING][2023-04-16 20:15:41][chatgpt.py:171] - proxy no find, directly
[WARNING][2023-04-16 20:15:41][chatgpt.py:171] - proxy no find, directly
[INFO][2023-04-16 20:15:41][victorinox.py:39] - Initializing Victorinox
al', 'meteo-weather'], params: {'openai_api_key': '': False, 'request_timeout': 60, 'no_default': False, 'model_name':
[WARNING][2023-04-16 20:15:41][before_sleep.py:65] - Retrying chatgpt_to
ion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it rais
OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retrie
d by ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))).
[ERROR][2023-04-16 20:15:45][victorinox.py:86] - [APP] catch a Exception
onPool(host='api.openai.com', port=443): Max retries exceeded with url:
ot connect to proxy.', OSError(0, 'Error')))
[WARNING][2023-04-16 20:15:45][before_sleep.py:65] - Retrying chatgpt_to
ion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it rais
OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retrie
d by ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))).`


1. 你复现时的config.json,**注意抹去你的api-key**
``{
  "tools": [],
  "kwargs": {
      "openai_api_key": "",
      "proxy": "",     //是本地windows环境运行,用了clash的代理
      "debug": false,
      "request_timeout": 60,
      "no_default": false,
      "model_name": "gpt-3.5-turbo"
  }
}
  1. 你的问题:

[我部署的微信个人版本的,在配置完json文件后,向机器人输入$tool 给我今天的早报 后,后台cmd返还的是:超过重试次数。
错误的代码是:
ERROR][2023-04-14 23:04:11][victorinox.py:87] - [APP] catch a Exception: HTTPSConnectionPool(host='api.open-meteo.com', port=443): Max retries exceeded with url: /v1/forecast?latitude=%7Blatitude%7D&longitude=%7Blongitude%7D&hourly=temperature_2m,rain&current_weather=true&timezone=auto&start_date=%7Btoday's%20date%7D&end_date=%7Btoday's%20date%7D (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))) [INFO][2023-04-14 23:04:13][base.py:99] - 执行Tool: Meteo Weather中... [INFO][2023-04-14 23:04:13][bot.py:87] - 行动输入: 今天的天气怎么样? [ERROR][2023-04-14 23:04:16][victorinox.py:87] - [APP] catch a Exception: HTTPSConnectionPool(host='api.open-meteo.com', port=443): Max retries exceeded with url: /v1/forecast?latitude=%7Blatitude%7D&longitude=%7Blongitude%7D&hourly=temperature_2m,rain&current_weather=true&timezone=auto&start_date=%7Btoday's%20date%7D&end_date=%7Btoday's%20date%7D (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))) [ERROR][2023-04-14 23:04:16][victorinox.py:91] - exceed retry_num [ERROR][2023-04-14 23:04:16][tool.py:92] - 超过重试次数
在需求帮助后,得到的回复是 proxy error 。
我的json 代码是:
{ "tools": ["python", "url-get", "terminal", "meteo-weather", "bing-search", "morning-news"], "kwargs": { "openai_api_key": "xxxxx", "top_k_results": 2, "no_default": false, "model_name": "gpt-3.5-turbo", "bing_subscription_key":"xxxx", "zaobao_api_key": "xxxx" } }

本地电脑使用代理工具为 clash。尝试了多个代理IP,均是上述问题。
]
  1. 收到ai的回复:
[Hi,您好!很高兴能为您服务。抱歉,我们的tool插件现在可能还不能回答您的问题。我们一直在努力优化我们的AI服务,但在某些情况下,它可能无法提供满意的答案。

我们肯定会将您的反馈传递给我们的团队,并尽快完善我们的技术。感谢您对ChatGPT的支持和理解。

如果您有其他问题或者需要我们为您做些什么,请随时告诉我们,我们会竭尽所能为您服务。]
  1. debug模式终端打印的日志:
    这个操作我不会

环境

  • 操作系统类型 (Mac/Windows/Linux):Windows
  • Python版本 ( 执行 python -V ):3.8.2
  • pip版本 ( 执行 pip -V):23.0.1

news初始化失败,添加news-api tool及morning-news tool时失败

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
  "tools": ["news", "python", "terminal", "url-get", "meteo-weather"],
  "kwargs": {
      "debug": true,
      "no_default": false,
      "news_api_key": "0b3ed",
      "morning_news_api_key": "IbU",
      "nolog": true,
      "human_prefix": "user"
  }
}
  1. 你的问题:
  2. 收到ai的回复:
  3. debug模式终端打印的日志:
    news初始化失败
    添加news-api失败

环境

  • 操作系统类型 :Windows
  • Python版本 ( 执行 python -V ): 3.11.2
  • pip版本 ( 执行 pip -V):23.1.2

使用python脚本执行出现依赖问题

你好,我这边在个人号接入之后,脚本是需要更新相关依赖的,所以当我执行 bot $tool 执行 "python3 /root/download.py 40735"会出现错误,提示:[Terminal] Command 'python3 /root/download.py 40735' returned non-zero exit status 1.请问这里的python是调用哪里的服务?我直接在控制台执行脚本是可以跑的。

能够增加一个支持图片文字识别的功能吗?就是我发送图片后,能够识别文字,然后回复我。

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

  1. 你的问题是否在test.py能复现?

  2. 你复现时的config.json,注意抹去你的api-key

{
  "tools": [],
  "kwargs": {
      "debug": true  // debug模式一定要打开
  }
}
  1. 你的问题:
[替换我]
  1. 收到ai的回复:
[替换我]
  1. debug模式终端打印的日志:
[替换我]

环境

  • 操作系统类型 (Mac/Windows/Linux):
  • Python版本 ( 执行 python -V ):
  • pip版本 ( 执行 pip -V):

关于在chatgpt-on-wechat上使用出现的一些问题

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

我使用这个工具来搜索一些信息时,返回的结果并不是这个信息的内容,而一直都是问我还是否需要一些帮助。
在此举个例子,我在微信中询问关于克劳德莫奈的信息,而返回的结果如下。

捕获

但是很明显,用户需要获取的信息
并不是这个,

比起这个回答,更应该返回的是终端里的总结信息。
而且如果继续提问,很容易陷入这样的循环......在这个问题中我并不知道关于克劳德莫奈的哪些生平信息,但它却还在反问我想知道哪些信息。
捕获2

另外,我发现使用的过程中反刍的次数太多了,对于同一个问题明明第一次提问已经得到了答案,却还要继续反思然后继续重复问题来得到结果,这样十分消耗token。更重要的事,在反刍的过程中,直接显示:[APP] catch a Exception: This model's maximum context length is 4097 tokens. However, your messages resulted in 11227 tokens. Please reduce the length of the messages.超出了最大token限制了....然后直接报错,白白浪费了我的token。

无法安装 chatgpt-tool-hub,输出setuptools>=40.8.0 错误

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

5. 注意,提issue前请确认用本项目test.py(参考README.md 快速开始配置)重试一次你的问题是否能复现

问题描述

无法安装依赖。
执行:

pip install -i https://pypi.python.org/simple chatgpt-tool-hub --proxy=127.0.0.1:7890

总是输出:
【 ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)】

实际上已经安装了的:

pip list|findstr "setup"
setuptools 67.7.2 (改为40.8.0 后重试上一操作,依然如此)

环境

  • 操作系统类型 (Mac/Windows/Linux):win11 x64
  • Python版本 ( 执行 python -V ): 3.8.9
  • pip版本 ( 执行 pip -V):23.1.2

大佬求教,配置news的api不成功

前置确认

1. 网络能够访问openai接口
2. git pull 拉取最新代码
3. 执行pip install -r requirements.txt,检查依赖是否满足
4. 在已有 issue 中未搜索到类似问题

求教各位大佬,news配置一直不成功,相关配置文件和返回结果如下,求教!

config.json文件如下:
{
"tools": ["python", "url-get", "terminal", "meteo-weather", "wikipedia", "bing-search", "news", "morning-news" ],
"kwargs": {
"debug": true,
"request_timeout": 120,
"no_default": false,
"bing_subscription_key": "5779454a6axxxxxd4d4b8e3270",
"news_api_key": "e8932ac5b3xxxxxx706c4aff8aa5061",
"morning_news_api_key": "lyI2xxxxxpJ5jW"
}
}

后台报错链接如下:https://newsapi.org/v2/top-headlines?pageSize=2&page=1
打开链接后结果如下:{"status":"error","code":"apiKeyMissing","message":"Your API key is missing. Append this to the URL with the apiKey param, or use the x-api-key HTTP header."}

使用bing-search时报错

[INFO][2023-04-10 11:08:29][base.py:99] - 执行Tool: requests_get中...
[INFO][2023-04-10 11:08:29][bot.py:87] - 行动输入: https://cn.bing.com/search?q=大连市明天天气

[ERROR][2023-04-10 11:08:30][get.py:23] - [requests_get] Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
[INFO][2023-04-10 11:08:32][bot.py:87] - 行动输入: None
[INFO][2023-04-10 11:08:35][wechat_channel.py:164] - [WX] sendMsg=Reply(type=TEXT, content=the response to the original input question in chineseThought: Do I need to use a tool? Yes
Action: requests_get
Action Input: https://cn.bing.com/search?q=大连市明天天气), receiver=@be7690216d93f53e4f0911cf496de7291daee41b5ad11111e6557bd24f01d8a0

我的config.json.template:
{
"tools": ["python", "requests", "terminal", "meteo-weather", "bing-search"],
"kwargs": {
"top_k_results": 2,
"no_default": false,
"model_name": "gpt-3.5-turbo",
"bing_subscription_key": "0db7b530e38b40a5a6b65a94dd79e9"
}
}

能否调用httpchatgpt

想问问代码对于chatgptapi的某些接口依赖非常高吗,是否可以采用revChatGPT.V1替换

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.