mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 22:56:05 +00:00
add links
This commit is contained in:
@@ -559,10 +559,9 @@ callbacks to any child objects.
|
||||
Any `RunnableLambda`, a `RunnableGenerator`, or `Tool` that invokes other runnables
|
||||
and is running async in python<=3.10, will have to propagate callbacks to child
|
||||
objects manually. This is because LangChain cannot automatically propagate
|
||||
callbacks to child objects in this case.
|
||||
|
||||
This is a common reason why you may fail to see events being emitted from custom
|
||||
runnables or tools.
|
||||
callbacks to child objects in this case. If you see that callbacks
|
||||
are not being triggered in your child objects, you may need to [manually
|
||||
propagate runnable config to child runnables](/docs/how_to/runnables_propagate_config/).
|
||||
:::
|
||||
|
||||
## Techniques
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"\n",
|
||||
"- [Callbacks](/docs/concepts/#callbacks)\n",
|
||||
"- [Custom callback handlers](/docs/how_to/custom_callbacks)\n",
|
||||
"- [Custom callback handlers](/docs/how_to/propagate_runnable_config)\n",
|
||||
":::\n",
|
||||
"\n",
|
||||
"If you are planning to use the async APIs, it is recommended to use and extend [`AsyncCallbackHandler`](https://api.python.langchain.com/en/latest/callbacks/langchain_core.callbacks.base.AsyncCallbackHandler.html) to avoid blocking the event.\n",
|
||||
@@ -23,8 +24,9 @@
|
||||
"\n",
|
||||
":::{.callout-danger}\n",
|
||||
"\n",
|
||||
"If you're on `python<=3.10`, you need to remember to propagate `config` or `callbacks` when invoking other `runnable` from within a `RunnableLambda`, `RunnableGenerator` or `@tool`. If you do not do this,\n",
|
||||
"the callbacks will not be propagated to the child runnables being invoked.\n",
|
||||
"If you're on `python<=3.10`, you need to remember to propagate `config` or `callbacks` when invoking other `runnable` from within a `RunnableLambda`, `RunnableGenerator` or `@tool`. \n",
|
||||
"\n",
|
||||
"See this the guide on [how to propagate runnable config to child components](/docs/how_to/propagate_runnable_config) for more information.\n",
|
||||
":::"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user