If you prefer to have more flexibility in logging Threads, you can use the with statement. You can create a thread and execute code within it using the with statement:
Copy
with literalai_client.thread() as thread: # do something
You can also continue a thread by passing the thread id to the thread method:
Copy
previous_thread_id = "UUID"with literalai_client.thread(thread_id=previous_thread_id) as thread: # do something