W
Wasp-langβ€’12mo ago
demoniccil

can we self-host Wasp AI app generator?

Hi, I’m looking at self-hosting the AI app generator and extending its capabilities. Is it something doable?
18 Replies
miho
mihoβ€’12mo ago
Yes, it's open source 😊 it might be a challenge if you are not familiar with programming in Haskell
miho
mihoβ€’12mo ago
GitHub
wasp/wasp-ai at wasp-ai Β· wasp-lang/wasp
The fastest way to develop full-stack web apps with React & Node.js. - wasp-lang/wasp
miho
mihoβ€’12mo ago
And on the same branch, that's the version of the compiler with the prompts
demoniccil
demoniccilβ€’12mo ago
Oh yeah, I am totally not familiar with Haskell at all. I guess I gotta ask GPT for help πŸ˜„ What do I need to host this?
miho
mihoβ€’12mo ago
GitHub
wasp/waspc at main Β· wasp-lang/wasp
The fastest way to develop full-stack web apps with React & Node.js. - wasp-lang/wasp
miho
mihoβ€’12mo ago
The web app is a Wasp app 😊
demoniccil
demoniccilβ€’12mo ago
Oh got it! Thanks a lot. I will read through the readme to understand how to install etc too. Question! (going to be an idiotic one) how does the web app "talk" to the GPT Code Generator? And I am assuming GPT Code Generator is a customized Haskell app, not the same as the original Wasp framework? Third idiotic question πŸ˜… : is the GPT Code Generator standalone or is it something that's going to be a part of Wasp when/if I install the compiler?
MEE6
MEE6β€’12mo ago
Wohooo @demoniccil, you just became a Waspeteer level 1!
demoniccil
demoniccilβ€’12mo ago
AHH got the answer for my third (really idiotic) question! So it's another version of Wasp compiler, with prompts, and other things needed for the AI. Okie soooo... I THINK I got the answer to my first (rather idiotic sounding) question too. The web app for generating apps is itself a Wasp app, so I run it in the same way that I'd run any other Wasp app, without having to specifically specify it to talk to the GPT Code Generator
miho
mihoβ€’12mo ago
1. Wasp AI branch of the compiler - we plan on merging it into the main version, but we didn't manage it yet 2. The web app spawns a process with the Wasp binary and reads the text output 3. The web app is nothing specific in terms being a server + client. You could use some other stack like Express.js and communicate with the Wasp binary
demoniccil
demoniccilβ€’12mo ago
Thank you very much, @miho!
martinsos
martinsosβ€’12mo ago
Actually very good questions @demoniccil !!! So AI/GPT functionality is really just a part of Wasp CLI/compiler (wasp that you use in your terminal), and you can use it from your terminal. However, it isn't yet merged into main branch, it is for now in wasp-ai branch, we will merge it soon probably. Mage web app is just a UI on top of it, and is itself a Wasp app, and doesn't really have any "smarts" in it, all the AI/GPT part is happening via wasp CLI that Mage calls in the background (it assumes it is installed on the machine where its server is running). So if you want to self host and run Wasp AI (Mage), easiest way is to go directly for the wasp CLI, and we have instructions for that at the bottom of the usemage.ai, last question in FAQ. More advanced is also running Mage UI (Wasp app) on top of that, but I don't think you really need it. And yes, code is written in Haskell, but I would say it is relatively simple, so ChatGPT can probably help out with that.
demoniccil
demoniccilβ€’12mo ago
Hey yo! Thank you so much for your responses too. I am slowly working through it with the help of documentations and ChatGPT πŸ˜„ I am also looking at ways to automate deployment of the apps that it generates. Hopefully I can contribute back here soon!
martinsos
martinsosβ€’12mo ago
My apologies if the documentation is not top notch -> it is still bit of an experimental effort for us and we didn't expect many people to try self-hosting it. But, we are here to help! Automate deployment of the apps it generates -> ha yes, that can be done I am sure but there is some work to it I believe. Why do you find this interesting? The thing is, genreated apps, if they are not simple, almos talways need human intervention to shape them into sometihng that works as intended, so I am not sure how useful is auto-deployment? I guess it depends on what do you mean by automating deployment actually, which part would be uatomated -> every created app gets deployed automatically as it is created, or just setting up a nice CI for a single Wasp app?
demoniccil
demoniccilβ€’12mo ago
Ah yes, I understand where you are coming from, but having the ability to autodeploy them for demo or whatever purposes would rock. I understand that complex apps still require human intervention and further works to make them usable. The apps it generates have Docker file, yeah? I think we can really do a one-click deployment rather easily. I am looking at platforms that we might be able to use for that, or ways to. Maybe I'll go a full on Ansible route, or something else. Still looking! So hmm, I think it'd be that, every created app, if user wants to, can be auto-deployed. They won't have own custom domain etc, of course. So it'll be all like domain.com/app-name-random-unique-string. That's primarily it. I am working through this now. Will contribute back once I manage to sort it out!
MEE6
MEE6β€’12mo ago
Wohooo @demoniccil, you just became a Waspeteer level 2!
martinsos
martinsosβ€’12mo ago
I am interested what you come up with! I am not yet sure I understand 100% what do you imagine an end user experience to be like, but just so you are aware, we do have this: https://wasp-lang.dev/docs/advanced/deployment/cli -> so you can do wasp deploy fly launch and if you have Fly.io account + flyctl installed on your machine, this should deploy the whole app in one step.
demoniccil
demoniccilβ€’12mo ago
Oh yes, that's where I am settling it for now! Of course, putting a UI to execute those commands etc from a server rather than just from my machine.
Want results from more Discord servers?
Add your server