Chainlit / literalai-python

https://docs.getliteral.ai/
Apache License 2.0
12 stars 0 forks source link

WIP: Pawel/eng 651 threads management #29

Closed PawelMorawian closed 10 months ago

linear[bot] commented 10 months ago
ENG-651 Update the Thread management in the sdk

Right now the `client.thread` decorator is only saving a `thread_id` in the context. We need to: * create a proper thread object when using the decorator * allow devs to send custom tags/metadata/… to the thread through the decorator * properly queue the thread upsert into the event processor * add a way to get the thread object `client.get_current_thread` instead of the current `client.get_current_thread_id` * option: document a way to update the thread after having done `client.get_current_thread` * we might simply want to use `client.api.update_thread` * another option is that we decide to send a thread update at the end of the thread `with` block/decorated function

willydouhard commented 10 months ago

Can you provide an example of what is now possible ? Should we also add this example in the docs?