Getting 404 when trying to use ai-generative mode
I am trying to create a project with ChatGPT with my own ChatGPT4 API key but I am getting a 404 whenever I try generating an AI project with WASP. Is there anything special that needs to be done with ChatGPT to make this work?
Is there any wasp command to confirm that the API key works okay?
Generated project skeleton.
Generating plan (slowest step, usually takes 30 to 90 seconds)...
Code agent failed with the http error: 404
....
host = "api.openai.com"
port = 443
secure = True
requestHeaders = [("Content-Type","application/json; charset=utf-8"),("Authorization","<REDACTED>")]
path = "/v1/chat/completions"
queryString = ""
method = "POST"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutMicro 300000000
requestVersion = HTTP/1.1
proxySecureMode = ProxySecureWithConnect
}
2 Replies
Hi @vallamost. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. However, when creating a new Wasp app using Wasp AI, you should run
wasp new
in your terminal and pick AI generation. If you don't have them set yet, wasp
will ask you to provide (via ENV vars) your OpenAI API keys, which it will use to query GPT. After providing a title and description for your Wasp app, the new app will be generated on your disk source (https://wasp-lang.dev/docs/wasp-ai/creating-new-app#wasp-cli).
If you're looking to integrate chatGPT via OpenAI's API, you can read their docs. There are also two open-source example apps you can check out: OpenSaaS.sh and CoverLetterGPT.xyz source (https://discord.com/channels/686873244791210014/1222074172499431468).
If you're still having issues, I recommend reaching out to the Wasp community on Discord or checking their GitHub for any similar issues.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @vallamost, 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?Hm that is quite weird! Might it be that you have some kind of restrictions on making API requests toward OpenAI? I don't have a super easy way to test the connection right now, but we don't do any complicated requests in the background, it is just API call to chat/completions as it says above. Which model combo did you choose? But it whould work anyway.
If this doesn't work for you, try going with https://usemage.ai, that will use our own server to generate the app and our keys.