Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker拉去成功,run.py后一只重复打印chatcompletion: using gpt-4-32k #390

Open
xiaomujiang opened this issue Mar 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@xiaomujiang
Copy link

一 run.py的日志
Human-In-The-Loop False
Start outer loop async
-=-=-=-=-=-=-= BEGIN QUERY SOVLING -=-=-=-=-=-=-=
Role Assistant
Task calc 1+1=?
-=-=-=-=-=-=-= GENERATE INITIAL_PLAN -=-=-=-=-=-=-=
Constructing an Agent: PlanGenerateAgent
chatcompletion: using gpt-4-32k
chatcompletion: using gpt-4-32k
chatcompletion: using gpt-4-32k
chatcompletion: using gpt-4-32k

二 docker 打印的日志
xagent-ToolServerManager-1 | [2024-03-10 08:19:24 +0000] [7] [INFO] Node d2f9c135a0f2 health updated: starting -> healthy
xagent-ToolServerManager-1 | [2024-03-10 08:19:24 +0000] [8] [INFO] Request to node: http://172.19.0.8:31942/get_available_tools
frosty_clarke | INFO: 172.19.0.6:58340 - "POST /get_available_tools HTTP/1.1" 200 OK
xagent-ToolServerManager-1 | [2024-03-10 08:19:25 +0000] [8] [INFO] Response from node: 200
frosty_clarke | INFO: 127.0.0.1:33960 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:33974 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:33978 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:33988 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:33996 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:33998 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:34006 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:34012 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:34014 - "GET / HTTP/1.1" 200 OK
frosty_clarke | INFO: 127.0.0.1:34016 - "GET / HTTP/1.1" 200 OK

@xiaomujiang xiaomujiang added the bug Something isn't working label Mar 10, 2024
@xiaomujiang
Copy link
Author

