Absolutely love this project mate - it filled in so many blanks for me. Completed the whole SaaS form start to finish, though a lot of the API protocols still a bit of a muddled gray area for me. Not sure if you do any kind of tutoring, but I'd be willing to pay you well to further engrain a few of these steps in my brain. :)
Thanks! I’m so glad you managed to follow it through. I haven’t considered doing tutoring yet but I’ll let you know if that changes. What kind of tutoring would be helpful to you? Q&A style thing, or maybe working on a live project (pair programming)? If you find certain ideas unclear, then I wonder if that’s an opportunity to make a video or project focused on it so that other people will be able to learn from it too.
Update: I'm now trialing one-on-one tutoring sessions for projects like this (and any general tech topics), so if you're interested to learn more, please check out my schedule: calendly.com/pixegami Sessions are done over Zoom, with screenshare. It is privately recorded, and the video and code is shared with you after. I also do a lot of prep-work beforehand to respect your time and help you get the most out of the session.
@@pixegami hey Jack will this be useful if I am a beginner. I have an understanding of some concepts but ultimately I’m brand new. I’d be happy to book in a 1-on-1 but want to check so I am not wasting your time
@@CHRLD-7 Hey! Since I offer 1-on-1 as a paid service, it's never a waste of my time-especially if I can help you on your journey. But as someone who's new, I think there's a lot of great free content online and you might be able to get far on your own before having to spend any money. To make the most out of a 1:1 session, you should have a clear problem or goal, and it should be something that you've struggled to solve yourself. But whatever you choose to do, welcome to the world of coding! :)
True. He was way ahead of the time, before all these have become a mainstream. Truly wish this channel grow! @pixegami yes please. Nextjs+Supabase would be a plus 😅
This is really useful and I like the level of complexity, and the level of explaining is just right. Watching this after learning basic Python syntax last week.
This is a fantastic video. It's by far the best one around the SaaS on RU-vid. Several folks asked about additional items, e.g., the authentication, database, and subscription payment gateway. It's not a complete SaaS solution without those items. I eagerly anticipate your new project to cover them.
Thanks, you're right - building a SaaS from the ground up is a massive project. I'm slowly doing videos to cover individual components, and hopefully I can pull together to make another end-to-end SaaS tutorial in the future with all the features you mentioned.
Thank you very much for this tutorial. This was my first time using AWS and it was a great mix between just enough information and not too long of a tutorial!
I just finished this from start to finish and this was by far one of the best tutorials I've seen! I really liked the detail and how well explained each step was. It's also great that you're still trying to help some folks in the comment section. Thanks for the tutorial!
Awesome, thank you! And amazing job for getting through start to finish. Fun fact, less than 3% of people who watch this video manage to finish the project, so well done :)
Thanks for this, I used Express and Typescript to code the back-end of the application instead of Python, so that went in quite a different direction but the ideas and guidelines you gave came in very useful and I couldn't have done it without this video.
Finally finished it! Thanks a lot, it was a really huge work! I had to revised all code due to I used only AWS ApiGW instead fastApi, also I deployed everything using AWS SAM and hosted website with AWS Pipeline and S3 bucket, so it took a time to readapt everything and write all backend from zero. Finally I get a really great project for my portfolio! Oh, and I heard that you don't like this kind of tutorials because it is very hard to follow for someone, but for me it is really great, they could keep all the project and very consistent. Anyway thanks again!
Congratulations for completing the project! Only about 3% of viewers even make it to the end of the video. Well done :) I'm also very glad to hear that you enjoyed it. Thanks for the feedback as well, it encourages me to make larger tutorial projects like these in the future.
Absolutely amazing work!! You made the whole thing engaging and intuitive without missing a single detail. I'm definitely using this as the primary guide for my application. Thanks a lot! 🚀
Absolutely amazing. Couple of issues that may help others complete this tutorial. Change the timeout of your aws lambda since it has a 3 sec limit by default and is in most cases not enough for the lambda to go live and fetch and return what you are requesting. I am very thankful for this extremely high quality content. You are superb.
Now i try to generate NFT with your wideo!!! When i have free time i try to generate poem with ai and i will try to build ap with you! Nice content bro! Take Carey!
Hello, this is top notch stuff! In these 3 hours I learnt more than what I'd gone through in weeks with other tutorials. Several people have asked a few times below, so I'm going to bump up this already strong signal on what your audience is looking for! Possible to add a continuation tutorial on Stripe/PayPal integration and a user login system? This would really complete your package on SaaS creation, and if put together, would be one of the most authoritative pieces of education for many of us in SaaS creation :)
Thanks! Those are encouraging words. I definitely plan to do another major-project tutorial that involves auth and payments. It will probably be a separate project because I want people to be able to jump right in. But you'll probably have to wait 2-3 months for it though because those projects usually take a bit of time to prepare, record and edit :)
@@pixegami Is it still a video you will release in a near future ? I'm absolutely thrilled by the idea of this tutorial, as I don't find any like the one mentioned here. I'm a lot concerned by the security aspect of such a SaaS and would love a lot to learn more about it.
@@Louma007 Yup, I definitely plan to do a refreshed SaaS video, and go over things like Stripe and subscriptions too. But currently I'm working on a beginner Python course that will probably take me 2-3 months, so I need to finish that first. Whilst I enjoy the 'bigger' projects more, I realised there's still a lot of people who want to learn from scratch, so I want to bridge that gap a bit first.
@@danielemingolla I have one just on Auth + Stripe here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xi3F2Zv91UE.html There's a lot of ways to do it too, but that's probably how I'd start.
Would it be possible to add paid plans and also restrict usage for the different plans with this architectur? Planning a SaaS and this is by far the most ellegant way I've seen in terms of handling the backend and only think that's missing is the payment service so does anyone know about that?
I still need to make a SaaS tutorial that combines payments and everything, but for now here's a recent video I made that shows how I'd set up auth and payments for something like this: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xi3F2Zv91UE.html
I don't think I'll make a part 2, but I might make a separate one to cover auth and pricing specifically (since a lot of people have asked). I just don't like the idea of people having to sit through a 3 hour project as a pre-requisite. Thanks for the suggestion though!
Hi @pixegami, would it be possible for you to create a full-stack video which would include authentication and Stripe payments? Not sure whether I have said this before but it would be extremely helpful. Thanks in advance.
Thanks! I do plan to do that sometime this year, but that's quite a big project so I haven't had time to finish it yet. Stay tuned though, it's definitely coming :)
Hello! Great video! I've watched until 1h28m but I'm not understanding how I'm supposed to test this locally. Do I need to remove the handler created by Mangum in order to run the fastAPI server locally? What's the best way to test the APIs and the frontend on my local machine? Thanks
I think there's a couple of ways you can test it locally. Pick what works best for you: 1) Like you said, you can have a `main` function (or a way to start the Python app) that uses the FastAPI app directly as a server. You don't have to remove the Mangum code, you can just choose not to use it (since the FastAPI app is still created either way). Then you can test it like you would with FastAPI. 2) You could actually just run it as a Lambda function locally and test that: docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-debugging.html 3) You could split testing into two suites: a unit tests that just tests the service logic Python files itself. I write those as a unit test, then I use FastAPI/Mangum to wrap that for deployment. I just test the Python logic and not the FastAPI/Mangum stuff with the unit tests. Then you can deploy it to a BETA stack (so like a non-prod copy of your Lambda function), and write API integration test to test the whole thing end to end. This is harder to set up, but this is how I generally test larger projects. Then you get both speed for local development, but the full end-to-end testing for the real thing.
Unable to import module 'brandguru_api': No module named 'pydantic_core._pydantic_core I am getting this error while testing the function on aws. How can i resolve it? Thanks for great tutorial.
I'm getting the same error. I've tried changing the python version from 3.12 to 3.10 on aws in case there's some compatibility issues and updated the dependencies with pip install. Not really sure what else to do. Edit: Try changing the python version on AWS to 3.7. This is because the Dockerfile has it install python 3.7 Alternatively, update the Dockerfile to use an updated version of python.
I'm not doing any mentoring/training right now, but if there's subjects or topics you'd like me to make a video about then feel free to suggest it. I'm also planning to start a Discord server sometime in the future so you can talk to me and ask me questions directly there.
Amazing video!!! Do you mind give a bit pointer where you setup the OAuth to allow user login with Google? I couldn't quite locate that in the video but did see that as a feature when I went to the site
Glad you enjoyed it! I actually only found out I had to add the Auth after, so unfortunately (security requirement from OpenAI) that didn’t make it into the video. I also used Auth0 here, but if I had to do it again I’d probably use Firebase. I do have a Firebase Auth tutorial video here, which you could probably apply to your project: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BQrE98bP6m4.html They both (Auth0 and Firebase) use JWT tokens as the underlying mechanism, which is a sensible way to solve auth for Rest API applications.
What's good my guy! Thanks so much for this tutorial. Loving the amount of detail you've put into this tutorial! So I've run into a 500 error trying to connect to fastAPI (46 minute mark). The terminal says the following: openai.error.AuthenticationError: No API key provided. I've previously exported my OPEN_API_KEY in the prior step but unsure as to the step I am missing! Much appreciated any support you are able to provide. Keep up the great work!
Did you call it `OPEN_API_KEY ` or `OPENAI_API_KEY`? The library expects the latter. Otherwise in your application code, you can debug the value in Python directory by running `os.environ.get("OPENAI_API_KEY")` - and don't forget to `import os` first. See the docs for more info: beta.openai.com/docs/api-reference/authentication
After i added the env variable from mac terminal, I had this issue while running from VSC but it worked fine on mac terminal. Are you seeing error from VSC terminal? When i used 'printenv' on VSC terminal it was not showing me the api key variable.
Hi Jack, great tutorial. What infrastructure would you suggest to achieve the same but with GPU capabilities for those heavy models (noting that lambda functions don't provide these). Thanks.
Hmm, interesting. I don't have a lot of experience myself with running serverless GPU compute loads. The AI I used in this tutorial is actually just an API service call - the heavy lifting is done by OPenAI's servers. If you have your own model that you want to host like this, you could potentially look into AWS ECS or AWS Fargate instead for more compute options. I'm not sure if there are serverless GPU compute available. Maybe AWS SageMaker? But if you have enough money, you can just run an actual GPU server full-time, and have the rest of your app make service calls to it. There's a lot of GPU compute options out there (AWS, Google Cloud, Azure, PaperSpace), but they usually are quite expensive.
tried running cdk bootsrap with my account and region but I keep getting this error, Need to perform AWS calls for account but no credentials have been configured
I haven't done something like that yet - sounds like quite a specific use case. I'll be doing a more complex AI project later this year, but I think if you want something very specific like that, it's probably easier to watch separate videos that show you have to do different parts of it.
You can sign up for an account here: platform.openai.com/overview Then click on your profile, go to "Manage Account". You should be able to get an API key from "Api Keys" and set usage limits (e.g. max spend) in "Billing".
Did you ever post or share how to add authentication? Would appreciate if you gave some guidance or pointed in the direction of adding it. Is it still possible to deploy without it? @pixegami
I did make two separate videos on using Firebase for Authentication: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BQrE98bP6m4.html And with Stripe for payments: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-xi3F2Zv91UE.html But this might be a bit outdated now so I'll have to review and see if they are still practical options for SaaS today.
I keep getting the error around 1:25 when testing the Lambda functions. The copykitt_api name is correct in Infrastructure-stacks, and I made an ENV file. "errorMessage": "Unable to import module 'copykitt_api': No module named 'dotenv'", "errorType": "Runtime.ImportModuleError" Lambda was working prior to Docker addition. Help!
It means it can't find the dotenv package - you might need to add that into the Lambda base layer (the one we use Docker for) and repackage it for the function to use.
Yes. But there's a caveat. There's no such thing as "FREE" or "PAID" AWS accounts - All AWS accounts are the same, and have the same billing plans. But the technology that I used for this project (like AWS Lambda) have generous free tiers - which if used wisely, are enough for projects like this. See here for all the free tiers (look for "always free"): aws.amazon.com/free
Ah good call out. Yes, you can work-around the Docker part. It's only just used to prepare the Lambda function with the dependencies. Of the top of my head, there's definately ways to basically just build out all the Python dependencies into a local folder, and just include that with the entire Lambda zip. I didn't like that because it's not managed by code (rather it relies on a script to update the function everytime you want to change it). Another way is to just use a cloud computer (e.g. hire an AWS EC2 micro instance for a few hours) and run Docker in there instead, just to prepare the `layer.zip` file. You just need that file once, and you can do the rest without it.
Hello, sadly i am getting the error No module named 'pydantic_core._pydantic_core when trying to run my lambda function, seems like it is not available on the awslinux architecture, i am using arm Mac.
Ah sorry I think the Lambda docker image layer must be built for Intel architecture. You might have to rebuild the layer yourself using Arm Architecture on the Mac 😞
wow video is almost two years old but you responded immediately. Thank you so much! Indeed, i just ended up using one of lambdas preconfigured python base layers and also set the architecture to arm. Works well now! @@pixegami
1:18:51 when you are the generate base layer into a zip, you use chmod which is not a command for windows. I have been looking for another way to make the file a executable but I am struggling. any solutions?
Oh, I see - if that's the .sh file, then I don't think .sh files are executable on Windows. You might either have to do it in a Linux Subsystem (WSL), or just write your own script. The shell file itself doesn't do a lot of heavy lifting - it's mostly just Docker and file system commands. In my future videos I'll have to provide Window alternatives to these commands too.
Nice video. Well done! I started to add more functionalities using your template. However, I encountered a problem that the zip file exceeds the 250 MB limits. So I believe I have to create the lambda function from docker image, which has a 10GB limit. I find the process is very painful, even for those with a tech background like me. Any chances that you can add a git branch for this use case? Using this template would let folks, like me, to focus on the API dev instead of going deep on docker and other stuff. Thanks!
Wow, thank you so much for the "Super Thanks"! I really appreciate it. You're right that Docker is definitely the way to go. I'm happy to do a tutorial/branch on it, but it's going to take a while to deliver because I have several months of content planned and recording already. Here is the AWS documentation for deploying a Docker Lambda container: docs.aws.amazon.com/lambda/latest/dg/images-create.html I've deployed this with Docker before. The AWS configuration isn't hard - but where I find it challenging is the packaging. This folder has an old project and an example file for deploying a Docker based Lambda: github.com/pixegami/saas-starter/tree/master/saas-infrastructure/compute/base_layer It's a bit outdated though, so you might have to adapt it. The key important thing I wanna warn you about is that the Docker image must be generated with the EXACT same base OS arch and same Python version that runs in Lambda. That's because some Python libraries will only download a pre-built binary for specific OS Archs or Python versions.
With same stack , if we want to save prompt and response to prompt , what do you recommend to use as a data base ? any AWS services or create our own database like PostgreSQL?
Depends on your access pattern. The cheapest and simplest database on AWS is DynamoDB. It's a serverless key-value store (like Firestore on Firebase), so I'd start with that-until your needs outgrow it.
Good suggestion. I chose React because it is the leading frontend framework right now (going by metrics like adoption, number of users, community support). It's also serverless, which Django doesn't offer. I do prefer working in Python, but the advantages of using a leading framework (e.g. React) outweighs the relatively fixed cost of learning the technology (e.g. Typescript). That said, Django does shine when it comes to deploying full-stack apps and prototypes quickly, so I will probably explore it as well in a future project.
@@jonathant1797 Your question about Django, for me Django is back-end and rect front-end, so it's not the same. Maybe O wrong ?? You can replace Django with node.js for example.
Hi @Pixegami, Thanks for this great tutorial! I've finished almost half of your video, and now I am stuck in what seems at a new error (500 internal server error), as it seems AWS Lambda requires an API Key from Authorization Bearer in the header or password, not only from the environment file. Can you please tell me what is the best approach for this and solve it? Thanking you in advance
Well done for making it halfway! That depends on the error - it's hard for me to tell what the problem or the solution is. The quesiton I'd ask here is, which API call is throwing this Authorization error? Also, that error should be a 4XX, not a 500 (I guess Lambda gets hit with the 4XX and is the one to throw the 500). So you need to figure out which API call inside that Lambda function is throwing the error. It should be a 4XX error. Then see what you can do to give it the correct authentication token. Here's some good reading on HTTP authentication in general: developer.mozilla.org/en-US/docs/Web/HTTP/Authentication
Hi...I am stack on a point...I am getting the following error while testing the api Unable to import module 'readingapi': No module named 'pydantic_core._pydantic_core' can anyone experience the same?
Hmm, it sounds like you are either using the wrong Python environment to run your code - or you might have missing/outdated dependencies and need to run `pip install --upgrade`.
Hi, thanks for the great tutorial. Can you help me why I got statuscode 404 response when testing at 1:24:12? I tried both edited and unedited template test and got statuscode 404 Thank you in advance
404 status code means it tried to reach something that doesn't exist: en.wikipedia.org/wiki/HTTP_404 To figure out what the problem is, you need to look at the stack trace and figure out which line failed, and see what resource you are trying to use that is raising the 404. It might be a mistyped API key or endpoint.
Sure, Rails is a full featured framework so I'm sure it's possible. But if you are starting a new project and have a choice of frameworks/language, I think it's better to choose something that's widely used and gaining (rather than losing) popularity and adoption. It's important for the long term maintainability of the project.
Hi, I'm having a couple issues with the layer on my windows. When I built the layer it works and deploys successfully but when I test the GenerateSnippetProxy, I get "No module named 'numpy.core._multiarray_umath'" (numpy is up to date) and if I use the layer provided and in your git and cdk deploy I get "No API key provided from openai". I really want to get this right, not sure how to do so
Ok, for the first problem it sounds like there's something wrong with trying to build the layer in the Windows OS. It's likely if you solve that problem, you'll run into the separate OpenAI issue layer anyway.
Your second issue, "no API key" is actually good to see. It makes the layer and the Lambda is working properly, and able to get as far as running the OpenAI SDK. The SDK fails though because it can't find the API key (it's expecting an environment variable called "OPENAI_API_KEY). So how do we solve that? Luckily it's an easy fix.
This is the line that sets the OpenAI environment variable on Lambda: github.com/pixegami/copykitt-tutorial/blob/main/copykitt-infra/lib/copykitt-infra-stack.ts#L24 If you don't understand what that line is doing, I suggest to read up about .env (dot-env) files. You have to create .env file and define your OpenAI key in there. Or you can just hard-code it on that line if you want an easy option. But NEVER commit or expose that API key in public. That's why it doesn't show up when you clone my repo - private keys must be protected otherwise someone can access your API (and you will get billed for it).
AWS (and Azure and Google Cloud as well) already have pretty extensive free tier that lets you do quite a lot of development already: aws.amazon.com/free/ Firebase also lets you do a lot of stuff for free: firebase.google.com/
Most cloud providers will probably ask you for a credit card to get started with hosting any kind of service (even if they are free). But some other popular free options to look at include Vercel and Firebase, but the code will be different to host the project on those platforms.
Video was amazing. I've a problem though. The zip works totally fine when I use the own downloaded from your GitHub. However when I create my own with Docker there seems to be an error with some numpy imports (No module named 'numpy.core._multiarray_umath'). DO YOU HAVE ANY IDEA HOW TO WORK THROUGH VERSION/COMPATIBILITY ISSUES??
The version of Python in your Lambda, and the version that is built in Docker needs to be the same. Also the CPU architecture needs to be the same as in Lambda. It's quite a tricky problem that I've run into myself as well, which is why I prepared a zipped Docker layer for you already. We can get into debugging Docker/Python compatibility issues, but it's a pretty deep subject so I'll probably address that in a separate video.
@@pixegami > Also the CPU architecture needs to be the same as in Lambda I ran into this problem with my Macbook Pro M1 (arm64). The platform for the service is x86. This causes mismatch and some weird package not found issue during pip install. The solution would be to specify the platform in Docker, something like: "FROM --platform=linux/amd64 python:3.9.9-slim-bullseye"
This is just the regular out of the box terminal program in Ubuntu Linux. If you are using Mac OS, then iTerm will be similar. I don't know what the equivalent is for Windows. As for the terminal plugins, color and style itself, I use the zsh (zshell), with Oh-My-Zsh add-on. For the color theme, I use a custom theme, which I based off the in-built "Agnoster" theme. I then have two additional plugins: one that highlights valid/invalid commands, and one that adds auto-complete based on my history.
Hi, Thank you for this great tutorial. I got stuck while deploying my project to the aws cloud, I got the following error while testing: errorMessage": "Unable to import module 'copykitt_api' Do you have any idea what should I do in order to resolve it?
The error means the function on Lambda can’t find the Python file that has the module `copykitt_api`. It could be a simple pathing or naming error, or something more complex. For debugging it, I recommend opening up the Lambda code in the AWS editor and see what files are there, and if you can make modifications there to import it.
@@pixegami As far as I understood it, the error is probably related to the Python and numpy version which I am using. What Python version you are using?
@@evgenipogoster1940 Yeah I got the same error, probably the version of openai and numpy are not compatible. So what I did is just clone his layer.zip from the github and continue from there
The things I've used in this tutorial should still be supported, but they might be older versions of the API. I plan to update my channel with a newer version of a SaaS stack soon too so stay tuned if you are interested in this type of project.
I'd go with DynamoDB (or a similar key-value store) if the use case is simple. PostgresSQL is excellent too but you'll have to work a little harder to scale it out.
Hello and thank you for this wonderful work. I am doing everything inside a python virtual environment. When I try to do docker --version it tells me that the command is not recognized. Please how can I solve this. Thank you. I have tried to install it by npm and by pip but neither works
Hey man. Great video. I've a problem though. The zip works totally fine when I use the own downloaded from your GitHub. However when I create my own with Docker there seems to be an error with some numpy imports (No module named 'numpy.core._multiarray_umath'). Any idea what could be wrong??
It probably means you're running `cdk deploy` from the wrong directory: docs.aws.amazon.com/cdk/v2/guide/troubleshooting.html#troubleshooting_app_required You need to run it from the CDK project root.
best regard. I would appreciate if someone can help me with this error * The Python version is: Python3.9 from "/var/lang/bin/python3.9" * The NumPy version is: "1.21.6" I've searched everywhere but I can't find the solution
I don't think that's the full error message. But at a glance, it sounds like a Python runtime mismatch. My guess is that you need to change the Lambda Python runtime version to something that matches the Docker image version (I think I built it with 3.7?). Check the Dockerfile to confirm the Python version there. If that really is the problem, then here's the explanation: libraries like Numpy actually aren't pure Python - they contain a lot of compiled binary code (like written in C). But that code is usually platform and runtime specific. So when you install numpy in your Docker container using a Python 3.7 runtime, you only get the 3.7 versions of numpy. When you try to run that in a Python 3.9 environment, it can't find the equivalent 3.9 runtime binaries, so it will fail. I don't know if that's the real problem you're seeing, but that's my guess.
@@pixegami Thank you, you are doing an excellent job. What I did was in the requirements.txt file I added numpy==1.21.5 to downgrade it because I was installing 1.21.6. Then in the copykitt-infra-stack.ts file I put everything to python 3_7 and in the lambda I also put the Run times to python 3.7 in the end it worked. Thank you very much.
@@jesusperdomo8388 THANK YOU SO MUCH! I spent three hours trying to figure this out, and by the end of it I decided to actually check the comments, and it works now! 😭
Any idea why I would get "openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details." the first time running this? I definitely have not exceeded my usage limits. I haven't even used it yet.
Ah yeah, that's right. But it's pretty cheap if you set limits on your tokens. I think they also recently just reduced the price by 60%. When I build apps for testing, I usually use "Curie" engine because it's 10% the cost of Da Vinci. Usually even with quite a lot of testing, my bill still comes out to something like 1-2$ for the month.
@pixegami I've been following this tutorial slowly over the past couple days and have loved every little part of it!. This is my first tutorial project and I really want to get it done, however I am runing into an error! I've made it to the 2 hour mark in the video, however when I type in "coffee" for example and submit, I will receive an error in my console. [my api link] from origin 'localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. and get [my api link] net::ERR_FAILED 502. The weird thing that I am finding though, if I keep clicking submit it will eventually work as intended, usually after 3-4 submits. I'd greatly appreciate it if there was some way you could help! I really want to finish this!
CORS is a safety feature between a server and a browser (so it could be something special with your browser, or maybe the API server middleware not handling CORS properly). It's hard to see what is the exact cause without really deep diving in your situation but I recommend looking up some CORS-related guides on what the problem is and how to fix it: developer.mozilla.org/en-US/docs/Web/HTTP/CORS Usually to 'fix' CORS you need to make it so that the HTTP response sent back to the caller has a header attached that allows CORS from cross-origin sources: developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
Very Great tutorial. I have one question from the business perspective, If i have an idea which OpenAI can solve and if I wrap a SAAS around it and sell the feature, what will be my USP?
If your business *only* wraps OpenAI without adding new value, it will be hard to have a USP. If you want a USP, your business would have to add value on top of the OpenAI technology somehow - for instance putting together queries in a specific way, or using the responses from OpenAI to do something unique on your server.