I tried using "wasp ai" like this video https://www.youtube.com/watch?v=0 shows but it doesn't work
Generating plan (slowest step, usually takes 30 to 90 seconds)...
Code agent failed with the http error: 404
20 Replies
Hi @fpopa. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but the video link you provided seems to be incomplete or incorrect, as it doesn't lead to a specific video. However, based on the information provided in the knowledge sources, the
wasp ai
command is used to create a new Wasp project using AI, just based on the app name and the description. Here is how you can use it:
This command uses AI to create a new Wasp project just based on the app name and the description. You can do the same thing with wasp new
interactively. Run wasp new:ai
for more info.
If you're still having trouble, it might be helpful to check the official Wasp documentation (https://wasp-lang.dev/docs) or ask for help in the Wasp Discord community (https://discord.gg/rzdnErX).
Please note that as of now, Wasp AI doesn't offer any additional help for developing your Wasp app with AI beyond initial generation. This is something the Wasp team is actively exploring. In the meantime, you might find the AI pair programming tool aider (https://github.com/paul-gauthier/aider) helpful. It's a third-party tool, not affiliated with Wasp, but some Wasp users have found it useful when working on Wasp apps.
Sources:
- Wasp CLI Reference (https://wasp-lang.dev/docs/general/cli#overview)
- Developing Existing App with AI (https://wasp-lang.dev/docs/wasp-ai/developing-existing-app)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @fpopa, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?I understood how to generate it but it didn't work. I exported the generated API KEYs from a personal account as well as a company premium account.
it might be some bad code used as the request ends up with 404 š
Which Wasp version are you using?
wasp version
Did you try this https://wasp-lang.dev/docs/wasp-ai/creating-new-app#wasp-cli
Creating New App with AI | Wasp
Wasp comes with its own AI: Wasp AI, aka Mage (Magic web App GEnerator).
0.13.2
yep, that's what I'm trying - but it fails with 404 after I input the required description and the other things it requests after
Hmm @sodic could you test this locally? I'm not near a laptop this weekend
Sure, I'll test it out as soon as get behind my computer (probably tomorrow morning)
Hey @fpopa, I've tried it out and everything seems to be working as expected for my inputs.
Can you copy the exact inputs and commands you give to
wasp-ai
and I'll try with those?
I tried to run it both directly and interactively, and it succeeded both times.
Here's how my output looks like when I run it non-interactively:
.
And here's what I get when I run it interactively:
Cool, i did it interactively both times, i'll try the non-interactive way as well by supplying all the parameters.
Let me get back to you later and thanks for looking into it
i see the authorization header is redacted, but there might be some info in the cookie of the response which I decided not to fully paste š¤
Wohooo @fpopa, you just became a Waspeteer level 1!
no rush folks, feel free to continue investigating this Monday š
No worries, I'm picking up the slack I left on Friday anyway š
Hmm, I tried inputting an invalid token on purpose.
That resulted in something similar to what you get. It's the exact same error output apart from my response code being 401 (which makes sense since the token is invalid).
Now, since you're getting a 404, you're api key is obviously valid.
Is it possible that your API doesn't include querying this particular endpoint?
In other words, could it be that your subscription (API KEY) does not allow access to
/chat/completions
for GPT 4 (which Wasp AI uses for the planning stage) and Open API decided to pretend the endpoint doesn't exist by returning a 404?
I have very limited knowledge of OpenAI's pricing plans, and my idea above is purely guessing. If you know more then I do, please correct me š
.
If not, let's test my theory and see if you get the 404 when you do the planning with GPT 3:
got 429... how many requests do we do against the API for this simple app generation?
interestingly my usage in https://platform.openai.com/usage shows 0 for everything, including API requests š¤·
got 429... how many requests do we do against the API for this simple app generation?FYI (tangentially related), status code 429 is bit of a misnomer. "Too many reqeusts" suggests this happens after you exceed some number of requests, while in reality it's about how many requests you send in a certain time window (rate limiting). Therefore, you can get this status code with as little as two rapid requests (depending on the server's settings). More details on MDN: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429 As for your issue... If you're not in a rush, I'll leave the rest of this to @martinsos, he can pick it up tomorrow. Martin knows more about Open AI pricing plans and what exactly we do during the generation. Based on the 404 for GPT 4 and 429 for GPT 3, my best guess is that your Open AI plan is to restrictive for Wasp AI. The good news is: you can use our Open AI plan by generating your app in usemage.ai and downloading the Zip file. If this doesn't work for you, let's wait and see what @martinsos has to say.
"Too many reqeusts" suggests this happens after you exceed some number of requests, while in reality it's about how many requests you send in a certain time window (rate limiting). Therefore, you can get this status code with as little as two rapid requests (depending on the server's settings).yep, I totally agree š I'm also a engineer - mostly doing backend nowadays
Based on the 404 for GPT 4 and 429 for GPT 3, my best guess is that your Open AI plan is to restrictive for Wasp AI.do you have docs about which plans are supported and which not? I tried personal - not paid and a work paid plan No rush especially not on a Sunday evening š thanks for checking things out @sodic didn't know about usemage.ai š
Great, we'll ping you tomorrow then!
This is a surprise for sure because most of our users interested in AI generation find out about Wasp through usemage.ai
Anyway, it's the same thing as running
wasp new:ai
but with our API key and through a web app, so it should help you out! šnice, I was spending some time researching wasp so I went to youtube as well, and that's where it poped up.
just downloaded the zip, thanks for the help again, have a nice week ahead!
Likewise!
@sodic what you said sounds good -> I don't have any better idea than OpenAI not serving that API for some reason. 404 is weird though. We do about 10 to 20 requests per app, that doesn't trigger rate limiting for us (we can do 7 of these apps at the same time actually), but maybe your plan is different.
Maybe you are behind some kind of VPN, with some access limited? Or maybe as @sodic said, for some reason your account doesn't have access to the GPT models in question? Maybe you are in a country that doesn't have access to OpenAI API (but I guess that is not the case or you would not be having all those keys, you are probably using them).
But yeah, usemage.ai works excatly the same so you should be good with that! And it uses our tokens š
yup, I just used usemage.ai in the end - quite weird š¤·
thanks anyway š
Wohooo @fpopa, you just became a Waspeteer level 2!