Next.js Discord

Discord Forum

timeout with AI

Unanswered
White-horned horntail posted this in #help-forum
Open in Discord
White-horned horntailOP
I have doubts about how I could solve this use case, my hosting is vercel and the rest api is their native, integrate gpt-4 of openIA with them but without the streaming function or its specific library, just call to the AI with a request to its endpoint, however, the promp is very long and the response takes a long time, maybe 5 min in certain cases, in production vercel obviously gives me a timeout, I saw that if it is via streaming could keep the response open a while. .. however, I don't need to play that response anywhere, I just need it to finish and parse it, to introduce certain data in the database and after the response from the database show a data in the front end, how could I do this?

10 Replies

in that case, Vercel is not right place as it uses AWS Lambada or Cloudflare Worker. Just self-hosted on AWS, GCP, Azure or else.
Azure OpenAI is best
@tafutada777 Azure OpenAI is best
European sprat
Out of curiosity, what makes Azure OpenAI the best?
cuz MS invests in OpenAI
European sprat
Yea but what makes it best vs OpenAI API directly?
after all OpenAI's API could be hosted in Azure. i guess.
European sprat
Ok maybe I just misunderstood what you were saying
it says so.
We’re partnering to develop a hardware and software platform within Microsoft Azure which will scale to AGI. We’ll jointly develop new Azure AI supercomputing technologies, and Microsoft will become our exclusive cloud provider—so we’ll be working hard together to further extend Microsoft Azure’s capabilities in large-scale AI systems.
Plus C# integrations is nice. give it a try.