dust icon indicating copy to clipboard operation
dust copied to clipboard

A case for Finally block

Open abhinavsohani opened this issue 3 years ago • 3 comments

So, we have multiple steps in an app. The last step is the curl block which sends a webhook to our server with the final result. Sometimes, an intermediate step fails and our server never gets the webhook.

What about something like the 'Finally' block, which always gets called and has access to the run's status?

abhinavsohani avatar Apr 21 '23 17:04 abhinavsohani

Thanks will discuss with the team and keep the issue updated :+1:

spolu avatar Apr 21 '23 17:04 spolu

I encountered errors during my runs with Dust.tt, and I would like to hear your suggestions for handling these errors. This is one of the main reasons I'm not currently using Dust.tt in production. This is because, by using my own code after refining the process with Dust.tt, I can handle errors more effectively.

cmirdesouza avatar Jun 08 '23 14:06 cmirdesouza

I also had this difficulty/need. My last block calls my API with the result. When the last block isn't called, most of the errors are related to OpenAI API overload/timeout.

My solution for now was to create cron jobs to hit the dust.tt API every X minutes to retrieve the runs that still hadn't returned a response to my system. Then, I evaluate the status and attempt to run the prompts again, up to a maximum limit of attempts that I configured.

renatocaliari avatar Jun 22 '23 09:06 renatocaliari