issues
search
Chainlit
/
literalai-python
https://docs.getliteral.ai/
Apache License 2.0
8
stars
0
forks
source link
add a thread decorator
#2
Closed
tpatel
closed
10 months ago
tpatel
commented
10 months ago
the decorator doesn't create a step, it uses a context to set the current
thread_id
the steps use the context to get the
thread_id
the priority is: 1/
thread_id
from the parent step 2/
thread_id
from the context (set by thread decorator) 3/
thread_id
from the argument
this decorator isn't mandatory, as one can set the
thread_id
in each step
can be used with a parenthesis or not (uses a hack to force keyword argument and detect whether the decorator is used with parenthesis or not)
sets a default thread_id if it isn't set
introduces a new way to get the current thread id
thread_id
thread_id
thread_id
from the parent step 2/thread_id
from the context (set by thread decorator) 3/thread_id
from the argumentthread_id
in each step