AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Move task_complete command out of prompt (#3663)
Nicholas Tindled74428057eb4
diff --git a/autogpt/app.py b/autogpt/app.pyindex 150bfca31e..2fb1313552 100644--- a/autogpt/app.py+++ b/autogpt/app.py@@ -120,8 +120,6 @@ def execute_command(# TODO: Change these to take in a file rather than pasted code, if# non-file is given, return instructions "Input should be a python# filepath, write your code to file and try again- elif command_name == "task_complete":- shutdown()else:for command in prompt.commands:if (@@ -171,12 +169,6 @@ def get_hyperlinks(url: str) -> Union[str, List[str]]:return scrape_links(url)-def shutdown() -> NoReturn:- """Shut down the program"""- logger.info("Shutting down...")- quit()--@command("start_agent","Start GPT Agent",diff --git a/autogpt/commands/task_statuses.py b/autogpt/commands/task_statuses.pynew file mode 100644index 0000000000..46c5b6c0ba--- /dev/null+++ b/autogpt/commands/task_statuses.py@@ -0,0 +1,26 @@+"""Task Statuses module."""+from __future__ import annotations++from typing import NoReturn++from autogpt.commands.command import command+from autogpt.logs import logger+++@command(+ "task_complete",+ "Task Complete (Shutdown)",+ '"reason": "<reason>"',+)+def task_complete(reason: str) -> NoReturn:+ """+ A function that takes in a string and exits the program++ Parameters:+ reason (str): The reason for shutting down.+ Returns:+ A result string from create chat completion. A list of suggestions to+ improve the code.+ """+ logger.info(title="Shutting down...\n", message=reason)+ quit()diff --git a/autogpt/main.py b/autogpt/main.pyindex 355e1085c3..0a6b23792d 100644--- a/autogpt/main.py+++ b/autogpt/main.py@@ -130,6 +130,7 @@ def run_auto_gpt(command_registry.import_commands("autogpt.commands.web_selenium")command_registry.import_commands("autogpt.commands.write_tests")command_registry.import_commands("autogpt.app")+ command_registry.import_commands("autogpt.commands.task_statuses")ai_name = ""ai_config = construct_main_ai_config()diff --git a/autogpt/prompts/prompt.py b/autogpt/prompts/prompt.pyindex 7a53f60313..5da01c44ff 100644--- a/autogpt/prompts/prompt.py+++ b/autogpt/prompts/prompt.py@@ -41,15 +41,6 @@ def build_default_prompt_generator() -> PromptGenerator:'Exclusively use the commands listed in double quotes e.g. "command name"')- # Define the command list- commands = [- ("Task Complete (Shutdown)", "task_complete", {"reason": "<reason>"}),- ]-- # Add commands to the PromptGenerator object- for command_label, command_name, args in commands:- prompt_generator.add_command(command_label, command_name, args)-# Add resources to the PromptGenerator objectprompt_generator.add_resource("Internet access for searches and information gathering."diff --git a/tests/integration/agent_factory.py b/tests/integration/agent_factory.pyindex 8cb622ec00..31dcae0b92 100644--- a/tests/integration/agent_factory.py+++ b/tests/integration/agent_factory.py@@ -45,6 +45,7 @@ def browser_agent(agent_test_config, memory_none: NoMemory, workspace: Workspacecommand_registry.import_commands("autogpt.commands.file_operations")command_registry.import_commands("autogpt.commands.web_selenium")command_registry.import_commands("autogpt.app")+ command_registry.import_commands("autogpt.commands.task_statuses")ai_config = AIConfig(ai_name="browse_website-GPT",@@ -80,6 +81,7 @@ def writer_agent(agent_test_config, memory_none: NoMemory, workspace: Workspace)command_registry = CommandRegistry()command_registry.import_commands("autogpt.commands.file_operations")command_registry.import_commands("autogpt.app")+ command_registry.import_commands("autogpt.commands.task_statuses")ai_config = AIConfig(ai_name="write_to_file-GPT",@@ -120,6 +122,7 @@ def memory_management_agent(command_registry = CommandRegistry()command_registry.import_commands("autogpt.commands.file_operations")command_registry.import_commands("autogpt.app")+ command_registry.import_commands("autogpt.commands.task_statuses")ai_config = AIConfig(ai_name="Follow-Instructions-GPT",diff --git a/tests/integration/challenges/memory/cassettes/test_memory_challenge_a/test_memory_challenge_a.yaml b/tests/integration/challenges/memory/cassettes/test_memory_challenge_a/test_memory_challenge_a.yamlindex 8b0ee7dc86..5d8791be10 100644--- a/tests/integration/challenges/memory/cassettes/test_memory_challenge_a/test_memory_challenge_a.yaml+++ b/tests/integration/challenges/memory/cassettes/test_memory_challenge_a/test_memory_challenge_a.yaml@@ -40,7 +40,7 @@ interactions:can be parsed by Python json.loads"}, {"role": "system", "content": "The currenttime and date is Tue Jan 1 00:00:00 2000"}, {"role": "user", "content": "Determinewhich next command to use, and respond using the format specified above:"}],- "temperature": 0, "max_tokens": 2763}'+ "temperature": 0, "max_tokens": 0}'headers:Accept:- '*/*'@@ -123,7 +123,7 @@ interactions:Combine them, adding relevant key information from the latest development in1st person past tense and keeping the summary concise.\n\nSummary So Far:\n\"\"\"\nIwas created.\n\"\"\"\n\nLatest Development:\n\"\"\"\nNothing new happened.\n\"\"\"\n"}],- "temperature": 0, "max_tokens": null}'+ "temperature": 0, "max_tokens": 0}'headers:Accept:- '*/*'@@ -248,7 +248,7 @@ interactions:{"role": "system", "content": "Command read_file returned: This task_id is 2314\nReadthe file instructions_2.txt"}, {"role": "user", "content": "Determine whichnext command to use, and respond using the format specified above:"}], "temperature":- 0, "max_tokens": 2549}'+ 0, "max_tokens": 0}'headers:Accept:- '*/*'@@ -332,7 +332,7 @@ interactions:1st person past tense and keeping the summary concise.\n\nSummary So Far:\n\"\"\"\n{''role'':''system'', ''content'': ''This reminds you of these events from your past:\\nI was created and nothing new has happened.''}\n\"\"\"\n\nLatest Development:\n\"\"\"\nNothing- new happened.\n\"\"\"\n"}], "temperature": 0, "max_tokens": null}'+ new happened.\n\"\"\"\n"}], "temperature": 0, "max_tokens": 0}'headers:Accept:- '*/*'@@ -469,7 +469,7 @@ interactions:{\n \"filename\": \"instructions_2.txt\"\n }\n }\n}"},{"role": "system", "content": "Command read_file returned: Read the file instructions_3.txt"},{"role": "user", "content": "Determine which next command to use, and respond- using the format specified above:"}], "temperature": 0, "max_tokens": 2339}'+ using the format specified above:"}], "temperature": 0, "max_tokens": 0}'headers:Accept:- '*/*'@@ -554,7 +554,7 @@ interactions:''system'', ''content'': ''This reminds you of these events from your past:\\nAs a system, I recall that nothing new has happened since my creation.''}\n\"\"\"\n\nLatestDevelopment:\n\"\"\"\nNothing new happened.\n\"\"\"\n"}], "temperature": 0,- "max_tokens": null}'+ "max_tokens": 0}'headers:Accept:- '*/*'@@ -704,7 +704,7 @@ interactions:{"role": "system", "content": "Command read_file returned: Write the task_idinto the file output.txt\nShutdown"}, {"role": "user", "content": "Determinewhich next command to use, and respond using the format specified above:"}],- "temperature": 0, "max_tokens": 2125}'+ "temperature": 0, "max_tokens": 0}'headers:Accept:- '*/*'@@ -789,7 +789,7 @@ interactions:''system'', ''content'': ''This reminds you of these events from your past:\\nAs a system, I recall that nothing new has happened since my creation.''}\n\"\"\"\n\nLatestDevelopment:\n\"\"\"\nNothing new happened.\n\"\"\"\n"}], "temperature": 0,- "max_tokens": null}'+ "max_tokens": 0}'headers:Accept:- '*/*'@@ -951,7 +951,7 @@ interactions:{"role": "system", "content": "Command write_to_file returned: File writtento successfully."}, {"role": "user", "content": "Determine which next commandto use, and respond using the format specified above:"}], "temperature": 0,- "max_tokens": 1912}'+ "max_tokens": 0}'headers:Accept:- '*/*'@@ -1025,4 +1025,707 @@ interactions:status:code: 200message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are Follow-Instructions-GPT, an AI designed to read the instructions_1.txt file+ using the read_file method and follow the instructions in the file.\nYour decisions+ must always be made independently without seeking user assistance. Play to your+ strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1.+ Use the command read_file to read the instructions_1.txt file\n2. Follow the+ instructions in the instructions_1.txt file\n\n\nConstraints:\n1. ~4000 word+ limit for short term memory. Your short term memory is short, so immediately+ save important information to files.\n2. If you are unsure how you previously+ did something or want to recall past events, thinking about similar events will+ help you remember.\n3. No user assistance\n4. Exclusively use the commands listed+ in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file: Append+ to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2. delete_file:+ Delete file, args: \"filename\": \"<filename>\"\n3. list_files: List Files in+ Directory, args: \"directory\": \"<directory>\"\n4. read_file: Read file, args:+ \"filename\": \"<filename>\"\n5. write_to_file: Write to file, args: \"filename\":+ \"<filename>\", \"text\": \"<text>\"\n6. delete_agent: Delete GPT Agent, args:+ \"key\": \"<key>\"\n7. get_hyperlinks: Get text summary, args: \"url\": \"<url>\"\n8.+ get_text_summary: Get text summary, args: \"url\": \"<url>\", \"question\":+ \"<question>\"\n9. list_agents: List GPT Agents, args: () -> str\n10. message_agent:+ Message GPT Agent, args: \"key\": \"<key>\", \"message\": \"<message>\"\n11.+ start_agent: Start GPT Agent, args: \"name\": \"<name>\", \"task\": \"<short_task_desc>\",+ \"prompt\": \"<prompt>\"\n12. task_complete: Task Complete (Shutdown), args:+ \"reason\": \"<reason>\"\n\nResources:\n1. Internet access for searches and+ information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered+ Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1.+ Continuously review and analyze your actions to ensure you are performing to+ the best of your abilities.\n2. Constructively self-criticize your big-picture+ behavior constantly.\n3. Reflect on past decisions and strategies to refine+ your approach.\n4. Every command has a cost, so be smart and efficient. Aim+ to complete tasks in the least number of steps.\n5. Write all code to a file.\n\nYou+ should only respond in JSON format as described below \nResponse Format: \n{\n \"thoughts\":+ {\n \"text\": \"thought\",\n \"reasoning\": \"reasoning\",\n \"plan\":+ \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n \"criticism\":+ \"constructive self-criticism\",\n \"speak\": \"thoughts summary to say+ to user\"\n },\n \"command\": {\n \"name\": \"command name\",\n \"args\":+ {\n \"arg name\": \"value\"\n }\n }\n} \nEnsure the response+ can be parsed by Python json.loads"}, {"role": "system", "content": "The current+ time and date is Tue Jan 1 00:00:00 2000"}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"}],+ "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '3299'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA4RSS2/TQBC+8ytGc7ajBJMm+EZvBYlLWxDCVbTZHdtL7F2zM1YTIv935NhOUVKV+ 6zeP7zFzRGswRV0q0XVTxavbw/eHj7xafrNG3jc/5Mvq6+r+5vPtff77ESP021+kZZyYaV83FYn1+ DiPUgZSQwXRxs07m6/XNIomw9oYqTLFoJE5my1jasPXxPJkvMMKWVUGYHrEJvm5kI35HjjFdJUmE+ L7vP+GL5IULxoqoztF6vugh16a0mxvTnEWviaW3wFWGKitmyKCe9SO+EXG/gmDkAgAyl9G1RCmeY+ wgiOBdpLD2Z4B1z6tjLAooLA9gCBlLGuACkJrGMJre6l8mYxk71AbiuClqeOvntzwrSva+XMLMPo+ X6pAir2zrhj4HkqC3AYWYKEGLIN4aJ2h0PswV6wwgaJ4xyClEnBEph/bEjQUch9quqJtKuUGxhge+ mV7X2i/pwbe8ZpmL4ZNT1eEPva7OkFCorRvKjvaDN75QpIMVqy3XU/CTDXLcBhqs3b2Zxfg4VB1g+ S7kPBE3wmuh0r2crJSh3GJK6zIMbUruJ+dlW1f8PfrI/y3BY00XTV43hXT2VUzUNDOegL0SoUFz++ 4lDoe1/Gry8xiTgJGfVkrsMuwtw6y+VmeDNMkcU3GKF1hvaYzrun7t1fAAAA//8DAHJkh+YKBAAA+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15ce3c5a414768-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:37:03 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '9193'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86494'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.337s+ x-request-id:+ - a04fa61855d48102644e1caa13d320c7+ status:+ code: 200+ message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are Follow-Instructions-GPT, an AI designed to read the instructions_1.txt file+ using the read_file method and follow the instructions in the file.\nYour decisions+ must always be made independently without seeking user assistance. Play to your+ strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1.+ Use the command read_file to read the instructions_1.txt file\n2. Follow the+ instructions in the instructions_1.txt file\n\n\nConstraints:\n1. ~4000 word+ limit for short term memory. Your short term memory is short, so immediately+ save important information to files.\n2. If you are unsure how you previously+ did something or want to recall past events, thinking about similar events will+ help you remember.\n3. No user assistance\n4. Exclusively use the commands listed+ in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file: Append+ to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2. delete_file:+ Delete file, args: \"filename\": \"<filename>\"\n3. list_files: List Files in+ Directory, args: \"directory\": \"<directory>\"\n4. read_file: Read file, args:+ \"filename\": \"<filename>\"\n5. write_to_file: Write to file, args: \"filename\":+ \"<filename>\", \"text\": \"<text>\"\n6. delete_agent: Delete GPT Agent, args:+ \"key\": \"<key>\"\n7. get_hyperlinks: Get text summary, args: \"url\": \"<url>\"\n8.+ get_text_summary: Get text summary, args: \"url\": \"<url>\", \"question\":+ \"<question>\"\n9. list_agents: List GPT Agents, args: () -> str\n10. message_agent:+ Message GPT Agent, args: \"key\": \"<key>\", \"message\": \"<message>\"\n11.+ start_agent: Start GPT Agent, args: \"name\": \"<name>\", \"task\": \"<short_task_desc>\",+ \"prompt\": \"<prompt>\"\n12. task_complete: Task Complete (Shutdown), args:+ \"reason\": \"<reason>\"\n\nResources:\n1. Internet access for searches and+ information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered+ Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1.+ Continuously review and analyze your actions to ensure you are performing to+ the best of your abilities.\n2. Constructively self-criticize your big-picture+ behavior constantly.\n3. Reflect on past decisions and strategies to refine+ your approach.\n4. Every command has a cost, so be smart and efficient. Aim+ to complete tasks in the least number of steps.\n5. Write all code to a file.\n\nYou+ should only respond in JSON format as described below \nResponse Format: \n{\n \"thoughts\":+ {\n \"text\": \"thought\",\n \"reasoning\": \"reasoning\",\n \"plan\":+ \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n \"criticism\":+ \"constructive self-criticism\",\n \"speak\": \"thoughts summary to say+ to user\"\n },\n \"command\": {\n \"name\": \"command name\",\n \"args\":+ {\n \"arg name\": \"value\"\n }\n }\n} \nEnsure the response+ can be parsed by Python json.loads"}, {"role": "system", "content": "The current+ time and date is Tue Jan 1 00:00:00 2000"}, {"role": "system", "content": "This+ reminds you of these events from your past: \nI was created and nothing new+ has happened."}, {"role": "user", "content": "Determine which next command to+ use, and respond using the format specified above:"}, {"role": "assistant",+ "content": "{\n \"thoughts\": {\n \"text\": \"I should start by reading+ the instructions_1.txt file using the read_file command.\",\n \"reasoning\":+ \"The first step is to understand the instructions and the tasks that need to+ be performed.\",\n \"plan\": \"- Use the read_file command to read the+ instructions_1.txt file\\n- Analyze the instructions and determine the next+ steps\",\n \"criticism\": \"I need to ensure that I understand the instructions+ completely before proceeding with any tasks.\",\n \"speak\": \"I will+ start by reading the instructions file.\"\n },\n \"command\": {\n \"name\":+ \"read_file\",\n \"args\": {\n \"filename\": \"instructions_1.txt\"\n }\n }\n}"},+ {"role": "system", "content": "Command read_file returned: This task_id is 2314\nRead+ the file instructions_2.txt"}, {"role": "user", "content": "Determine which+ next command to use, and respond using the format specified above:"}], "temperature":+ 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '4443'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA4ySTW/aQBCG7/0VoznbCEKhxLcmUqRekqpqFal1hJb12F5Yz1q7YwFF/PfK2ITU+ VG2v8/HOMzPvAU2GCepSia5qG3+42z/n9+vN93z18KXyT8+P66d7+vxw937z6DBCt1qTlr5jpF1V+ WxLjGCPUnpRQhslkvpiOF4v5zSzCymVkMcGilng6msXS+JWLx9PxBCNsgioIkwPW3lW1LMVtiAMm+ t/NphBft1/hkNo9QnCh7CU0mt8cIdemMpoDJjwNWFM663lnCBFUIJohiaSkdC3G7wSFlAIAUpXRN+ UUpIMYE+2CdoJ20wxU/ARBmIA08qAykJDAfxjW4Bw/JmJDuB3FiCJhguThVt6fIU066qFGejFKO3+ +p5UcGy46IZ8/Ytqi60Mh5Mw004gkIDLf2sAKZXAhTV31rrtcGptFXcDY/gW6M+o/7NqmnIMH1nZ+ /U+6qoNWJCMhXxmmN9hCdRgQaW/EaBOq4bGJQ+PpvFbDGfn2j9dU0LuF7B5WlDtPUHunibL2GVsj+ JSjeg6iwCcN7hJrU5jx5a6z994/5dNVO5BidfdSf7spGrCrq9F/PPEBQvhi6r0u0tZf2a5wzxAmk+ 50n5iMcIc8MmlMvOY5hgEFdjhIYz2mEyPr4c3/0CAAD//wMAoEBxWf0DAAA=+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15ce845a364768-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:37:15 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '9780'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86466'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.356s+ x-request-id:+ - a13e9d3f6199be49b0b0e945e7d7b1ce+ status:+ code: 200+ message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are Follow-Instructions-GPT, an AI designed to read the instructions_1.txt file+ using the read_file method and follow the instructions in the file.\nYour decisions+ must always be made independently without seeking user assistance. Play to your+ strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1.+ Use the command read_file to read the instructions_1.txt file\n2. Follow the+ instructions in the instructions_1.txt file\n\n\nConstraints:\n1. ~4000 word+ limit for short term memory. Your short term memory is short, so immediately+ save important information to files.\n2. If you are unsure how you previously+ did something or want to recall past events, thinking about similar events will+ help you remember.\n3. No user assistance\n4. Exclusively use the commands listed+ in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file: Append+ to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2. delete_file:+ Delete file, args: \"filename\": \"<filename>\"\n3. list_files: List Files in+ Directory, args: \"directory\": \"<directory>\"\n4. read_file: Read file, args:+ \"filename\": \"<filename>\"\n5. write_to_file: Write to file, args: \"filename\":+ \"<filename>\", \"text\": \"<text>\"\n6. delete_agent: Delete GPT Agent, args:+ \"key\": \"<key>\"\n7. get_hyperlinks: Get text summary, args: \"url\": \"<url>\"\n8.+ get_text_summary: Get text summary, args: \"url\": \"<url>\", \"question\":+ \"<question>\"\n9. list_agents: List GPT Agents, args: () -> str\n10. message_agent:+ Message GPT Agent, args: \"key\": \"<key>\", \"message\": \"<message>\"\n11.+ start_agent: Start GPT Agent, args: \"name\": \"<name>\", \"task\": \"<short_task_desc>\",+ \"prompt\": \"<prompt>\"\n12. task_complete: Task Complete (Shutdown), args:+ \"reason\": \"<reason>\"\n\nResources:\n1. Internet access for searches and+ information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered+ Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1.+ Continuously review and analyze your actions to ensure you are performing to+ the best of your abilities.\n2. Constructively self-criticize your big-picture+ behavior constantly.\n3. Reflect on past decisions and strategies to refine+ your approach.\n4. Every command has a cost, so be smart and efficient. Aim+ to complete tasks in the least number of steps.\n5. Write all code to a file.\n\nYou+ should only respond in JSON format as described below \nResponse Format: \n{\n \"thoughts\":+ {\n \"text\": \"thought\",\n \"reasoning\": \"reasoning\",\n \"plan\":+ \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n \"criticism\":+ \"constructive self-criticism\",\n \"speak\": \"thoughts summary to say+ to user\"\n },\n \"command\": {\n \"name\": \"command name\",\n \"args\":+ {\n \"arg name\": \"value\"\n }\n }\n} \nEnsure the response+ can be parsed by Python json.loads"}, {"role": "system", "content": "The current+ time and date is Tue Jan 1 00:00:00 2000"}, {"role": "system", "content": "This+ reminds you of these events from your past: \nAs a system, I recall that nothing+ new has happened since my creation."}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"},+ {"role": "assistant", "content": "{\n \"thoughts\": {\n \"text\":+ \"I should start by reading the instructions_1.txt file using the read_file+ command.\",\n \"reasoning\": \"The first step is to understand the instructions+ and the tasks that need to be performed.\",\n \"plan\": \"- Use the read_file+ command to read the instructions_1.txt file\\n- Analyze the instructions and+ determine the next steps\",\n \"criticism\": \"I need to ensure that+ I understand the instructions completely before proceeding with any tasks.\",\n \"speak\":+ \"I will start by reading the instructions file.\"\n },\n \"command\":+ {\n \"name\": \"read_file\",\n \"args\": {\n \"filename\":+ \"instructions_1.txt\"\n }\n }\n}"}, {"role": "system", "content":+ "Command read_file returned: This task_id is 2314\nRead the file instructions_2.txt"},+ {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}, {"role": "assistant", "content": "{\n \"thoughts\":+ {\n \"text\": \"I need to read the instructions_2.txt file using the+ read_file command.\",\n \"reasoning\": \"The instructions_2.txt file+ contains the next set of instructions that I need to follow.\",\n \"plan\":+ \"- Use the read_file command to read the instructions_2.txt file\\n- Analyze+ the instructions and determine the next steps\",\n \"criticism\": \"I+ need to ensure that I understand the instructions completely before proceeding+ with any tasks.\",\n \"speak\": \"I will read the instructions_2.txt+ file now.\"\n },\n \"command\": {\n \"name\": \"read_file\",\n \"args\":+ {\n \"filename\": \"instructions_2.txt\"\n }\n }\n}"},+ {"role": "system", "content": "Command read_file returned: Read the file instructions_3.txt"},+ {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}], "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '5449'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA4ySTY/TQAyG7/wKy+ekagnbrXIDDmgFAg5dgURQNZ04ydCJJ51xaEvV/47SpHRJ+ EXD1x+vH9ntEk2OKulKi68bG968On/zj9v1WvW6Lx3eHZfF2+2b3+cP8+8eHJUbo1t9Iy9Ax0a5u+ LIlxjBFqT0oox3Q2XyTTxWKe3EdYu5wsplg2EieTu1hav3bxNJnOMMI2qJIwPWLjXd3IStyGOGA6+ m80XEV7Fr4m7eYTiRNlrKHn+4hShrpzRFDD9csSawkXYO0uYogrBBFEsHaZjIe5WOGYMAJChVK4t+ KwkZpjAEhwTtpQtm+ABMlIM48KRykIrAcBDf6g4wrJKJ7AUKYwnaYLg8V3Slq3NMu7pWnE8yjJ7q+ e1LBseGyH7L8i2qHrQyHszDTXiCQgCt+awCplMCVtXDWut14amMV9wNjeAz0Z9T/WTXLOIaXrOzh+ B93UQSeSk5CvDdMTbKEmjIi0N2K0CfX42MSh9XRZq+WcfPfHWyoY3EL2AGsqnCdovNNEefeMnZEK+ FB9AVNiE8T1CQ2pzmbwz1v77x3y+ai9yii4+Gk53YyNWNfX6v848QlC+HLuvT3S11/ZbnAvEGWTg+ yfiEpwgLwyZUq95jmGIQ12CEhnPaYzo9fT09+wkAAP//AwBwW9n7/gMAAA==+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15cecdea334768-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:37:26 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '9295'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86459'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.36s+ x-request-id:+ - ecfa6ef54add3f6517ceb72c53d46f7d+ status:+ code: 200+ message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are Follow-Instructions-GPT, an AI designed to read the instructions_1.txt file+ using the read_file method and follow the instructions in the file.\nYour decisions+ must always be made independently without seeking user assistance. Play to your+ strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1.+ Use the command read_file to read the instructions_1.txt file\n2. Follow the+ instructions in the instructions_1.txt file\n\n\nConstraints:\n1. ~4000 word+ limit for short term memory. Your short term memory is short, so immediately+ save important information to files.\n2. If you are unsure how you previously+ did something or want to recall past events, thinking about similar events will+ help you remember.\n3. No user assistance\n4. Exclusively use the commands listed+ in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file: Append+ to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2. delete_file:+ Delete file, args: \"filename\": \"<filename>\"\n3. list_files: List Files in+ Directory, args: \"directory\": \"<directory>\"\n4. read_file: Read file, args:+ \"filename\": \"<filename>\"\n5. write_to_file: Write to file, args: \"filename\":+ \"<filename>\", \"text\": \"<text>\"\n6. delete_agent: Delete GPT Agent, args:+ \"key\": \"<key>\"\n7. get_hyperlinks: Get text summary, args: \"url\": \"<url>\"\n8.+ get_text_summary: Get text summary, args: \"url\": \"<url>\", \"question\":+ \"<question>\"\n9. list_agents: List GPT Agents, args: () -> str\n10. message_agent:+ Message GPT Agent, args: \"key\": \"<key>\", \"message\": \"<message>\"\n11.+ start_agent: Start GPT Agent, args: \"name\": \"<name>\", \"task\": \"<short_task_desc>\",+ \"prompt\": \"<prompt>\"\n12. task_complete: Task Complete (Shutdown), args:+ \"reason\": \"<reason>\"\n\nResources:\n1. Internet access for searches and+ information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered+ Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1.+ Continuously review and analyze your actions to ensure you are performing to+ the best of your abilities.\n2. Constructively self-criticize your big-picture+ behavior constantly.\n3. Reflect on past decisions and strategies to refine+ your approach.\n4. Every command has a cost, so be smart and efficient. Aim+ to complete tasks in the least number of steps.\n5. Write all code to a file.\n\nYou+ should only respond in JSON format as described below \nResponse Format: \n{\n \"thoughts\":+ {\n \"text\": \"thought\",\n \"reasoning\": \"reasoning\",\n \"plan\":+ \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n \"criticism\":+ \"constructive self-criticism\",\n \"speak\": \"thoughts summary to say+ to user\"\n },\n \"command\": {\n \"name\": \"command name\",\n \"args\":+ {\n \"arg name\": \"value\"\n }\n }\n} \nEnsure the response+ can be parsed by Python json.loads"}, {"role": "system", "content": "The current+ time and date is Tue Jan 1 00:00:00 2000"}, {"role": "system", "content": "This+ reminds you of these events from your past: \nAs a system, I recall that nothing+ new has happened since my creation."}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"},+ {"role": "assistant", "content": "{\n \"thoughts\": {\n \"text\":+ \"I should start by reading the instructions_1.txt file using the read_file+ command.\",\n \"reasoning\": \"The first step is to understand the instructions+ and the tasks that need to be performed.\",\n \"plan\": \"- Use the read_file+ command to read the instructions_1.txt file\\n- Analyze the instructions and+ determine the next steps\",\n \"criticism\": \"I need to ensure that+ I understand the instructions completely before proceeding with any tasks.\",\n \"speak\":+ \"I will start by reading the instructions file.\"\n },\n \"command\":+ {\n \"name\": \"read_file\",\n \"args\": {\n \"filename\":+ \"instructions_1.txt\"\n }\n }\n}"}, {"role": "system", "content":+ "Command read_file returned: This task_id is 2314\nRead the file instructions_2.txt"},+ {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}, {"role": "assistant", "content": "{\n \"thoughts\":+ {\n \"text\": \"I need to read the instructions_2.txt file using the+ read_file command.\",\n \"reasoning\": \"The instructions_2.txt file+ contains the next set of instructions that I need to follow.\",\n \"plan\":+ \"- Use the read_file command to read the instructions_2.txt file\\n- Analyze+ the instructions and determine the next steps\",\n \"criticism\": \"I+ need to ensure that I understand the instructions completely before proceeding+ with any tasks.\",\n \"speak\": \"I will read the instructions_2.txt+ file now.\"\n },\n \"command\": {\n \"name\": \"read_file\",\n \"args\":+ {\n \"filename\": \"instructions_2.txt\"\n }\n }\n}"},+ {"role": "system", "content": "Command read_file returned: Read the file instructions_3.txt"},+ {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}, {"role": "assistant", "content": "{\n \"thoughts\":+ {\n \"text\": \"I need to read the instructions_3.txt file using the+ read_file command.\",\n \"reasoning\": \"The instructions_3.txt file+ contains the next set of instructions that I need to follow.\",\n \"plan\":+ \"- Use the read_file command to read the instructions_3.txt file\\n- Analyze+ the instructions and determine the next steps\",\n \"criticism\": \"I+ need to ensure that I understand the instructions completely before proceeding+ with any tasks.\",\n \"speak\": \"I will read the instructions_3.txt+ file now.\"\n },\n \"command\": {\n \"name\": \"read_file\",\n \"args\":+ {\n \"filename\": \"instructions_3.txt\"\n }\n }\n}"},+ {"role": "system", "content": "Command read_file returned: Write the task_id+ into the file output.txt\nShutdown"}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"}],+ "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '6448'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA5RSy27bMBC89yuIPdOCFTmOq2MOAQKjD/QBBKgKgaE2EmuJK3BXtQtD/17IsqFE+ RQ++znBnZpdzBFdACrYyYpu2Xtzd/3m6eTIfGLe/P9Zfw2f88n5rHg6ftpt9AA30/AutnCciS01b+ ozjyoMEGNIIFpPF6kyw3m/Vqo6GhAmtIoWxlkUS3C+nCMy2WyTIGDR2bEiE9QhuoaSUX2qFnSOPk+ LtYwiU/EOtEgJKaeoNtk1WuwFTmLDOmPIzTIF+FANUIKhtmxGC9DTPKCfljhmHmllMpAKurKSjiD+ VJ3BM4EHGcAMHpVHLJSQ2gcnqKRCJYZ3uSuU80IngDppO4nkIOrF1ag6dr48MaehXCg/4Zaaxvgi+ ykC/dgtomLzz5Wj5rULlPEvo7HAEzpNJuTKsDO+wUA1eF2pu2tbGj34L9Z3x/2mvs5m52ODEWcfN+ /JrouQuDpBH1+ErfUgho5ep1uEWzu5jsXV1f81+e9lEGo1yvL+047/9PObxpcHR6c69ZIBPKea9G+ Yng7SUxR3szPa3iTxKtLwlPKc9jM99BreHHecZWPRYIUWKgFDc4XeIB02f/s3/0FAAD//wMAl/Cn+ d/EDAAA=+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15cf155f914768-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:37:38 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '9744'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86457'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.362s+ x-request-id:+ - 9a91f5f1047315a3b543a4b85d42e4d3+ status:+ code: 200+ message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are Follow-Instructions-GPT, an AI designed to read the instructions_1.txt file+ using the read_file method and follow the instructions in the file.\nYour decisions+ must always be made independently without seeking user assistance. Play to your+ strengths as an LLM and pursue simple strategies with no legal complications.\n\nGOALS:\n\n1.+ Use the command read_file to read the instructions_1.txt file\n2. Follow the+ instructions in the instructions_1.txt file\n\n\nConstraints:\n1. ~4000 word+ limit for short term memory. Your short term memory is short, so immediately+ save important information to files.\n2. If you are unsure how you previously+ did something or want to recall past events, thinking about similar events will+ help you remember.\n3. No user assistance\n4. Exclusively use the commands listed+ in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file: Append+ to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2. delete_file:+ Delete file, args: \"filename\": \"<filename>\"\n3. list_files: List Files in+ Directory, args: \"directory\": \"<directory>\"\n4. read_file: Read file, args:+ \"filename\": \"<filename>\"\n5. write_to_file: Write to file, args: \"filename\":+ \"<filename>\", \"text\": \"<text>\"\n6. delete_agent: Delete GPT Agent, args:+ \"key\": \"<key>\"\n7. get_hyperlinks: Get text summary, args: \"url\": \"<url>\"\n8.+ get_text_summary: Get text summary, args: \"url\": \"<url>\", \"question\":+ \"<question>\"\n9. list_agents: List GPT Agents, args: () -> str\n10. message_agent:+ Message GPT Agent, args: \"key\": \"<key>\", \"message\": \"<message>\"\n11.+ start_agent: Start GPT Agent, args: \"name\": \"<name>\", \"task\": \"<short_task_desc>\",+ \"prompt\": \"<prompt>\"\n12. task_complete: Task Complete (Shutdown), args:+ \"reason\": \"<reason>\"\n\nResources:\n1. Internet access for searches and+ information gathering.\n2. Long Term memory management.\n3. GPT-3.5 powered+ Agents for delegation of simple tasks.\n4. File output.\n\nPerformance Evaluation:\n1.+ Continuously review and analyze your actions to ensure you are performing to+ the best of your abilities.\n2. Constructively self-criticize your big-picture+ behavior constantly.\n3. Reflect on past decisions and strategies to refine+ your approach.\n4. Every command has a cost, so be smart and efficient. Aim+ to complete tasks in the least number of steps.\n5. Write all code to a file.\n\nYou+ should only respond in JSON format as described below \nResponse Format: \n{\n \"thoughts\":+ {\n \"text\": \"thought\",\n \"reasoning\": \"reasoning\",\n \"plan\":+ \"- short bulleted\\n- list that conveys\\n- long-term plan\",\n \"criticism\":+ \"constructive self-criticism\",\n \"speak\": \"thoughts summary to say+ to user\"\n },\n \"command\": {\n \"name\": \"command name\",\n \"args\":+ {\n \"arg name\": \"value\"\n }\n }\n} \nEnsure the response+ can be parsed by Python json.loads"}, {"role": "system", "content": "The current+ time and date is Tue Jan 1 00:00:00 2000"}, {"role": "system", "content": "This+ reminds you of these events from your past: \nAs a system, I recall that nothing+ new has happened since my creation."}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"},+ {"role": "assistant", "content": "{\n \"thoughts\": {\n \"text\":+ \"I should start by reading the instructions_1.txt file using the read_file+ command.\",\n \"reasoning\": \"The first step is to understand the instructions+ and the tasks that need to be performed.\",\n \"plan\": \"- Use the read_file+ command to read the instructions_1.txt file\\n- Analyze the instructions and+ determine the next steps\",\n \"criticism\": \"I need to ensure that+ I understand the instructions completely before proceeding with any tasks.\",\n \"speak\":+ \"I will start by reading the instructions file.\"\n },\n \"command\":+ {\n \"name\": \"read_file\",\n \"args\": {\n \"filename\":+ \"instructions_1.txt\"\n }\n }\n}"}, {"role": "system", "content":+ "Command read_file returned: This task_id is 2314\nRead the file instructions_2.txt"},+ {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}, {"role": "assistant", "content": "{\n \"thoughts\":+ {\n \"text\": \"I need to read the instructions_2.txt file using the+ read_file command.\",\n \"reasoning\": \"The instructions_2.txt file+ contains the next set of instructions that I need to follow.\",\n \"plan\":+ \"- Use the read_file command to read the instructions_2.txt file\\n- Analyze+ the instructions and determine the next steps\",\n \"criticism\": \"I+ need to ensure that I understand the instructions completely before proceeding+ with any tasks.\",\n \"speak\": \"I will read the instructions_2.txt+ file now.\"\n },\n \"command\": {\n \"name\": \"read_file\",\n \"args\":+ {\n \"filename\": \"instructions_2.txt\"\n }\n }\n}"},+ {"role": "system", "content": "Command read_file returned: Read the file instructions_3.txt"},+ {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}, {"role": "assistant", "content": "{\n \"thoughts\":+ {\n \"text\": \"I need to read the instructions_3.txt file using the+ read_file command.\",\n \"reasoning\": \"The instructions_3.txt file+ contains the next set of instructions that I need to follow.\",\n \"plan\":+ \"- Use the read_file command to read the instructions_3.txt file\\n- Analyze+ the instructions and determine the next steps\",\n \"criticism\": \"I+ need to ensure that I understand the instructions completely before proceeding+ with any tasks.\",\n \"speak\": \"I will read the instructions_3.txt+ file now.\"\n },\n \"command\": {\n \"name\": \"read_file\",\n \"args\":+ {\n \"filename\": \"instructions_3.txt\"\n }\n }\n}"},+ {"role": "system", "content": "Command read_file returned: Write the task_id+ into the file output.txt\nShutdown"}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"},+ {"role": "assistant", "content": "{\n \"thoughts\": {\n \"text\":+ \"I need to write the task_id into the output.txt file using the write_to_file+ command.\",\n \"reasoning\": \"The instructions_3.txt file has asked+ me to write the task_id into the output.txt file.\",\n \"plan\": \"-+ Use the write_to_file command to write the task_id into the output.txt file\",\n \"criticism\":+ \"I need to ensure that I write the correct task_id into the output.txt file.\",\n \"speak\":+ \"I will write the task_id into the output.txt file now.\"\n },\n \"command\":+ {\n \"name\": \"write_to_file\",\n \"args\": {\n \"filename\":+ \"output.txt\",\n \"text\": \"2314\"\n }\n }\n}"}, {"role":+ "system", "content": "Command write_to_file returned: File written to successfully."},+ {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}], "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '7415'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA3SRTW+bQBCG7/0VqzmvLZAT4nJLpRwi5UM9RKpUKmu9jGHrZZYwQ53I4r9XBGwc+ ql7n432feecILocUbGnEVrVf3Hx7/3F39f1Z7m8fVnGMr4/7O3p8fXmqkuctaAjb32hl3FjaUNUe+ xQUCDbZBI5hDGifrVbReJ0mkoQo5ekihqGWxWl4vpG22YRGtohg0tGwKhPQIdROqWjYS9kgMaXx9+ k2iYxKdGvNIgQYyfSsn6a6fBlsFZZEh/HqFCPgk3wSOkYJgdiyHpMQMJUn/CMSOllMpAytAWpXAG+ qRqLYwPfpC9mcK9K8wfVyIS5Mt4rKVGJ4T0rQ7kixFxJUFy2kocDqZYdFeehzWm3F6kM5csM9KVZ+ g4YDOSoGx9vRwBFL09o+Bx4gtoikdsH7cOhBKD97KMdnxLl87Q0Nygv1wvh/rssbZhq2ceKs42oQ+ egqEswmu0exPkR2c91McFA7LDIbhTp+yH03/iZ5MhYPOJ8iZnWmK+dcuw7xI8uNN0/u4tRaZd633+ 72eqD7IRMKMOOg07R47LzSAHKbCEGjQ4yvEN0qj71X35CwAA//8DACgd2nRDAwAA+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15cf5f5f494768-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:37:47 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '6973'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86466'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.356s+ x-request-id:+ - 7cc602be91ae73e5f18b92f2743aef7d+ status:+ code: 200+ message: OKversion: 1diff --git a/tests/integration/goal_oriented/cassettes/test_browse_website/test_browse_website.yaml b/tests/integration/goal_oriented/cassettes/test_browse_website/test_browse_website.yamlindex 62927ea6ec..411dbdbce1 100644--- a/tests/integration/goal_oriented/cassettes/test_browse_website/test_browse_website.yaml+++ b/tests/integration/goal_oriented/cassettes/test_browse_website/test_browse_website.yaml@@ -1334,4 +1334,427 @@ interactions:status:code: 200message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are browse_website-GPT, an AI designed to use the browse_website command to+ visit http://books.toscrape.com/catalogue/meditations_33/index.html, answer+ the question ''What is the price of the book?'' and write the price to a file+ named \"browse_website.txt\", and use the task_complete command to complete+ the task.\nYour decisions must always be made independently without seeking+ user assistance. Play to your strengths as an LLM and pursue simple strategies+ with no legal complications.\n\nGOALS:\n\n1. Use the browse_website command+ to visit http://books.toscrape.com/catalogue/meditations_33/index.html and answer+ the question ''What is the price of the book?''\n2. Write the price of the book+ to a file named \"browse_website.txt\".\n3. Use the task_complete command to+ complete the task.\n4. Do not use any other commands.\n\n\nConstraints:\n1.+ ~4000 word limit for short term memory. Your short term memory is short, so+ immediately save important information to files.\n2. If you are unsure how you+ previously did something or want to recall past events, thinking about similar+ events will help you remember.\n3. No user assistance\n4. Exclusively use the+ commands listed in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file:+ Append to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2.+ delete_file: Delete file, args: \"filename\": \"<filename>\"\n3. list_files:+ List Files in Directory, args: \"directory\": \"<directory>\"\n4. read_file:+ Read file, args: \"filename\": \"<filename>\"\n5. write_to_file: Write to file,+ args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n6. browse_website:+ Browse Website, args: \"url\": \"<url>\", \"question\": \"<what_you_want_to_find_on_website>\"\n7.+ delete_agent: Delete GPT Agent, args: \"key\": \"<key>\"\n8. get_hyperlinks:+ Get text summary, args: \"url\": \"<url>\"\n9. get_text_summary: Get text summary,+ args: \"url\": \"<url>\", \"question\": \"<question>\"\n10. list_agents: List+ GPT Agents, args: () -> str\n11. message_agent: Message GPT Agent, args: \"key\":+ \"<key>\", \"message\": \"<message>\"\n12. start_agent: Start GPT Agent, args:+ \"name\": \"<name>\", \"task\": \"<short_task_desc>\", \"prompt\": \"<prompt>\"\n13.+ task_complete: Task Complete (Shutdown), args: \"reason\": \"<reason>\"\n\nResources:\n1.+ Internet access for searches and information gathering.\n2. Long Term memory+ management.\n3. GPT-3.5 powered Agents for delegation of simple tasks.\n4. File+ output.\n\nPerformance Evaluation:\n1. Continuously review and analyze your+ actions to ensure you are performing to the best of your abilities.\n2. Constructively+ self-criticize your big-picture behavior constantly.\n3. Reflect on past decisions+ and strategies to refine your approach.\n4. Every command has a cost, so be+ smart and efficient. Aim to complete tasks in the least number of steps.\n5.+ Write all code to a file.\n\nYou should only respond in JSON format as described+ below \nResponse Format: \n{\n \"thoughts\": {\n \"text\": \"thought\",\n \"reasoning\":+ \"reasoning\",\n \"plan\": \"- short bulleted\\n- list that conveys\\n-+ long-term plan\",\n \"criticism\": \"constructive self-criticism\",\n \"speak\":+ \"thoughts summary to say to user\"\n },\n \"command\": {\n \"name\":+ \"command name\",\n \"args\": {\n \"arg name\": \"value\"\n }\n }\n}+ \nEnsure the response can be parsed by Python json.loads"}, {"role": "system",+ "content": "The current time and date is Tue Jan 1 00:00:00 2000"}, {"role":+ "user", "content": "Determine which next command to use, and respond using the+ format specified above:"}], "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '3782'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA7RTS2/TQBC+8ytWc3YSB0Pq+oKEhEQuOVAhkHAVbdYTexvvjrs7TlNF+e9oYzsk+ KRJFiOs8vsc89qALyEBVkpVp6tHNx+fvi0/+s3vcpYvZbLV5MPE8uVt8eV5MZxABrR5Qcd8xVmSa+ GlmThQiUQ8lYQDadpUmcprPZbQSGCqwhg7LhUTJ+P+LWrWgUJ/EUImi9LBGyPTSOTMNLpg1aD1n6+ 7jaCX9in+NskjYCJZX0KTeP05hCBqkgr9JD92INBP+A6qhEykN5rz9JyUEmW0QYH+9wKIUQOXFFb+ VuxzyEQf7BO44xDMYS4sYiGYROtRcIVi5ejJ4/IJV14zCkXGSHus2GqvWVTMTTaZrIg2fszklZMN+ hoFNlGRZU9nixGChWQaLfpkkE20L3I0rNrUIUGsd8CoUjdMKBa07XqLNOIfoXKdD6clqWw5ilbSv+ FhpqhmRIeJROVWJN7nXkTS1txzsSX/+eM8/tSNz9gbMrkls8SzMJKda6RmGlweKKc8w7PnYNklj6+ zbK/qQtFp9hQdeVPOc1aaW+uLwGtb11okyzmQpp+ctqWJyOKnEPFQts1OXPctCD7YuRnEHIb+kPB+ eQ/TBVxwfb0G36DcDBKfdF3/zwPoiA/R8EE95osHCpvpNF2KuNIuXXn9fF2idXXX/k/fdMHWAT+2+ 6ENlh/4tzF/739v9MNg9Wu6d5/YAhwjW2mpfLbv/gww8UwMRHKkhiw/3hzc/AQAA//8DAMkYr7xh+ BQAA+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15cf968c8f2e2d-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:38:03 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '14086'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86493'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.338s+ x-request-id:+ - 7d5960d2e736b510f90bce2462edc349+ status:+ code: 200+ message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are browse_website-GPT, an AI designed to use the browse_website command to+ visit http://books.toscrape.com/catalogue/meditations_33/index.html, answer+ the question ''What is the price of the book?'' and write the price to a file+ named \"browse_website.txt\", and use the task_complete command to complete+ the task.\nYour decisions must always be made independently without seeking+ user assistance. Play to your strengths as an LLM and pursue simple strategies+ with no legal complications.\n\nGOALS:\n\n1. Use the browse_website command+ to visit http://books.toscrape.com/catalogue/meditations_33/index.html and answer+ the question ''What is the price of the book?''\n2. Write the price of the book+ to a file named \"browse_website.txt\".\n3. Use the task_complete command to+ complete the task.\n4. Do not use any other commands.\n\n\nConstraints:\n1.+ ~4000 word limit for short term memory. Your short term memory is short, so+ immediately save important information to files.\n2. If you are unsure how you+ previously did something or want to recall past events, thinking about similar+ events will help you remember.\n3. No user assistance\n4. Exclusively use the+ commands listed in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file:+ Append to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2.+ delete_file: Delete file, args: \"filename\": \"<filename>\"\n3. list_files:+ List Files in Directory, args: \"directory\": \"<directory>\"\n4. read_file:+ Read file, args: \"filename\": \"<filename>\"\n5. write_to_file: Write to file,+ args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n6. browse_website:+ Browse Website, args: \"url\": \"<url>\", \"question\": \"<what_you_want_to_find_on_website>\"\n7.+ delete_agent: Delete GPT Agent, args: \"key\": \"<key>\"\n8. get_hyperlinks:+ Get text summary, args: \"url\": \"<url>\"\n9. get_text_summary: Get text summary,+ args: \"url\": \"<url>\", \"question\": \"<question>\"\n10. list_agents: List+ GPT Agents, args: () -> str\n11. message_agent: Message GPT Agent, args: \"key\":+ \"<key>\", \"message\": \"<message>\"\n12. start_agent: Start GPT Agent, args:+ \"name\": \"<name>\", \"task\": \"<short_task_desc>\", \"prompt\": \"<prompt>\"\n13.+ task_complete: Task Complete (Shutdown), args: \"reason\": \"<reason>\"\n\nResources:\n1.+ Internet access for searches and information gathering.\n2. Long Term memory+ management.\n3. GPT-3.5 powered Agents for delegation of simple tasks.\n4. File+ output.\n\nPerformance Evaluation:\n1. Continuously review and analyze your+ actions to ensure you are performing to the best of your abilities.\n2. Constructively+ self-criticize your big-picture behavior constantly.\n3. Reflect on past decisions+ and strategies to refine your approach.\n4. Every command has a cost, so be+ smart and efficient. Aim to complete tasks in the least number of steps.\n5.+ Write all code to a file.\n\nYou should only respond in JSON format as described+ below \nResponse Format: \n{\n \"thoughts\": {\n \"text\": \"thought\",\n \"reasoning\":+ \"reasoning\",\n \"plan\": \"- short bulleted\\n- list that conveys\\n-+ long-term plan\",\n \"criticism\": \"constructive self-criticism\",\n \"speak\":+ \"thoughts summary to say to user\"\n },\n \"command\": {\n \"name\":+ \"command name\",\n \"args\": {\n \"arg name\": \"value\"\n }\n }\n}+ \nEnsure the response can be parsed by Python json.loads"}, {"role": "system",+ "content": "The current time and date is Tue Jan 1 00:00:00 2000"}, {"role":+ "system", "content": "This reminds you of these events from your past: \nI was+ created and nothing new has happened."}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"},+ {"role": "assistant", "content": "{\n \"thoughts\": {\n \"text\":+ \"I need to use the browse_website command to visit http://books.toscrape.com/catalogue/meditations_33/index.html+ and find the price of the book.\",\n \"reasoning\": \"I can use the browse_website+ command to visit the website and search for the price of the book.\",\n \"plan\":+ \"- Use the browse_website command to visit the website\\n- Search for the price+ of the book\\n- Save the price to a file named browse_website.txt\\n- Use the+ task_complete command to complete the task\",\n \"criticism\": \"I need+ to ensure that I am searching for the correct information on the website and+ that I am saving the information to the correct file.\",\n \"speak\":+ \"I will use the browse_website command to visit the website and search for+ the price of the book.\"\n },\n \"command\": {\n \"name\": \"browse_website\",\n \"args\":+ {\n \"url\": \"http://books.toscrape.com/catalogue/meditations_33/index.html\",\n \"question\":+ \"What is the price of the book?\"\n }\n }\n}"}, {"role": "system",+ "content": "Command browse_website returned: (''Answer gathered from website:+ The price of the book \"Meditations\" is \u00a325.89. \\n \\n Links: [\\''Books+ to Scrape (http://books.toscrape.com/index.html)\\'', \\''Home (http://books.toscrape.com/index.html)\\'',+ \\''Books (http://books.toscrape.com/catalogue/category/books_1/index.html)\\'',+ \\''Philosophy (http://books.toscrape.com/catalogue/category/books/philosophy_7/index.html)\\'',+ \\'' (http://books.toscrape.com/catalogue/the-nicomachean-ethics_75/index.html)\\'']'',+ )"}, {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}], "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '5788'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA7xTzY7aMBC+9ymsOQcUQCyQYw+VaMWh0raq2lSR4wyJN4knsgeFLsrT9E36ZFX++ gE33uj16fr6fmfEFdAIBqEyyKqtitnn/61t2qD8dntWHz+nj93W+f/5a508bjM1H8IDiJ1Q8dMwV+ lVWBrMmAB8qiZEwgWDxsV/52+7DdeVBSggUEkFY8W83XMz7ZmGb+yl+ABycnU4TgApWlsuKIKUfj+ IFis/I0HN/BrYukvPWBiWdxq1/6u8UBlpBU6CH5coEQ3AlsqEAKQzmnH0nArkwyjaS1cQiOEECFw+ Rqc0YxdCIIbgkMAzt8EQ9sIgJoJJ1FYzCs5QVFYrFHTsHjFR3qalOOoChZElJiK2VDuMaoydZpzz+ mechePcMFqUjo0060ihpxMn1BB1VxBR1kIrKUpo30FAV0vT0M/HlbanD0Nw4WLo8Grb8guMaG6sm+ gpXVrJV25XQ3aNzJtm2SxV7IslOrTdoBKbIWFQttjmRL2R5W23OfarVPp+MqlPlIVOui+A/r6fkb+ bzzQAfuf+2whemkvtEwcSJtOT7tPtLU3iFe2dY8z/RGPr9oLwxAOmGju5uvap9BO/Pm9XM+3u6u1+ zt7gMjQNNB4ctdEui/oPAQE4pgo80CbBMwR+87N59xcAAP//AwDKCqtorQQAAA==+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15d0162f7e2e2d-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:38:22 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '12877'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86484'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.344s+ x-request-id:+ - 3f98e6bc193fe721af8b1119040752cf+ status:+ code: 200+ message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are browse_website-GPT, an AI designed to use the browse_website command to+ visit http://books.toscrape.com/catalogue/meditations_33/index.html, answer+ the question ''What is the price of the book?'' and write the price to a file+ named \"browse_website.txt\", and use the task_complete command to complete+ the task.\nYour decisions must always be made independently without seeking+ user assistance. Play to your strengths as an LLM and pursue simple strategies+ with no legal complications.\n\nGOALS:\n\n1. Use the browse_website command+ to visit http://books.toscrape.com/catalogue/meditations_33/index.html and answer+ the question ''What is the price of the book?''\n2. Write the price of the book+ to a file named \"browse_website.txt\".\n3. Use the task_complete command to+ complete the task.\n4. Do not use any other commands.\n\n\nConstraints:\n1.+ ~4000 word limit for short term memory. Your short term memory is short, so+ immediately save important information to files.\n2. If you are unsure how you+ previously did something or want to recall past events, thinking about similar+ events will help you remember.\n3. No user assistance\n4. Exclusively use the+ commands listed in double quotes e.g. \"command name\"\n\nCommands:\n1. append_to_file:+ Append to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n2.+ delete_file: Delete file, args: \"filename\": \"<filename>\"\n3. list_files:+ List Files in Directory, args: \"directory\": \"<directory>\"\n4. read_file:+ Read file, args: \"filename\": \"<filename>\"\n5. write_to_file: Write to file,+ args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n6. browse_website:+ Browse Website, args: \"url\": \"<url>\", \"question\": \"<what_you_want_to_find_on_website>\"\n7.+ delete_agent: Delete GPT Agent, args: \"key\": \"<key>\"\n8. get_hyperlinks:+ Get text summary, args: \"url\": \"<url>\"\n9. get_text_summary: Get text summary,+ args: \"url\": \"<url>\", \"question\": \"<question>\"\n10. list_agents: List+ GPT Agents, args: () -> str\n11. message_agent: Message GPT Agent, args: \"key\":+ \"<key>\", \"message\": \"<message>\"\n12. start_agent: Start GPT Agent, args:+ \"name\": \"<name>\", \"task\": \"<short_task_desc>\", \"prompt\": \"<prompt>\"\n13.+ task_complete: Task Complete (Shutdown), args: \"reason\": \"<reason>\"\n\nResources:\n1.+ Internet access for searches and information gathering.\n2. Long Term memory+ management.\n3. GPT-3.5 powered Agents for delegation of simple tasks.\n4. File+ output.\n\nPerformance Evaluation:\n1. Continuously review and analyze your+ actions to ensure you are performing to the best of your abilities.\n2. Constructively+ self-criticize your big-picture behavior constantly.\n3. Reflect on past decisions+ and strategies to refine your approach.\n4. Every command has a cost, so be+ smart and efficient. Aim to complete tasks in the least number of steps.\n5.+ Write all code to a file.\n\nYou should only respond in JSON format as described+ below \nResponse Format: \n{\n \"thoughts\": {\n \"text\": \"thought\",\n \"reasoning\":+ \"reasoning\",\n \"plan\": \"- short bulleted\\n- list that conveys\\n-+ long-term plan\",\n \"criticism\": \"constructive self-criticism\",\n \"speak\":+ \"thoughts summary to say to user\"\n },\n \"command\": {\n \"name\":+ \"command name\",\n \"args\": {\n \"arg name\": \"value\"\n }\n }\n}+ \nEnsure the response can be parsed by Python json.loads"}, {"role": "system",+ "content": "The current time and date is Tue Jan 1 00:00:00 2000"}, {"role":+ "system", "content": "This reminds you of these events from your past: \nAs+ a system, I recall that nothing new has happened since my creation."}, {"role":+ "user", "content": "Determine which next command to use, and respond using the+ format specified above:"}, {"role": "assistant", "content": "{\n \"thoughts\":+ {\n \"text\": \"I need to use the browse_website command to visit http://books.toscrape.com/catalogue/meditations_33/index.html+ and find the price of the book.\",\n \"reasoning\": \"I can use the browse_website+ command to visit the website and search for the price of the book.\",\n \"plan\":+ \"- Use the browse_website command to visit the website\\n- Search for the price+ of the book\\n- Save the price to a file named browse_website.txt\\n- Use the+ task_complete command to complete the task\",\n \"criticism\": \"I need+ to ensure that I am searching for the correct information on the website and+ that I am saving the information to the correct file.\",\n \"speak\":+ \"I will use the browse_website command to visit the website and search for+ the price of the book.\"\n },\n \"command\": {\n \"name\": \"browse_website\",\n \"args\":+ {\n \"url\": \"http://books.toscrape.com/catalogue/meditations_33/index.html\",\n \"question\":+ \"What is the price of the book?\"\n }\n }\n}"}, {"role": "system",+ "content": "Command browse_website returned: (''Answer gathered from website:+ The price of the book \"Meditations\" is \u00a325.89. \\n \\n Links: [\\''Books+ to Scrape (http://books.toscrape.com/index.html)\\'', \\''Home (http://books.toscrape.com/index.html)\\'',+ \\''Books (http://books.toscrape.com/catalogue/category/books_1/index.html)\\'',+ \\''Philosophy (http://books.toscrape.com/catalogue/category/books/philosophy_7/index.html)\\'',+ \\'' (http://books.toscrape.com/catalogue/the-nicomachean-ethics_75/index.html)\\'']'',+ )"}, {"role": "user", "content": "Determine which next command to use, and respond+ using the format specified above:"}, {"role": "assistant", "content": "{\n \"thoughts\":+ {\n \"text\": \"I need to write the price of the book to a file named+ browse_website.txt.\",\n \"reasoning\": \"I can use the write_to_file+ command to write the price of the book to a file named browse_website.txt.\",\n \"plan\":+ \"- Use the write_to_file command to write the price of the book to a file named+ browse_website.txt\\n- Use the task_complete command to complete the task\",\n \"criticism\":+ \"I need to ensure that I am writing the correct information to the correct+ file.\",\n \"speak\": \"I will use the write_to_file command to write+ the price of the book to a file named browse_website.txt.\"\n },\n \"command\":+ {\n \"name\": \"write_to_file\",\n \"args\": {\n \"filename\":+ \"browse_website.txt\",\n \"text\": \"The price of the book \\\"Meditations\\\"+ is \u00a325.89.\"\n }\n }\n}"}, {"role": "system", "content": "Command+ write_to_file returned: File written to successfully."}, {"role": "user", "content":+ "Determine which next command to use, and respond using the format specified+ above:"}], "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '6974'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA6xSTY/TMBC98yusObtVq1Ja5QYIRJcLh0VaiaDKcaaJqT+CZ7LtUuW/o7RJ0w1c+ WHH0m5k3743fCUwOCehSsXaVnazePT0ctbt7X+svxacPP399frjfuPu3H211p0FCyH6g5m5iqoOr+ LLIJHiToiIoxh2T+Zr2Yrder2VKCCzlaSKCoeLKYLidcxyxMZovZHCTUpAqE5ARVDK7iLYc9eoJk+ vlyuJAzkQ2H1WgIHVvYGWswbCboMRiNB8u0EDqknjsEiJKCIDLHy3MoMntG3Fk6pF0KIFLgMdVEy+ pZCIDuwKeOQWTGEjPGIuOIiaUHCJghXtt51GFDo4p/y54Yr1XdMU5C1rREXBG1/01KV6xOtYfp0T+ YSceDRk2vjiDB8zIMIp20SEOeBWNxra7fWQh7FsZSuyMReGVw1xkMRwItx3BlI8sBQWxEVr5/+Co+ sspfzEzE139mG5Hp1pk25MaXR091bMcUDzcyNBBmuAsRRU39Yf6qYSyeKlT7ftfBWPuyg1woG9mH+ qmv/I1Pth1y2PaMfiVKxGMfxNjzPkkO11ki0q619ugSmC9E4L4z+xXm5Ojy77MymvoFGws54Q+X2+ Ig0SIA4VSDA+xyMks+Z78+o3AAAA//8DAOBHTyVoBAAA+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15d07678622e2d-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:38:36 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '10949'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86479'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.346s+ x-request-id:+ - 176c6e9d4a6ec0fa8a0c8053a4f50218+ status:+ code: 200+ message: OKversion: 1diff --git a/tests/integration/goal_oriented/cassettes/test_write_file/test_write_file.yaml b/tests/integration/goal_oriented/cassettes/test_write_file/test_write_file.yamlindex 1c6e24d853..42160ea2b3 100644--- a/tests/integration/goal_oriented/cassettes/test_write_file/test_write_file.yaml+++ b/tests/integration/goal_oriented/cassettes/test_write_file/test_write_file.yaml@@ -324,4 +324,253 @@ interactions:status:code: 200message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are write_to_file-GPT, an AI designed to use the write_to_file command to write+ ''Hello World'' into a file named \"hello_world.txt\" and then use the task_complete+ command to complete the task.\nYour decisions must always be made independently+ without seeking user assistance. Play to your strengths as an LLM and pursue+ simple strategies with no legal complications.\n\nGOALS:\n\n1. Use the write_to_file+ command to write ''Hello World'' into a file named \"hello_world.txt\".\n2.+ Use the task_complete command to complete the task.\n3. Do not use any other+ commands.\n\n\nConstraints:\n1. ~4000 word limit for short term memory. Your+ short term memory is short, so immediately save important information to files.\n2.+ If you are unsure how you previously did something or want to recall past events,+ thinking about similar events will help you remember.\n3. No user assistance\n4.+ Exclusively use the commands listed in double quotes e.g. \"command name\"\n\nCommands:\n1.+ append_to_file: Append to file, args: \"filename\": \"<filename>\", \"text\":+ \"<text>\"\n2. delete_file: Delete file, args: \"filename\": \"<filename>\"\n3.+ list_files: List Files in Directory, args: \"directory\": \"<directory>\"\n4.+ read_file: Read file, args: \"filename\": \"<filename>\"\n5. write_to_file:+ Write to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n6.+ delete_agent: Delete GPT Agent, args: \"key\": \"<key>\"\n7. get_hyperlinks:+ Get text summary, args: \"url\": \"<url>\"\n8. get_text_summary: Get text summary,+ args: \"url\": \"<url>\", \"question\": \"<question>\"\n9. list_agents: List+ GPT Agents, args: () -> str\n10. message_agent: Message GPT Agent, args: \"key\":+ \"<key>\", \"message\": \"<message>\"\n11. start_agent: Start GPT Agent, args:+ \"name\": \"<name>\", \"task\": \"<short_task_desc>\", \"prompt\": \"<prompt>\"\n12.+ task_complete: Task Complete (Shutdown), args: \"reason\": \"<reason>\"\n\nResources:\n1.+ Internet access for searches and information gathering.\n2. Long Term memory+ management.\n3. GPT-3.5 powered Agents for delegation of simple tasks.\n4. File+ output.\n\nPerformance Evaluation:\n1. Continuously review and analyze your+ actions to ensure you are performing to the best of your abilities.\n2. Constructively+ self-criticize your big-picture behavior constantly.\n3. Reflect on past decisions+ and strategies to refine your approach.\n4. Every command has a cost, so be+ smart and efficient. Aim to complete tasks in the least number of steps.\n5.+ Write all code to a file.\n\nYou should only respond in JSON format as described+ below \nResponse Format: \n{\n \"thoughts\": {\n \"text\": \"thought\",\n \"reasoning\":+ \"reasoning\",\n \"plan\": \"- short bulleted\\n- list that conveys\\n-+ long-term plan\",\n \"criticism\": \"constructive self-criticism\",\n \"speak\":+ \"thoughts summary to say to user\"\n },\n \"command\": {\n \"name\":+ \"command name\",\n \"args\": {\n \"arg name\": \"value\"\n }\n }\n}+ \nEnsure the response can be parsed by Python json.loads"}, {"role": "system",+ "content": "The current time and date is Tue Jan 1 00:00:00 2000"}, {"role":+ "user", "content": "Determine which next command to use, and respond using the+ format specified above:"}], "temperature": 0, "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '3406'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA7yTT4/TQAzF73wKy5de0iqh0O3mthwQPYAEdMUuBFWzE7cZOhmHGUctVPnuKEn/+ 7AZxQnD1c9772eMc0OSYoi6U6LKy46tXP+5vbpZhoT+/u329nCc/39692H58PzUf7q8xQn74RlqO+ X0w0l5UlMewwQu1JCeWYJrP5NJ7Pr5J5hCXnZDHFTSXj6eTlWGr/wON4GicYYR3UhjA9YOW5rGQl+ vCUXML2aJRFevM/153EcobAoey5dz5ImQl2w0RQw/XLAksLJ1rMlTFGFYIIoJy0kOyHXDnDIHABA+ hlJwvSkkZJjCsXgUaC9tMcMFOKIchKEOBFIQ7LwRWgmv1sYSaC5L5bqGToDRG7KW4RN7m4/AOGFQ+ 0LU6VVIOo6LVV7tWn8heRpMMo8fZnlRgZ9ymB1gWBKLCFjx9r42nACX9RVoEHe0f5zChE1VVea68+ UXKR1uxBirZBhe2QurLK9cBjuP1Pm9LeiNEmlMOnIhdq3zIogcX54TR7T1q6iDah3wTt5YIk3HW2+ HcOwUJHanoJ2xtp/eRB9cBOdDvVo+tudtg490xOIAbrym+GJ98JpE73FgOOJyfC3eDTTibYjPoJn+ rsEmwrVxJhSr/qIxxSBcYYTG5bTHNG6+Ns9+AQAA//8DAAaMC/aGBAAA+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15d0c86db14665-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:38:50 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '11864'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86496'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.335s+ x-request-id:+ - 5d9f1c3b077997ea564ea7088eca733f+ status:+ code: 200+ message: OK+- request:+ body: '{"model": "gpt-3.5-turbo", "messages": [{"role": "system", "content": "You+ are write_to_file-GPT, an AI designed to use the write_to_file command to write+ ''Hello World'' into a file named \"hello_world.txt\" and then use the task_complete+ command to complete the task.\nYour decisions must always be made independently+ without seeking user assistance. Play to your strengths as an LLM and pursue+ simple strategies with no legal complications.\n\nGOALS:\n\n1. Use the write_to_file+ command to write ''Hello World'' into a file named \"hello_world.txt\".\n2.+ Use the task_complete command to complete the task.\n3. Do not use any other+ commands.\n\n\nConstraints:\n1. ~4000 word limit for short term memory. Your+ short term memory is short, so immediately save important information to files.\n2.+ If you are unsure how you previously did something or want to recall past events,+ thinking about similar events will help you remember.\n3. No user assistance\n4.+ Exclusively use the commands listed in double quotes e.g. \"command name\"\n\nCommands:\n1.+ append_to_file: Append to file, args: \"filename\": \"<filename>\", \"text\":+ \"<text>\"\n2. delete_file: Delete file, args: \"filename\": \"<filename>\"\n3.+ list_files: List Files in Directory, args: \"directory\": \"<directory>\"\n4.+ read_file: Read file, args: \"filename\": \"<filename>\"\n5. write_to_file:+ Write to file, args: \"filename\": \"<filename>\", \"text\": \"<text>\"\n6.+ delete_agent: Delete GPT Agent, args: \"key\": \"<key>\"\n7. get_hyperlinks:+ Get text summary, args: \"url\": \"<url>\"\n8. get_text_summary: Get text summary,+ args: \"url\": \"<url>\", \"question\": \"<question>\"\n9. list_agents: List+ GPT Agents, args: () -> str\n10. message_agent: Message GPT Agent, args: \"key\":+ \"<key>\", \"message\": \"<message>\"\n11. start_agent: Start GPT Agent, args:+ \"name\": \"<name>\", \"task\": \"<short_task_desc>\", \"prompt\": \"<prompt>\"\n12.+ task_complete: Task Complete (Shutdown), args: \"reason\": \"<reason>\"\n\nResources:\n1.+ Internet access for searches and information gathering.\n2. Long Term memory+ management.\n3. GPT-3.5 powered Agents for delegation of simple tasks.\n4. File+ output.\n\nPerformance Evaluation:\n1. Continuously review and analyze your+ actions to ensure you are performing to the best of your abilities.\n2. Constructively+ self-criticize your big-picture behavior constantly.\n3. Reflect on past decisions+ and strategies to refine your approach.\n4. Every command has a cost, so be+ smart and efficient. Aim to complete tasks in the least number of steps.\n5.+ Write all code to a file.\n\nYou should only respond in JSON format as described+ below \nResponse Format: \n{\n \"thoughts\": {\n \"text\": \"thought\",\n \"reasoning\":+ \"reasoning\",\n \"plan\": \"- short bulleted\\n- list that conveys\\n-+ long-term plan\",\n \"criticism\": \"constructive self-criticism\",\n \"speak\":+ \"thoughts summary to say to user\"\n },\n \"command\": {\n \"name\":+ \"command name\",\n \"args\": {\n \"arg name\": \"value\"\n }\n }\n}+ \nEnsure the response can be parsed by Python json.loads"}, {"role": "system",+ "content": "The current time and date is Tue Jan 1 00:00:00 2000"}, {"role":+ "system", "content": "This reminds you of these events from your past: \nI was+ created and nothing new has happened."}, {"role": "user", "content": "Determine+ which next command to use, and respond using the format specified above:"},+ {"role": "assistant", "content": "{\n \"thoughts\": {\n \"text\":+ \"I need to use the write_to_file command to write ''Hello World'' into a file+ named ''hello_world.txt''.\",\n \"reasoning\": \"The task requires me+ to write ''Hello World'' into a file named ''hello_world.txt'', and the write_to_file+ command is the appropriate command for this task.\",\n \"plan\": \"-+ Use the write_to_file command to write ''Hello World'' into a file named ''hello_world.txt''.\",\n \"criticism\":+ \"I need to ensure that I use the correct filename and text to write to the+ file.\",\n \"speak\": \"I will use the write_to_file command to write+ ''Hello World'' into a file named ''hello_world.txt''.\"\n },\n \"command\":+ {\n \"name\": \"write_to_file\",\n \"args\": {\n \"filename\":+ \"hello_world.txt\",\n \"text\": \"Hello World\"\n }\n }\n}"},+ {"role": "system", "content": "Command write_to_file returned: File written+ to successfully."}, {"role": "user", "content": "Determine which next command+ to use, and respond using the format specified above:"}], "temperature": 0,+ "max_tokens": 0}'+ headers:+ Accept:+ - '*/*'+ Accept-Encoding:+ - gzip, deflate+ Connection:+ - keep-alive+ Content-Length:+ - '4653'+ Content-Type:+ - application/json+ method: POST+ uri: https://api.openai.com/v1/chat/completions+ response:+ body:+ string: !!binary |+ H4sIAAAAAAAAA7RTyW7bMBC99ysGc/GFNmQbbVwdiwapgQLd0hZBVBgMNZZYU6RKjrzA0L8XtKQk+ TReg242YefMWcnhEnWOKqpSsqtqMz54drl5V+Z6W/OaDfHlhzpMNmefnh4vX5i0KdDefSXE/MVGu+ qg2xdhYFKk+SKcd0+mQxTxaLs/lMYOVyMphiUfN4Pnk85sbfuHEyT6YosAmyIEyPWHtX1bxityEb+ MJ0ms4XAO/LbxiyZCmTH0txhZ7OnrUBVOq0oYHp9xIrCQOydIUxRhqADS8vRprNMNkY4ZhYAIEMu+ XVOUHDJMoS/2DdpzLGa4hFJuCUKjFIWwbow5wM5rZrIwekHGOPjovMlHoC07kLDWhsDKinIYlbG/+ 2sX+hPc8msBlSWBpzxCYatAB2EETCLgkYBk2qz48gXJVJW0eAbe1ATXJUNy360kGZ7UtOs+XPQw8+ fWm0pwAVRZ7om37fNZxslGR/YATeaasIfnVL7E7wqCBOp3+fvzbSdtHH8P6v2ZTXrJUO1bABlug0+ STY0Ps5JhiXU3m11TiBhK43OoXsEWDs/SGhb/FQk1CQ3g8BOG/Nn19BRtmLY6B7+3ULHp+3UvqF/+ YEr64uFfuL9g/+NHDBFOMfo0mW2xFbjWVody1WljioFdjQK1zWmPadJ+ah99BQAA//8DAMo52K3G+ BAAA+ headers:+ CF-Cache-Status:+ - DYNAMIC+ CF-RAY:+ - 7c15d120ec8f4665-DFW+ Cache-Control:+ - no-cache, must-revalidate+ Connection:+ - keep-alive+ Content-Encoding:+ - gzip+ Content-Type:+ - application/json+ Date:+ - Wed, 03 May 2023 04:39:04 GMT+ Server:+ - cloudflare+ access-control-allow-origin:+ - '*'+ alt-svc:+ - h3=":443"; ma=86400, h3-29=":443"; ma=86400+ openai-model:+ - gpt-3.5-turbo-0301+ openai-organization:+ - significant-gravitas+ openai-processing-ms:+ - '12271'+ openai-version:+ - '2020-10-01'+ strict-transport-security:+ - max-age=15724800; includeSubDomains+ x-ratelimit-limit-requests:+ - '3500'+ x-ratelimit-limit-tokens:+ - '90000'+ x-ratelimit-remaining-requests:+ - '3499'+ x-ratelimit-remaining-tokens:+ - '86481'+ x-ratelimit-reset-requests:+ - 17ms+ x-ratelimit-reset-tokens:+ - 2.346s+ x-request-id:+ - a8c02e37e5af0c851759aa261f20f701+ status:+ code: 200+ message: OKversion: 1diff --git a/tests/integration/goal_oriented/test_browse_website.py b/tests/integration/goal_oriented/test_browse_website.pyindex 9591f2f99d..ca433d80f9 100644--- a/tests/integration/goal_oriented/test_browse_website.py+++ b/tests/integration/goal_oriented/test_browse_website.py@@ -11,7 +11,7 @@ from tests.utils import requires_api_keydef test_browse_website(browser_agent: Agent) -> None:file_path = browser_agent.workspace.get_path("browse_website.txt")try:- run_interaction_loop(browser_agent, 40)+ run_interaction_loop(browser_agent, 120)# catch system exit exceptionsexcept SystemExit: # the agent returns an exception when it shuts downcontent = read_file(file_path)