XAgent: Error when fetching available tools: 403 Client Error: Forbidden for url: http://localhost:8080/get_available_tools

Issue Description / 问题描述

配置并运行XAgent时报错

Steps to Reproduce / 复现步骤

python run.py --task "write project description" --model "gpt-3" --config_file "assets/config.yml"

Expected Behavior / 预期行为

正常运行

Environment / 环境信息

  • Operating System / 操作系统:windows11
  • Python Version / Python 版本:conda env python=3.11
  • Other Relevant Information / 其他相关信息:docker-desktop v24.0.6

Error Screenshots or Logs / 错误截图或日志

Constructing an AgentDispatcher: XAgentDispatcher —config file— assets/config.yml —args— {‘task’: ‘write project description’, ‘default_completion_kwargs’: {‘model’: ‘gpt-3’, ‘temperature’: 0.2, ‘request_timeout’: 60}, ‘mode’: ‘auto’, ‘quiet’: False, ‘enable_ask_human_for_help’: False, ‘config_file’: ‘assets/config.yml’} server is running, the start query is write project description { “api_keys”: {

}, “default_request_type”: “openai”, “default_completion_kwargs”: { “model”: “gpt-3”, “temperature”: 0.2, “request_timeout”: 60 }, “enable_summary”: true, “summary”: { “single_action_max_length”: 2048, “max_return_length”: 12384 }, “use_selfhost_toolserver”: true, “selfhost_toolserver_url”: “http://localhost:8080”, “max_retry_times”: 5, “max_subtask_chain_length”: 15, “max_plan_refine_chain_length”: 3, “max_plan_tree_depth”: 3, “max_plan_tree_width”: 5, “max_plan_length”: 8192, “rapidapi_retrieve_tool_count”: 0, “enable_ask_human_for_help”: false, “tool_blacklist”: [ “FileSystemEnv_print_filesys_struture” ], “record_dir”: null, “experiment”: { “redo_action”: false }, “task”: “write project description”, “mode”: “auto”, “quiet”: false, “config_file”: “assets/config.yml” } Human-In-The-Loop False ToolServer connected in http://localhost:8080 Traceback (most recent call last): File “D:\Code_project\Agent_GPT\Xagent_GPT\XAgent\XAgent\tool_call_handle.py”, line 122, in get_available_tools response.raise_for_status() File “D:\IDLE\miniconda\envs\xagent\Lib\site-packages\requests\models.py”, line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://localhost:8080/get_available_tools

During handling of the above exception, another exception occurred:… Error when fetching available tools: 403 Client Error: Forbidden for url: http://localhost:8080/get_available_tools

Additional Notes / 其他备注

openai_api_key暂时填写的gpt-3.5-turbo,不知道是否影响。

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 16

Most upvoted comments

@Turingforce 把电脑和docker都重启,然后docker-compose up 就可以了

这之后运行还是不行,所以get_available_tools是去openai那边调用的意思吗? 顺便放一下其他docker容器的日志:

  1. Tool-manager:Node status detection timeout
  2. Xagent-db-1:Error response from daemon: configured logging driver does not support reading

其他的倒是没有日志

后续如果使用你们ChatGLM3的本地模型会出现这种情况吗?

请检查你的网络连接后重试。由于tool call能力的缺失/不足,我们暂时没有任何支持ChatGLM3的计划