Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs[patch]: Improve docstring format for streamEvents #6513

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion langchain-core/src/runnables/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ export abstract class Runnable<
*
* **ATTENTION** This reference table is for the V2 version of the schema.
*
* ```md
* +----------------------+------------------+---------------------------------+-----------------------------------------------+-------------------------------------------------+
* | event | name | chunk | input | output |
* +======================+==================+=================================+===============================================+=================================================+
Expand Down Expand Up @@ -793,6 +794,7 @@ export abstract class Runnable<
* +----------------------+------------------+---------------------------------+-----------------------------------------------+-------------------------------------------------+
* | on_prompt_end | [template_name] | | {"question": "hello"} | ChatPromptValue(messages: [SystemMessage, ...]) |
* +----------------------+------------------+---------------------------------+-----------------------------------------------+-------------------------------------------------+
* ```
*
* The "on_chain_*" events are the default for Runnables that don't fit one of the above categories.
*
Expand All @@ -802,16 +804,18 @@ export abstract class Runnable<
*
* A custom event has following format:
*
* ```md
* +-----------+------+-----------------------------------------------------------------------------------------------------------+
* | Attribute | Type | Description |
* +===========+======+===========================================================================================================+
* | name | str | A user defined name for the event. |
* +-----------+------+-----------------------------------------------------------------------------------------------------------+
* | data | Any | The data associated with the event. This can be anything, though we suggest making it JSON serializable. |
* +-----------+------+-----------------------------------------------------------------------------------------------------------+
* ```
*
* Here's an example:
* @example
*
* ```ts
* import { RunnableLambda } from "@langchain/core/runnables";
* import { dispatchCustomEvent } from "@langchain/core/callbacks/dispatch";
Expand Down
Loading