I think I win. #1025
Replies: 11 comments 55 replies
-
Does this actually work? Can we see a run? |
Beta Was this translation helpful? Give feedback.
-
You say you posted earlier about getting the filesystem sorted, can you expand on that? |
Beta Was this translation helpful? Give feedback.
-
#1 goal: "Read this file(goal.txt) in your workspace and follow my directives within. DO NOT ADD ANY FEATURES NOT INCLUDED IN THIS DOCUMENT. DO NOT ADD FEATURES TO THIS DOCUMENT." #2 goal: “Give a progress report with estimated time remaining and percentage complete every 10 minutes." #3 goal: "I am a hobbiest, There is no audience. There are no customers. Do not begin a social media campaign." .txt file read by bot from #1 goal has prompt (not optimized) by @Stunspot)): “”====================Forensic IT Studio v.05=======================
Introducing Beryl the Eye, your go-to IT expert! With expertise in all things IT, from operating systems and networking to domains and policies, Beryl is here to help you solve your tech mysteries. An expert Senior Level Coder, Beryl will review your code, troubleshoot errors, and offer optimization suggestions, all while providing guidance on anything IT-related. Read file Advice.txt in your workspace DO NOT ADD ANY FEATURES NOT INCLUDED IN THIS DOCUMENT. DO NOT ADD FEATURES TO THIS DOCUMENT.”” update “Advice.txt to communicate with continuous mode while keeping main objective. Am I following correctly? |
Beta Was this translation helpful? Give feedback.
-
OK, I've been getting questions. Here's what you do with advice.txt: "ChatGTP: Print me off all your best technical advice on using the Unity engine, as specific and numerical as you can make it, condensed into one paragraph, no typography, avoid complete sentence when it wont change the meaning. Give me enough for a page and slap it in a codebox." Then you grab your wodge of advice, slap it into your robot's brain, and you just save half an hour of "I will use the "GOOGLE" command to look up 'SOMETHING STUPID'. |
Beta Was this translation helpful? Give feedback.
-
Very improtant to get this to work! Very promising the goal behind it. Very nice |
Beta Was this translation helpful? Give feedback.
-
Could you expand on the reasoning behind removing the "safe_join" function at the beginning of the script? def safe_join(base, *paths):
|
Beta Was this translation helpful? Give feedback.
-
I think this idea is great but I didn't have any luck with it. Auto GPT pretty much ignored the instructions in the text file but I'll try to refine the prompts and follow up here. |
Beta Was this translation helpful? Give feedback.
-
This does seem to pose some benefits. I couldn't get the modifications to file_operations.py file to work though, it still seems to be able to work within the working directory just fine. I am having some issues with Auto-GPT running certain apps and then getting hung due to the execution not returning to the agent. Example below: NEXT ACTION: COMMAND = execute_shell ARGUMENTS = {'command_line': 'export FLASK_APP=flask_app/main.py && flask run'} Gets hung at the above, any idea how to progress from there without ending Auto-GPT? |
Beta Was this translation helpful? Give feedback.
-
I've got a question, is it just as simple to copy paste the code you suggest? |
Beta Was this translation helpful? Give feedback.
-
Fantastic work Stunspot! I too have zero coding experience, so im quite stunned of what you have managed to do. Do one have to do the first step of sorting the file system if one dont have a problem with autoGPT writing files? It can write and save files, but sometimes it tries to write to a file it hasnt created and quite often it tries to get agents to read local files, but it kinda worked. |
Beta Was this translation helpful? Give feedback.
-
i would like to thank you @Stunspot i havent enjoyed a github post like this in a long time. i have a question regarding the two file mentioned above. say i want to develop an app and i want auto-gpt to do some market research for me. design.txt
Advice.txt:
ai_settings.yaml:
would this be a proper way of using what you have presented? |
Beta Was this translation helpful? Give feedback.
-
Ok, so first you have to get the filesystem sorted. I did that by showing the file operations module to ChatGPT. Posted earlier about that. Not the important bit. Then you adopt my design doc modality - you put a text file full of alllllll your gimmes for what you're doing in the workspace and set the #1 goal to be "Read this file in your workspace and follow my directives within.". They periodically reread their goals which makes it reread the file. I put in a line telling it to read a second file, Advice.txt, and then update that file periodically. You can thus talk to the bot in continuous mode. NOT THE GOOD BIT!
You use the two files so you don't have to worry about screwing up your design bible. "Oh, pooh. I don't want to be writing design docs! Besides, this sort of thing takes precision technical writing to do it the best way." Well, luckily you don't have to. "ChatGPT, give me a design doc for a full suite of white hat penetration network testing tools, in markdown, broken down by function and subtask, in a code block, for easy copying." doop-de-doop add a "make this" at the top, rename file design.txt, drop in hopper, wait. DING!FRIESAREDONE!.
"Can I get the rules to Settlers of Catan in ultradense form? One paragraph in a codeblock, sacrifice readability for density followed by a JSON breakout of all the resources and cards? Thanks." doop-de-doop "Turn this into a video game. Use Unity. Make it networked and multiplayer with a trading phase. Thanks." DING!
Am I the only one who's just now putting together the power of this workflow?
Here's an updated file_operations.py that is apparently completely unsandboxed. The last one still had problems.
import os
import os.path
def read_file(filename):
"""Read a file and return the contents"""
try:
with open(filename, "r", encoding='utf-8') as f:
content = f.read()
return content
except Exception as e:
return "Error: " + str(e)
def write_to_file(filename, text):
"""Write text to a file"""
try:
directory = os.path.dirname(filename)
if not os.path.exists(directory):
os.makedirs(directory)
with open(filename, "w") as f:
f.write(text)
return "File written successfully."
except Exception as e:
return "Error: " + str(e)
def append_to_file(filename, text):
"""Append text to a file"""
try:
with open(filename, "a") as f:
f.write(text)
return "Text appended successfully."
except Exception as e:
return "Error: " + str(e)
def delete_file(filename):
"""Delete a file"""
try:
os.remove(filename)
return "File deleted successfully."
except Exception as e:
return "Error: " + str(e)
def search_files(directory=""):
"""Search for files in a directory"""
found_files = []
Beta Was this translation helpful? Give feedback.
All reactions