完整日志XAgentServer is running on cmd mode
XAgentServer log: XAgentServer/localstorage/interact_records/2024-03-10/ad0bf684841449e99cbb56fee951e09d
init interaction: ad0bf684841449e99cbb56fee951e09d
Register logger into interaction of ad0bf684841449e99cbb56fee951e09d, done!
Register db into interaction of ad0bf684841449e99cbb56fee951e09d, done!
Register logger into XAgentServer of ad0bf684841449e99cbb56fee951e09d, done!
Start a new thread to run interaction of ad0bf684841449e99cbb56fee951e09d, done!
---config file---
assets/config.yml
---args---
{'task': 'calc 1+1=?', 'mode': 'auto', 'quiet': False, 'enable_ask_human_for_help': False, 'config_file': 'assets/config.yml'}
server is running, the start query is calc 1+1=?
-=-=-=-=-=-=-=Recorder Start-=-=-=-=-=-=-=
Current: None Node: query 0
-=-=-=-=-=-=-=Data -=-=-=-=-=-=-=
{
"task": "calc 1+1=?",
"role_name": "Assistant",
"plan": []
}
-=-=-=-=-=-=-=Recorder End-=-=-=-=-=-=-=
-=-=-=-=-=-=-=Recorder Start-=-=-=-=-=-=-=
Current: None Node: config 0
-=-=-=-=-=-=-=Data -=-=-=-=-=-=-=
{
"api_keys": {
"gpt-4": [
{
"api_key": "",
"model": "gpt-4"
}
],
"gpt-4-32k": [
{
"api_key": "
",
"model": "gpt-4-32k"
}
]
},
"default_request_type": "openai",
"default_completion_kwargs": {
"model": "gpt-4-32k",
"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://127.0.0.1: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": "calc 1+1=?",
"mode": "auto",
"quiet": false,
"config_file": "assets/config.yml"
}
-=-=-=-=-=-=-=Recorder End-=-=-=-=-=-=-=
register tool server interface
lazy init tool server interface
ToolServer connected in http://127.0.0.1:8080
register function handler
register working memory function
register agent dispatcher
Constructing an AgentDispatcher: XAgentDispatcher
build all components, done!
-=-=-=-=-=-=-=Recorder Start-=-=-=-=-=-=-=
Current: None Node: tool_server_pair 0
-=-=-=-=-=-=-=Data -=-=-=-=-=-=-=
{
"url": "get_available_tools",
"payload": {},
"response_status_code": 200,
"tool_output": {
"available_envs": [
{
"name": "FileSystemEnv",
"description": "Provide a file system operation environment for Agent.\n ",
"total_tools": 3,
"tools": [
"print_filesys_struture",
"read_from_file",
"write_to_file"
]
},
{
"name": "PythonNotebook",
"description": "Python Notebook Environment. Provide a notebook interface to run python code.",
"total_tools": 2,
"tools": [
"execute_cell",
"print_notebook"
]
},
{
"name": "WebEnv",
"description": "Web Environment providing web interface and browsering.\n ",
"total_tools": 2,
"tools": [
"browse_website",
"search_and_browse"
]
}
],
"available_tools": [
"FileSystemEnv_print_filesys_struture",
"FileSystemEnv_read_from_file",
"FileSystemEnv_write_to_file",
"PythonNotebook_execute_cell",
"PythonNotebook_print_notebook",
"WebEnv_browse_website",
"WebEnv_search_and_browse",
"shell_command_executor"
],
"tools_json": [
{
"name": "FileSystemEnv_print_filesys_struture",
"description": "Return a tree-like structure for all files and folders in the workspace. Use this tool if you are not sure what files are in the workspace.\nThis function recursively walks through all the directories in the workspace\nand return them in a tree-like structure, \ndisplaying all the files under each directory.\n\nExample:\n\n- root/\n - sub_directory1/\n - file1.txt\n - file2.txt\n - sub_directory2/\n - file3.txt\n",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
},
{
"name": "FileSystemEnv_read_from_file",
"description": "Open and read the textual file content in the workspace, you will see the content of the target file.\nDon't use this if the give filepath is writen or modified before, the content in filepath should be already returned.",
"parameters": {
"type": "object",
"properties": {
"filepath": {
"type": "string",
"description": "The path to the file to be opened, always use relative path to the workspace root."
},
"line_number": {
"type": "integer",
"description": "The starting line number of the content to be opened. Defaults to 1."
}
},
"required": [
"filepath"
]
}
},
{
"name": "FileSystemEnv_write_to_file",
"description": "Write or modify the textual file lines based on content provided. \nReturn updated content of the file after modification so no further need to call read_from_file for this file. Create file if not exists.\n\nExample:\n\nIn[0]: write_to_file('test.txt', 'Hello World!\\nA new line!')\nOut[0]: '1: Hello World!\\n2: A new line!'\nIn[1]: write_to_file('test.txt', 'Hello World 1!', 2)\nOut[1]: '1: Hello World!\\n2: Hello World 1!\\n3: A new line!'\nIn[2]: write_to_file('test.txt', 'Hello World 2!', 2, overwrite=True)\nOut[2]: '1: Hello World!\\n2: Hello World 2!\\n3: A new line!'\n",
"parameters": {
"type": "object",
"properties": {
"filepath": {
"type": "string",
"description": "The path to the file to be modified, always use relative path to the workspace root."
},
"truncating": {
"type": "boolean",
"description": "If True, the file will be truncated before writing, else will read current content before writing. Defaults to False."
},
"line_number": {
"type": "integer",
"description": "The start line to modified file. Defaults to None, which means insert the new content at the end of the file. So do not provide this if you want to append the new content to the file."
},
"overwrite": {
"type": "boolean",
"description": "If True, the new content will overwrite content started from line_number line. Defaults to False, which insert the new content at the line_number line."
},
"content": {
"type": "string",
"description": "The new content to be replaced with the old content."
}
},
"required": [
"filepath",
"content"
]
}
},
{
"name": "PythonNotebook_execute_cell",
"description": "Create or replace a notebook cell and execute it, return the output.\nUse this tool to test your idea quickly. Carefully examine the output to make sure it is what you want.\n\nExample:\n\nIn[0]: code='print(\"hello world\")' # This will create a new cell and execute it.\nOut[0]: ['cell_index: 0', 'hello world']\nIn[1]: code='print(\"hello world\")',cell_index=0 # This will overwrite the first cell and execute it.\nIn[2]: code='print(\"hello world\")',cell_index=-1 # This will overwrite the last cell and execute it.\n",
"parameters": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "python code to be executed, make sure it is valid python code with right format. don't provide shell command that started with '!' here."
},
"cell_index": {
"type": "integer",
"description": "the index of the cell to be insert and overwrite code, default to None, which means append new cell."
},
"reset": {
"type": "boolean",
"description": "whether to reset the kernel before executing the code. Default to False."
}
},
"required": [
"code"
]
}
},
{
"name": "PythonNotebook_print_notebook",
"description": "print all notebook cells' content and output.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
},
{
"name": "WebEnv_browse_website",
"description": "Give a http or https url to browse a website and return the summarize text. Note some websites may not be accessable due to network error. This tool only return the content of give url and cannot provide any information need interaction with the website.",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The realworld Uniform Resource Locator (web address) to scrape text from. Never provide something like "", give real url!!! Example: 'https://www.deepmind.com/'"
},
"goals_to_browse": {
"type": "string",
"description": "The goals for browse the given url (e.g. what you want to find on webpage.). If you need more details, request it in here."
}
},
"required": [
"url",
"goals_to_browse"
]
}
},
{
"name": "WebEnv_search_and_browse",
"description": "Search with search tools and browse the website returned by search. Note some websites may not be accessable due to network error.",
"parameters": {
"type": "object",
"properties": {
"search_query": {
"type": "string",
"description": "The search query."
},
"goals_to_browse": {
"type": "string",
"description": "What's you want to find on the website returned by search. If you need more details, request it in here. Examples: 'What is latest news about deepmind?', 'What is the main idea of this article?'"
},
"region": {
"type": "string",
"description": "The region code of the search, default to en-US. Available regions: en-US, zh-CN, ja-JP, de-DE, fr-FR, en-GB."
}
},
"required": [
"search_query",
"goals_to_browse"
]
}
},
{
"name": "shell_command_executor",
"description": "The shell tool that execute shell command in root privilege, return the output and error. \nYou can use this tool to install packages, download files, run programs, etc.\nSet run_async=True to run the command in a new thread and return instantly if your command is time costly like install packages, host services. \nExample:\n\nIn: shell_command_executor(command='echo \"hello world\"')\nOut: \"hello world\"\nIn: shell_command_executor(command='sleep 10', run_async=True)\nOut: {'shell_id': 0} # You can use this id to read the output and error later.\nIn: shell_command_executor(shell_id=0, kill=True)\nOut: \"\" # The shell 0 will be killed.\n",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "The shell command to be executed, must avoid command requiring additional user input. Default is empty string."
},
"run_async": {
"type": "boolean",
"description": "Whether to run the command asynchronously, default is False. If True, call this tool again with shell_id to get the final output and error."
},
"shell_id": {
"type": "integer",
"description": "The id of shell to execute command, default is None, which means running in a new shell. Change this to execute command in the same shell."
},
"kill": {
"type": "boolean",
"description": "If True, kill the shell which runs the command after execution. Default is False. Don't use any other kill command!"
}
},
"required": []
}
}
]
}
}
-=-=-=-=-=-=-=Recorder End-=-=-=-=-=-=-=
{
"api_keys": {
"gpt-4": [
{
"api_key": "",
"model": "gpt-4"
}
],
"gpt-4-32k": [
{
"api_key": "
",
"model": "gpt-4-32k"
}
]
},
"default_request_type": "openai",
"default_completion_kwargs": {
"model": "gpt-4-32k",
"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://127.0.0.1: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": "calc 1+1=?",
"mode": "auto",
"quiet": false,
"config_file": "assets/config.yml"
}
Human-In-The-Loop False
Start outer loop async
-=-=-=-=-=-=-= BEGIN QUERY SOVLING -=-=-=-=-=-=-=
Role Assistant
Task calc 1+1=?
-=-=-=-=-=-=-= GENERATE INITIAL_PLAN -=-=-=-=-=-=-=
Constructing an Agent: PlanGenerateAgent
chatcompletion: using gpt-4-32k
chatcompletion: using gpt-4-32k
chatcompletion: using gpt-4-32k
chatcompletion: using gpt-4-32k

@xiaomujiang
Copy link
Author

docker compose日志

[+] Running 6/0
✔ Container xagent-ToolServerNode-1 Created0.0s
✔ Container xagent-xagent-redis-1 Created0.0s
✔ Container xagent-db-1 Created0.0s
✔ Container xagent-xagent-mysql-1 Created0.0s
✔ Container xagent-ToolServerManager-1 Created0.0s
✔ Container XAgent-Server Created0.0s
xagent-xagent-mysql-1 | 2024-03-10T08:50:27.697218Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27) starting as process 1
xagent-xagent-mysql-1 | 2024-03-10T08:50:27.711516Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
xagent-ToolServerManager-1 | [2024-03-10 08:50:28 +0000] [1] [INFO] Starting gunicorn 21.2.0
xagent-ToolServerManager-1 | [2024-03-10 08:50:28 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
xagent-ToolServerManager-1 | [2024-03-10 08:50:28 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
xagent-ToolServerManager-1 | [2024-03-10 08:50:28 +0000] [7] [INFO] Booting worker with pid: 7
xagent-ToolServerManager-1 | [2024-03-10 08:50:28 +0000] [8] [INFO] Booting worker with pid: 8
xagent-xagent-mysql-1 | 2024-03-10T08:50:28.496621Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
xagent-xagent-mysql-1 | 2024-03-10T08:50:29.216466Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
xagent-xagent-mysql-1 | 2024-03-10T08:50:29.216492Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
xagent-xagent-mysql-1 | 2024-03-10T08:50:29.217492Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
xagent-xagent-mysql-1 | 2024-03-10T08:50:29.217524Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
xagent-xagent-mysql-1 | 2024-03-10T08:50:29.225553Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
xagent-xagent-mysql-1 | 2024-03-10T08:50:29.268973Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.27' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
xagent-xagent-mysql-1 | 2024-03-10T08:50:29.269034Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
xagent-ToolServerNode-1 | INFO: Started server process [1]
xagent-ToolServerNode-1 | INFO: Waiting for application startup.
xagent-ToolServerNode-1 | INFO: Register env FileSystemEnv with 3 tools!
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [7] [INFO] Database connected
xagent-ToolServerNode-1 | INFO: Register env PythonNotebook with 2 tools!
xagent-ToolServerNode-1 | INFO: Register env WebEnv with 2 tools!
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [7] [INFO] Docker client connected
xagent-ToolServerNode-1 | INFO: Register tool shell_command_executor!
xagent-ToolServerNode-1 | INFO: Loaded 8 tools and 3 envs!
xagent-ToolServerNode-1 | INFO: Application startup complete.
xagent-ToolServerNode-1 | INFO: Uvicorn running on http://0.0.0.0:31942 (Press CTRL+C to quit)
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [8] [INFO] Database connected
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [8] [INFO] Docker client connected
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [7] [INFO] Started server process [7]
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [7] [INFO] Waiting for application startup.
xagent-ToolServerManager-1 | /app/main.py:36: RuntimeWarning: coroutine 'Document.delete' was never awaited
xagent-ToolServerManager-1 | checker.delete()
xagent-ToolServerManager-1 | RuntimeWarning: Enable tracemalloc to get the object allocation traceback
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [7] [INFO] Nodes status checker started.
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [7] [INFO] Application startup complete.
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [8] [INFO] Started server process [8]
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [8] [INFO] Waiting for application startup.
xagent-ToolServerManager-1 | /app/main.py:36: RuntimeWarning: coroutine 'Document.delete' was never awaited
xagent-ToolServerManager-1 | checker.delete()
xagent-ToolServerManager-1 | RuntimeWarning: Enable tracemalloc to get the object allocation traceback
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [8] [INFO] Nodes status checker started.
xagent-ToolServerManager-1 | [2024-03-10 08:50:30 +0000] [8] [INFO] Application startup complete.
XAgent-Server | INFO: Will watch for changes in these directories: ['/app']
XAgent-Server | INFO: Uvicorn running on http://0.0.0.0:8090 (Press CTRL+C to quit)
XAgent-Server | INFO: Started reloader process [1] using StatReload
XAgent-Server | INFO: Started server process [15]
XAgent-Server | INFO: Waiting for application startup.
XAgent-Server | INFO: Application startup complete.
xagent-ToolServerManager-1 | [2024-03-10 08:51:47 +0000] [8] [INFO] Node created: bd0b05e99e4d561c982f242e31c3d05ac369c6a451b900b37798d08f13c28d98
adoring_meninsky | INFO: Started server process [1]
adoring_meninsky | INFO: Waiting for application startup.
adoring_meninsky | INFO: Register env FileSystemEnv with 3 tools!
adoring_meninsky | INFO: Register env PythonNotebook with 2 tools!
adoring_meninsky | INFO: Register env WebEnv with 2 tools!
adoring_meninsky | INFO: Register tool shell_command_executor!
adoring_meninsky | INFO: Loaded 8 tools and 3 envs!
adoring_meninsky | INFO: Application startup complete.
adoring_meninsky | INFO: Uvicorn running on http://0.0.0.0:31942 (Press CTRL+C to quit)
xagent-ToolServerManager-1 | [2024-03-10 08:51:50 +0000] [8] [INFO] Node bd0b05e99e4d health updated: starting -> healthy
xagent-ToolServerManager-1 | [2024-03-10 08:51:50 +0000] [8] [INFO] Request to node: http://172.19.0.8:31942/get_available_tools
xagent-ToolServerManager-1 | [2024-03-10 08:51:50 +0000] [8] [INFO] Response from node: 200

@sailaoda
Copy link
Collaborator

您好,从您提供的日志来看服务是在正常工作的,服务正常的情况下运行重复打印chatcompletion: using gpt-4-32k这种情况的出现一般会是openai key的返回问题。您可以检查下配置文件或者单独调用一下您的key来做简单chat api调用看能否正常返回。期待您的回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants