mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-12 12:59:07 +00:00
Docs: Add how to dispatch custom callback events (#24278)
* Add how-to guide for dispatching custom callback events. * Add links from index to the how to guide * Add link from streaming from within a tool * Update versionadded to correct release https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.2.15
This commit is contained in:
@@ -392,7 +392,7 @@ class RunManagerMixin:
|
||||
metadata: The metadata associated with the custom event
|
||||
(includes inherited metadata).
|
||||
|
||||
.. versionadded:: 0.2.14
|
||||
.. versionadded:: 0.2.15
|
||||
"""
|
||||
|
||||
|
||||
@@ -851,7 +851,7 @@ class AsyncCallbackHandler(BaseCallbackHandler):
|
||||
metadata: The metadata associated with the custom event
|
||||
(includes inherited metadata).
|
||||
|
||||
.. versionadded:: 0.2.14
|
||||
.. versionadded:: 0.2.15
|
||||
"""
|
||||
|
||||
|
||||
|
@@ -2341,7 +2341,7 @@ async def adispatch_custom_event(
|
||||
LangChain from automatically propagating the config object on the user's
|
||||
behalf.
|
||||
|
||||
.. versionadded:: 0.2.14
|
||||
.. versionadded:: 0.2.15
|
||||
"""
|
||||
from langchain_core.runnables.config import (
|
||||
ensure_config,
|
||||
@@ -2410,7 +2410,7 @@ def dispatch_custom_event(
|
||||
foo_ = RunnableLambda(foo)
|
||||
foo_.invoke({"a": "1"}, {"callbacks": [CustomCallbackManager()]})
|
||||
|
||||
.. versionadded:: 0.2.14
|
||||
.. versionadded:: 0.2.15
|
||||
"""
|
||||
from langchain_core.runnables.config import (
|
||||
ensure_config,
|
||||
|
@@ -159,7 +159,7 @@ class StandardStreamEvent(BaseStreamEvent):
|
||||
class CustomStreamEvent(BaseStreamEvent):
|
||||
"""Custom stream event created by the user.
|
||||
|
||||
.. versionadded:: 0.2.14
|
||||
.. versionadded:: 0.2.15
|
||||
"""
|
||||
|
||||
# Overwrite the event field to be more specific.
|
||||
|
Reference in New Issue
Block a user