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:
Eugene Yurtsev
2024-07-16 17:38:32 -04:00
committed by GitHub
parent dd7938ace8
commit 616196c620
6 changed files with 356 additions and 10 deletions

View File

@@ -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
"""

View File

@@ -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,

View File

@@ -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.