Assistants: Async tool submissions

The way I solved exactly this in my Python/Django app.

I seed every function call with a thread_id/run_id.

So every function that is called has an insight into the thread (and thread metadata, where you could post the user email for example and/or username)

The function gets called and returns ‘request received’ - and goes to work afterwards. Now obviously you’d need to work ‘async’ in someway. The way I do it is ‘old fashioned’ Django/Celery. Building a scalable OpenAI Assistant Processor in Django with Celery | by Jean-Luc Vanhulst | Medium But there are many more ways.

2 Likes