#GPT-4 Auto Coder Self Improver

71 messages · Page 1 of 1 (latest)

glacial monolith
#

This will basically code anything for you and automatically improve it too from an idea or from code.
try it out here: https://gpt4autocoder.streamlit.app/

Here is a tutorial on how I built it: https://www.youtube.com/watch?v=rBQrdEoSbhk

Video features an advanced version which can start multiple improvement processes at the same time in parallel.

You can add your suggestions as comments or docstring to your code to be improved.

Modes of play:
-User picks an idea and number of iterations. GPT will auto generate code and try to improve upon it.

  • Leave the idea box empty and GPT will generate the idea first write the code for it then improve it for iteration amount.
  • paste or type your code in and let GPT add features, error catching. It also will try to debug it too for as many times as you specified automatically.
charred badge
#

Fantastic!

glacial monolith
cinder surge
#

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/app/gpt4_autocoder/GPT4_ST_APP.py", line 82, in <module>
response = auto_coder.ask_gpt3(gpt3_question)
File "/app/gpt4_autocoder/main_self_improve_Class.py", line 12, in ask_gpt3
response = openai.ChatCompletion.create(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 619, in _interpret_response
self._interpret_response_line(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(

#

@glacial monolith I got this error

glacial monolith
cinder surge
#

the self improving I mean

glacial monolith
cinder surge
#

and how do I know which code to copy from the output?

#

ah ok

glacial monolith
cinder surge
#

ah dang

#

ok, I got that error again

glacial monolith
cinder surge
#

openai.error.authentication

glacial monolith
cinder surge
#

I will just make a new key

glacial monolith
#

Key is stored by streamlit sessions. And it is transiently stored. I just keep mine in a notepad so I can keep copy pasting it.

cinder surge
#

ok

#

can it use libraries?

#

like PyQt5?

#

good grief, this is the best calculator I have seen yet

#

(text based)

glacial monolith
cinder surge
#

dang, it keeps giving that error

#

is there any way you can fix it?

#

I just reloaded the page and entered the api key again

#

it's really annoying

glacial monolith
#

Occasionally it will raise an error due to being unable to parse but that happens one in 30-40 attempts.

cinder surge
glacial monolith
cinder surge
#

k

#

It probably can't be fixed if it's an API issue

#

when it does work, it's insanely good tho

glacial monolith
#

Yeah I got that error already multiple times too. Maybe the API is overloaded now

cinder surge
#

is there any way to replicate this on the chatgpt website? the improvement process I mean

glacial monolith
#

You could do it manually at ChatGPT app. Take a look at the video. it will give you ideas. You would have to manually copy paste eveytime tho

cinder surge
#

can you just tell me?

#

I don't have a ton of time rn

glacial monolith
cinder surge
#

fine

cinder surge
glacial monolith
cinder surge
#

:/

#

I kinda don't have the time, I honestly don't see why you can't just give me an idea of how it works

#

without having to watch a 20 min video

glacial monolith
#

you feedback the code with a prompt to guide it

cinder surge
#

lol, seems like the actual explanation part starts at 11 minutes

#

listen, ik you want all that watch time and stuff, but this is just a bit much

cinder surge
#

yeah, I only had to watch like 5 mins to get it working on my own

#

(I spent more time fixing up my prompt since I modified it a bit, but the actual video watching was like 5 mins)

glacial monolith
grand forum
#

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/app/gpt4_autocoder/GPT4_ST_APP.py", line 73, in <module>
response = GPT4AutoCoder(api_key, gpt_engine_choice).ask_gpt3(gpt3_question)
File "/app/gpt4_autocoder/main_self_improve_Class.py", line 12, in ask_gpt3
response = openai.ChatCompletion.create(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 619, in _interpret_response
self._interpret_response_line(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(

glacial monolith
glacial monolith
# grand forum error is still the same

It is working fine on my end for others too from what I can see in the logs. Only thing I suggest is to check if your API key is still good and you are pasting the right key into the input box

mighty torrent
#

How do I know if the code works? I guess I need to put it in python for it to work right?

mighty torrent
#

I need some help

#

I made 8 iterations. Am I supposed to u se all that code or the single prompt?

glacial monolith
glacial monolith
mighty torrent
final minnow
#

Does the web based UI allow me to save the generated code?

#

Maybe allow zip download?

glacial monolith
mighty torrent
#

Its an amazing tool!

final minnow
#

Is it open source? Also the language generated can’t be changed from python I am assuming right?

slate bison
glacial monolith