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

Commands Don't Work #164

Closed
7 of 17 tasks
TheRealPhooney opened this issue Apr 29, 2023 · 0 comments
Closed
7 of 17 tasks

Commands Don't Work #164

TheRealPhooney opened this issue Apr 29, 2023 · 0 comments
Labels
needs triage Needs labels assigned. type | report | bug Confirmed bug in source code.

Comments

@TheRealPhooney
Copy link

Description

Multiple objectives were tested and all had issues. Details in "actual behavior" section below, but I couldn't find any objectives to provide to the agent that it was able to carry out.

Steps to Reproduce the Bug

  1. Install 1.0.16 ALPHA as per instructions on github
  2. Provide any of the objectives I describe in "actual behavior" section, but presumably any objective would fail similarly.

Expected Behavior

I would have hoped to find any objective at all that could be completed.

Actual Behavior

  1. When asked to write "this is a test" into a new file called "test.txt" using openai and having 3 commands enabled, read file, write to file and search files:

COMMANDS:
Command not recognized: 1. write_to_file("test.txt", "this is a test")

  1. When asked to find the URL for a store, using openai and having only 1 command enabled "Google Search":

Exception in thread Thread-3 (run_task):
2023-04-29 15:44:49 Traceback (most recent call last):
2023-04-29 15:44:49 File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2023-04-29 15:44:49 self.run()
2023-04-29 15:44:49 File "/usr/local/lib/python3.10/threading.py", line 953, in run
2023-04-29 15:44:49 self._target(*self._args, **self._kwargs)
2023-04-29 15:44:49 File "/app/AgentLLM.py", line 325, in run_task
2023-04-29 15:44:49 result = self.execution_agent(task["task_name"], task["task_id"])
2023-04-29 15:44:49 File "/app/AgentLLM.py", line 308, in execution_agent
2023-04-29 15:44:49 return self.run(prompt)
2023-04-29 15:44:49 File "/app/AgentLLM.py", line 156, in run
2023-04-29 15:44:49 f"\n\n{self.commands.execute_command(command_name, command_args)}"
2023-04-29 15:44:49 File "/app/Commands.py", line 110, in execute_command
2023-04-29 15:44:49 output = command_function(module, **params)
2023-04-29 15:44:49 File "/app/commands/searxng_commands.py", line 16, in search_searx
2023-04-29 15:44:49 searx_url = CFG.SEARX_INSTANCE_URL.rstrip("/") + "/search"
2023-04-29 15:44:49 AttributeError: 'Config' object has no attribute 'SEARX_INSTANCE_URL'. Did you mean: 'SEARXNG_INSTANCE_URL'?

It appears to try to use Searx Search? It also had write_to_file as part of the plan, even though that command was not enabled. Searx failed with the above error anyway, so it never got that far.

  1. Stopped the objective and toggled Google Search off, Searx Search on, tried again and got the same error:

Traceback (most recent call last):
2023-04-29 15:48:23 File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2023-04-29 15:48:23 self.run()
2023-04-29 15:48:23 File "/usr/local/lib/python3.10/threading.py", line 953, in run
2023-04-29 15:48:23 self._target(*self._args, **self._kwargs)
2023-04-29 15:48:23 File "/app/AgentLLM.py", line 325, in run_task
2023-04-29 15:48:23 result = self.execution_agent(task["task_name"], task["task_id"])
2023-04-29 15:48:23 File "/app/AgentLLM.py", line 308, in execution_agent
2023-04-29 15:48:23 return self.run(prompt)
2023-04-29 15:48:23 File "/app/AgentLLM.py", line 156, in run
2023-04-29 15:48:23 f"\n\n{self.commands.execute_command(command_name, command_args)}"
2023-04-29 15:48:23 File "/app/Commands.py", line 110, in execute_command
2023-04-29 15:48:23 output = command_function(module, **params)
2023-04-29 15:48:23 File "/app/commands/searxng_commands.py", line 16, in search_searx
2023-04-29 15:48:23 searx_url = CFG.SEARX_INSTANCE_URL.rstrip("/") + "/search"
2023-04-29 15:48:23 AttributeError: 'Config' object has no attribute 'SEARX_INSTANCE_URL'. Did you mean: 'SEARXNG_INSTANCE_URL'?

  1. Same error again with only Google Official Search command toggled on.

  2. Objective "Tell me the current date" with only "get datetime" command enabled:

On this one, it sort of did something before failing:

