Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Batch Process for Detoxify Classification

Open nil-andreu opened this issue 2 years ago • 2 comments

I am wondering if for the messages that we were not able to classify, If we could create a batch process to classify them. Or if maybe we are not interested in storing this information after the conversation.

nil-andreu avatar Jan 07 '23 19:01 nil-andreu

I am wondering if for the messages that we were not able to classify, If we could create a batch process to classify them.

Yes, we need a function that retries the detoxify web-call for all messages with a null detoxify-result. A background-thread sould be launched on start-up to do this and then run periodically every few hours.

Or if maybe we are not interested in storing this information after the conversation.

We want to store the detoxify-results for all messages in the DB, i.e. when a call initially failed we will retry it later through the "batch process".

andreaskoepf avatar Jan 07 '23 23:01 andreaskoepf

Okay thanks! I have to do a couple tasks previous to be able to take this one (f.e. including this classification in the flow of the conversation).

And then I think I could onboard this.

For running periodically‚ why might want to use some sort of task queue with f.e. redis and a worker?

nil-andreu avatar Jan 08 '23 00:01 nil-andreu