3 ms·
I'm seriously trying to do this but I keep struggling with integrating AI. I find it's constantly messing up or just not understanding what I'm asking. Mind goi
by kraig911 3y ago
I'm seriously trying to do this but I keep struggling with integrating AI. I find it's constantly messing up or just not understanding what I'm asking. Mind going in depth about how you integrated GPT4? I'm using go-pilot and I recently got a GPT4 sub but I find myself writing a very long prompt over and over until I get a general idea of what I could do.
Just for example I need to check for environment in js if it's prod, it did some statement like
(environment === 'prod' || environment === 'prod-blue etc etc.
I stripped it all down to just environment.includes('prod') lol.
Another is just say if you're dealing with an api that returns a string for 'true' instead of true. It wrote a huge function about this...
- rpmisms 3y agoYou're probably trying to do too much with it at a time. I use GPT-4 to write boilerplate and functions, and then write logic myself.
- johnfn 3y agoI didn't want to say it in my initial post because I feared I would be downvoted for people thinking I was just spamming AI products. (I got downvoted anyways, so I guess it didn't matter.) I just use the Cursor IDE though, it's fabulous if you already use VSCode. And yeah I have no association with Cursor. Cursor is pretty smart about what to prompt GPT with. In the case that you described, you might prompt it with something like "check for prod" and I expect it would work. The reason it would have a better success rate is that it's usually quite good about what context to send over - it would likely pick up the type definitions (if you have those) or other files that do similar things and send those over as well. To give a full answer to your question, I actually wouldn't prompt it with "check for prod" at all because that would be underutilizing GPT. I would probably prompt at the complexity level of something like "edit this component so that if we're in prod, we show a warning message at the top". I would expect GPT to do that accurately for a component up to 100-200 lines virtually every time.