#GPT Project Generator

76 messages ยท Page 1 of 1 (latest)

north robin
#

I made a little script using gpt which I think some people might find useful so I'm publishing here.

Basically you talk to the script for a bit about your project, and then at the end, it generates you a directory structure with some files you might need populated with starter code. Additionally it will create a readme explaining how to use the template it created for you.

link: https://github.com/Croug/gpt-init

GitHub

A simple python script that allows you to generate a starter project by talking with chat gpt! - GitHub - Croug/gpt-init: A simple python script that allows you to generate a starter project by tal...

distant vine
#

Oh this has to be tried..... I'll give you some feedback as I have some.

#

Hmm, installed fine, but it would seem the chromium window is hitting a "Computers says, No" from Cloudflare

#

Sits like this until it times out, tried a few times now

#

Checked with regular Chrome and the site is operational

#

OK, fiddled around with it. Stopped the loading of the page and removed the url parameters in the address bar...... so it only read https://chat.openai.com. It loaded fine, logged in.... closed as instructed and launched main.py. Response came back from CGPT. Hope this helps anyone.

distant vine
#

First issue:

#

My guess would be that one of the bot prompts prior to 129 was unsuccessful, thus array was never populated. Probably worth updating main with some error trapping.

half finch
#

Have you been able get it to do anything?

distant vine
#

Mostly everything up to the "generate" point

#

Curiously, when I try again, Playwright times out... so it seems like there's also an issue with caching the login

distant vine
#

OK, so I got it working again by re-running install, logging out of cgpt and back in, then relaunching main.py. This time I went for a very basic python script project that does nothing more than generate a mandelbrot set and saves it as a png....... it was helpful in asking followups...... but when I type generate with the confidence on 100%, I get the same error as described above "index list out of range on 129"

#

Will wait and see now if the OP wants to update anything

#

The idea however is pretty fire if it does what it says on the tin ๐Ÿ™‚

distant vine
#

Had it print out the file list, seems to be empty:

#

Looking at the cgpt convo on the main site, it seems it may not be doing the indenting as requested:

#

Not sure if this is an issue for the script

distant vine
#

@north robin Have you abandoned this project sir?

north robin
#

Nope! just been away from my computer all day

#

I'll take a look at the feedback here in a bit, great to have someone else try it out!

#

can you get me the transcript from that conversation, it should show up in your chat history!

north robin
distant vine
north robin
#

strange, it worked on my machine (says every programmer ever) so I'm interested to see what's different about what's going on there

distant vine
#

Just FYI, this is from a few minutes ago:

north robin
#

I'll try it again on my machine, maybe I made a last minute change that I forgot to test or something

distant vine
#

Any idea how I can dump the whole cgpt convo? It's really rather long lol

north robin
#

I'm not sure, I thought there was an option to download a transcript on the site

distant vine
#

lemme check

north robin
#

maybe there's a website for ripping transcripts?

distant vine
#

Hmmm, maybe

#

I'll try this

north robin
#

ok so I see what's happening here, it's spitting out the directory structure in an invalid format for some reason

#

which is strange because it never seems to run into that problem with me

distant vine
#

So it's not parsing correctly?

north robin
#

yeah

#

it's supposed to indent children but it's not indenting at all it seems

distant vine
#

I've actually had it work, once

#

I wondered if it was something to do with project complexity

#

Simpler requests seemed to fair better, from my single success sample size

north robin
#

I've talked with it at length before and got pretty specific with it, and it always spat out the directory structure in the format I requested

#

that is so interesting

distant vine
north robin
#

Oh must've missed that

distant vine
#

But couldn't see at a glance if you were parsing based on that indent. Though your exclaimed prompt engineering seemed to make that pretty clear it's what you wanted from CGPT ๐Ÿ˜„

north robin
#

Yeah, and usually it's pretty strict about following those types of rules, interesting

#

thanks for the transcript, I'll try and get it to fail on my own tomorrow, and the transcript should help with that

distant vine
#

Perhaps if it's not complying, better option would be to consider anything between directories, a child of the directory above

north robin
#

as a quick fix I'll put out a fix here now that'll just retry that step if it catches a parsing error

distant vine
#

Ack I would just shelf it for today man.... it's Christmas ๐Ÿ™‚

north robin
#

Haha, I won't be able to sleep until I get this out of my head ๐Ÿ˜…

distant vine
#

lol, we're definitely spirit animals.

#

Brilliant work though mate, be cool to see it migrate from CGPT to one of the API's when this thing is no longer free.

north robin
#

alright @distant vine pull changes and give it a try, shouldn't have to reinstall anything, I haven't tested it but I'm fairly certain it should work

distant vine
#

Testing now

#

:/

north robin
#

Hmm, alright, I'll have to investigate tomorrow, if you want to dm me that transcript

distant vine
#

I figure this is what you revised, but it didn't seem to listen.

#

I'll have a play around with it, and if I get anything that sticks, I'll let ya know.

#

You can sleep now ๐Ÿ™‚

north robin
#

Sorry been MIA I'll probably try and fix it some time today

north robin
#

@distant vine alright pushed a change that should fix it, now it will attempt to regenerate when the file structure isn't inside of a code block like what happened with yours. however I'm not sure why it didn't work when the bot re-sent with the proper structure, maybe some weird python scope nonsense, we'll see

distant vine
north robin
#

absolutely, you can even submit it as a PR if you want

#

this was just me going from idea to sample as quickly as possible, you may have noticed the script is a bit of a mess haha, if I were to expand on this I'd make it a bit more modular

#

and also probably package it as a pypi cli utility

distant vine
#

Honestly, I think it's decent enough of a prototype. I'd probably only consider the refactor when CGPT web goes away and the API comes out.

north robin
#

yeah absolutely

#

anyway feel free to dm me that addon you were talking about

tardy orchid
#

I really like the idea, any updates?