You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TaskStore interface has a delete method, but I can't for the life of me find how this is called.
For my purposes the lifetime of a task is always that of a single server request, so there seems to be no real need to persist them. I started off with the supplied InMemoryTaskStore, but in the default configuration at least this gradually accumulates more and more tasks and old tasks never get deleted.
I looked at adding a finally block at the end of my AgentExecutor.execute() method to delete the (completed) task from the store, but I was unable to find a good way to obtain a reference to the task store from the information passed into execute(), so I would be forced to use a global or make the task store a singleton.
In the end I found that TaskStore.get() doesn't seem to be called for my simple case, so I wrote a null task store that doesn't save anything.
But I would still like to know what is the intended use of TaskStore.delete(), and how it is intended to be invoked.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The TaskStore interface has a delete method, but I can't for the life of me find how this is called.
For my purposes the lifetime of a task is always that of a single server request, so there seems to be no real need to persist them. I started off with the supplied InMemoryTaskStore, but in the default configuration at least this gradually accumulates more and more tasks and old tasks never get deleted.
I looked at adding a finally block at the end of my AgentExecutor.execute() method to delete the (completed) task from the store, but I was unable to find a good way to obtain a reference to the task store from the information passed into execute(), so I would be forced to use a global or make the task store a singleton.
In the end I found that TaskStore.get() doesn't seem to be called for my simple case, so I wrote a null task store that doesn't save anything.
But I would still like to know what is the intended use of TaskStore.delete(), and how it is intended to be invoked.
Beta Was this translation helpful? Give feedback.
All reactions