How to handle long running tools #186
-
Hello 👋 First, again, thanks for this gem. It's really a very elegant piece of work. I have this (possibly stupid) question: How would you handle a tool taking a long time to execute? I would instinctively have this logic in a background job.
If anyone has implemented this, I would be glad to know how you did this? I know this is not an issue per se. Sorry about this. Feel free to close it if it's not relevant. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
This might be obvious, but isn't your LLM call already in a background job? Usually the LLM takes longer than the tool in my experience. But if I were dealing with slow tools, I would just have even longer running jobs. |
Beta Was this translation helpful? Give feedback.
Oh sure. Your tool could broadcast a "waiting..." message back to your UI using Turbo Streams.