PLAN: I will use the datetime module to obtain the current date and then provide it as my response.
2023-04-29 15:58:28
2023-04-29 15:58:28 COMMANDS:
2023-04-29 15:58:28
2023-04-29 15:58:28 Command not recognized:
2023-04-29 15:58:28
2023-04-29 15:58:28 Current date and time: 2023-04-29 03:58:26
2023-04-29 15:58:28
2023-04-29 15:58:28 Task Result:
2023-04-29 15:58:28
2023-04-29 15:58:28 THOUGHTS: This task is simple and can be completed easily.
2023-04-29 15:58:28
2023-04-29 15:58:28 REASONING: The task only requires me to provide the current date, which can be easily obtained through the use of the datetime module in Python.
2023-04-29 15:58:28
2023-04-29 15:58:28 PLAN: I will use the datetime module to obtain the current date and then provide it as my response.
2023-04-29 15:58:28
2023-04-29 15:58:28 COMMANDS:
2023-04-29 15:58:28
2023-04-29 15:58:28 Command not recognized:
2023-04-29 15:58:28
2023-04-29 15:58:28 Current date and time: 2023-04-29 03:58:26
2023-04-29 15:58:28
2023-04-29 15:58:28 INFO: 172.18.0.1:47918 - "GET /api/agent/Agent-LLM/task HTTP/1.1" 200 OK
2023-04-29 15:58:31 Response: 1. Obtain the current date using the datetime module in Python.
2023-04-29 15:58:31 2. Provide the current date as the response.
2023-04-29 15:58:31 3. End task.
2023-04-29 15:58:31
2023-04-29 15:58:31 New Tasks:
2023-04-29 15:58:31
2023-04-29 15:58:31 [{'task_name': '1. Obtain the current date using the datetime module in Python.'}, {'task_name': '2. Provide the current date as the response.'}, {'task_name': '3. End task.'}]
2023-04-29 15:58:31
2023-04-29 15:58:31 INFO: 172.18.0.1:47918 - "GET /api/agent/Agent-LLM/task HTTP/1.1" 200 OK
2023-04-29 15:58:34 Response: 1. Obtain the current date using the datetime module in Python.
2023-04-29 15:58:34 2. Provide the current date as the response.
2023-04-29 15:58:34 3. End task.
2023-04-29 15:58:34 4. Retrieve the user's timezone.
2023-04-29 15:58:34 5. Convert the current date to the user's timezone.
2023-04-29 15:58:34 6. Format the date to a user-friendly string.
2023-04-29 15:58:34 7. Send the formatted date as the response.
2023-04-29 15:58:34
2023-04-29 15:58:34 Executing task 1: Obtain the current date using the datetime module in Python.
2023-04-29 15:58:34
2023-04-29 15:58:34 INFO: 172.18.0.1:47918 - "GET /api/agent/Agent-LLM/task HTTP/1.1" 200 OK
2023-04-29 15:58:37 INFO: 172.18.0.1:47918 - "GET /api/agent/Agent-LLM/task HTTP/1.1" 200 OK
2023-04-29 15:58:40 INFO: 172.18.0.1:47918 - "GET /api/agent/Agent-LLM/task HTTP/1.1" 200 OK
2023-04-29 15:58:43 INFO: 172.18.0.1:47918 - "GET /api/agent/Agent-LLM/task HTTP/1.1" 200 OK
2023-04-29 15:58:46 INFO: 172.18.0.1:47918 - "GET /api/agent/Agent-LLM/task HTTP/1.1" 200 OK
2023-04-29 15:58:47 Exception in thread Thread-6 (run_task):
2023-04-29 15:58:47 Traceback (most recent call last):
2023-04-29 15:58:47 File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
2023-04-29 15:58:47 self.run()
2023-04-29 15:58:47 File "/usr/local/lib/python3.10/threading.py", line 953, in run
2023-04-29 15:58:47 self._target(*self._args, **self._kwargs)
2023-04-29 15:58:47 File "/app/AgentLLM.py", line 325, in run_task
2023-04-29 15:58:47 result = self.execution_agent(task["task_name"], task["task_id"])
2023-04-29 15:58:47 File "/app/AgentLLM.py", line 308, in execution_agent
2023-04-29 15:58:47 return self.run(prompt)
2023-04-29 15:58:47 File "/app/AgentLLM.py", line 156, in run
2023-04-29 15:58:47 f"\n\n{self.commands.execute_command(command_name, command_args)}"
2023-04-29 15:58:47 File "/app/Commands.py", line 110, in execute_command
2023-04-29 15:58:47 output = command_function(module, **params)
2023-04-29 15:58:47 File "/app/commands/execute_code.py", line 21, in execute_python_file
2023-04-29 15:58:47 if not file.endswith(".py"):
2023-04-29 15:58:47 AttributeError: 'NoneType' object has no attribute 'endswith'
2023-04-29 15:58:49 Executing file 'None' in workspace 'WORKSPACE'

Additional Context / Screenshots

Windows 11, Chrome, Docker

Operating System

  • Microsoft Windows
  • Apple MacOS
  • Linux
  • Android
  • iOS
  • Other

Python Version

  • Python <= 3.9
  • Python 3.10
  • Python 3.11

Environment Type - Connection

  • Local
  • Remote

Environment Type - Container

  • Using Docker
  • Not Using Docker

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of Agent-LLM.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@TheRealPhooney TheRealPhooney added needs triage Needs labels assigned. type | report | bug Confirmed bug in source code. labels Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs labels assigned. type | report | bug Confirmed bug in source code.
Projects
None yet
Development

No branches or pull requests

1 participant