Hi
We are calling ChatGPT api from forge as Asyc call and it has time out at 25 secs. And some time ChatGPT takes longer. Is there any way to increase forge time out? Or any other work around?
Thanks. Appreciate your help.
Hi
We are calling ChatGPT api from forge as Asyc call and it has time out at 25 secs. And some time ChatGPT takes longer. Is there any way to increase forge time out? Or any other work around?
Thanks. Appreciate your help.
Hi @SushilBhattachan ,
There is no way to increase the execution time of a Forge function. My suggestion is to invoke the API such that you get back some kind of job ID that you can check the status of in async tasks until it is complete. This is a common pattern for queries that may take a long time. If the ChatGPT API doesn’t support this, you may need to create a service of your own that acts as a facade.
Regards,
Dugald
Oh. I see. Umm. Not sure. Let’s see.
Hi @dmorrow ,
I have the same issue with the timeout at 25 secs.
Read your reply about using the job ID to check the status of async task, do you have any example on how to do this?
Thanks.
Regards,
Benny.
Hi @BennyChandra ,
The Redash API is an example of an API that provides job IDs in response to queries because Redash queries can take a long time to execute.
I don’t have any example code, but your app could perform the following steps:
Regards,
Dugald
@dmorrow @HeyJoe Thanks for your response.
Any documentation or example would be very helpful.
Hi @SushilBhattachan ,
To understand Forge webtriggers, you might like to try to create a new app using the webtrigger
template and examine the generated code. To get the app up an running, you can do the following:
forge deploy
.forge install
.forge install list
.forge webtrigger
and choose either of the webtriggers of the app (sync or async).Regards,
Dugald
Hi @SushilBhattachan and @BennyChandra,
As an update on this topic, we’ve recently announced an increase in the runtime limit for async event invocations from 25 seconds to 55 seconds. Please see my colleague @dmorrow’s example app to explain how to take advantage of this increased limit.
Since the 25s limit is now out of date, I’m closing this thread.