mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
780337488e
The root run id (~trace id's) is useful for assigning feedback, but the current recommended approach is to use callbacks to retrieve it, which has some drawbacks: 1. Doesn't work for streaming until after the first event 2. Doesn't let you call other endpoints with the same trace ID in parallel (since you have to wait until the call is completed/started to use This PR lets you provide = "run_id" in the runnable config. Couple considerations: 1. For batch calls, we split the trace up into separate trees (to permit better rendering). We keep the provided run ID for the first one and generate a unique one for other elements of the batch. 2. For nested calls, the provided ID is ONLY used on the top root/trace. ### Example Usage ``` chain.invoke("foo", {"run_id": uuid.uuid4()}) ``` |
||
---|---|---|
.. | ||
__snapshots__ | ||
__init__.py | ||
test_config.py | ||
test_context.py | ||
test_fallbacks.py | ||
test_graph.py | ||
test_history.py | ||
test_imports.py | ||
test_runnable_events.py | ||
test_runnable.py | ||
test_utils.py |