W
Wasp-langβ€’9mo ago
Jax

Getting this error when running 'wasp start db' inside of the app folder of open-saas

❌ --- [Error] Analyzing wasp project failed: ------------------------------------- 2 errors found: - Entity 'User' (referenced by app.auth.userEntity) must have field 'username' of type 'String'. - Entity 'User' (referenced by app.auth.userEntity) must have field 'password' of type 'String'.
19 Replies
Vinny (@Wasp)
Vinny (@Wasp)β€’9mo ago
hey @Jax try making the username and password fields optional by adding ? to them in your main.wasp file like this:
entity User {=psl
id Int @id @default(autoincrement())
email String? @unique
username String? @unique
password String?
//...
entity User {=psl
id Int @id @default(autoincrement())
email String? @unique
username String? @unique
password String?
//...
let me know if that works
Jax
Jaxβ€’9mo ago
this is how it currently is before me changing anything does it already have the ? you are talking about? @Vinny (@Wasp)
No description
Vinny (@Wasp)
Vinny (@Wasp)β€’9mo ago
what auth method are you using in your main.wasp file? if you're only using usernameAndPassword, then try removing the ? from the username and password fields let me know if that works
Jax
Jaxβ€’9mo ago
i didnt know i had to edit one in lol this is just me trying to set it up for first time @Vinny (@Wasp) sorry should have clarified that i am following the get started guide and i have gotten this far but then i got that error, i hadnt edited anything in the files okay i see i removed the question marks and it worked, my apologies i realize my issue now
MEE6
MEE6β€’9mo ago
Wohooo @Jax, you just became a Waspeteer level 1!
Vinny (@Wasp)
Vinny (@Wasp)β€’9mo ago
no worries. It depends on which auth method you're using. note that usernameAndPassword isn't recommended in production
Jax
Jaxβ€’9mo ago
Okay sounds good, I now see the auth guide my apologies. I was also wondering though, I saw your blog post about creating CoverLetterGPT.xyz, and I was wondering how you keep your API costs as low as ~15$ a month with the GPT api? That's extremely low I feel like as it would usually cost a good bit if that many people are doing it or am I missing something? Just trying to get ideas for how to launch my first SaaS @Vinny (@Wasp)
Vinny (@Wasp)
Vinny (@Wasp)β€’9mo ago
costs have gone up a bit since I implemented GPT-4 but will probably go down since theyre lowering prices again soon. Simple text generation isn;t that expensive
Jax
Jaxβ€’9mo ago
ah i see what you're saying. I will definitely have to look into that then. Thank you so much for all your help!
Vinny (@Wasp)
Vinny (@Wasp)β€’9mo ago
No problem. keep the Questions coming!
Jax
Jaxβ€’9mo ago
Just a few more lol if you don't mind. I have used lots of Local AI solutions for running local llms. I know you can host these on AWS and other services so I was wondering if you knew if that was any better pricing wise? Or if you had any experience with other AIs such as Gemini Pro API? I know nothing will be free just trying to be optimal as possible.
Vinny (@Wasp)
Vinny (@Wasp)β€’9mo ago
nope. never tried OS LLMs but @miho said that the price point for Mixtral on Replicate API is great. I want to add this to Open SaaS actually, so if you try it out and can give us any feedback on it, let us know πŸ™‚
Jax
Jaxβ€’9mo ago
i will have to look into that thank you! If I end up trying it out I will let you know!
Jax
Jaxβ€’9mo ago
@miho I am confused about the pricing on the Replicate API could you possibly help me understand it? I see this pricing chart but does it run 24/7 or what? because i feel like for a SaaS that would get expensive quick if its running 24/7 and you are paying an hourly rate
No description
miho
mihoβ€’9mo ago
mistralai/mixtral-8x7b-instruct-v0.1 – Replicate
The Mixtral-8x7B-instruct-v0.1 Large Language Model (LLM) is a pretrained generative Sparse Mixture of Experts tuned to be a helpful assistant.
miho
mihoβ€’9mo ago
It's per request pricing, it's cca 2x to 3x cheaper than ChatGPT 3.5 Turbo
Jax
Jaxβ€’9mo ago
Perfect thank you!! @Vinny (@Wasp) Hey, so i looked into the replicate service as a total, and I was going to try my best to try and incorporate it into open-saas to let you know how it works, if it ends up working good I will send you updates and a PR if that works
MEE6
MEE6β€’9mo ago
Wohooo @Jax, you just became a Waspeteer level 2!
Vinny (@Wasp)
Vinny (@Wasp)β€’9mo ago
oh nice! that would be so cool. hope it works out for you πŸ™‚
Want results from more Discord servers?
Add your server