Optionalparams: ConstructorParamsA map of additional attributes to merge with constructor args. Keys are the attribute names, e.g. "foo". Values are the attribute values, which will be serialized. These attributes need to be accepted by the constructor as arguments.
The final serialized identifier for the module.
A path to the module that contains the class, eg. ["langchain", "llms"] Usually should be the same as the entrypoint the class is exported from.
A map of secrets, which will be omitted from serialization. Keys are paths to the secret in constructor args, e.g. "foo.bar.baz". Values are the secret ids, which will be used when deserializing.
A manual list of keys that should be serialized. If not overridden, all fields passed into the constructor will be serialized.
Called when an agent is about to execute an action, with the action and the run ID.
OptionalparentRunId: stringOptionalhandleCalled when an agent finishes execution, before it exits. with the final output and the run ID.
OptionalparentRunId: stringCalled at the end of a Chain run, with the outputs and the run ID.
OptionalparentRunId: stringCalled if a Chain run encounters an error
OptionalparentRunId: stringCalled at the start of a Chain run, with the chain name and inputs and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Optionalmetadata: Record<string, unknown>OptionalrunType: stringOptionalname: stringCalled at the start of a Chat Model run, with the prompt(s) and the run ID.
OptionalparentRunId: stringOptionalextraParams: Record<string, unknown>Optionaltags: string[]Optionalmetadata: Record<string, unknown>Optionalname: stringOptionalhandleOptionalparentRunId: stringOptionalextraParams: Record<string, unknown>Optionaltags: string[]Optionalmetadata: Record<string, unknown>Optionalname: stringCalled at the end of an LLM/ChatModel run, with the output and the run ID.
OptionalparentRunId: stringCalled if an LLM/ChatModel run encounters an error
OptionalparentRunId: stringCalled when an LLM/ChatModel in streaming mode produces a new token
Optional_parentRunId: stringOptional_tags: string[]Optional_fields: anyCalled at the start of an LLM or Chat Model run, with the prompt(s) and the run ID.
OptionalparentRunId: stringOptionalextraParams: Record<string, unknown>Optionaltags: string[]Optionalmetadata: Record<string, unknown>Optionalname: stringOptionalparentRunId: stringOptionalparentRunId: stringOptionaltags: string[]Optionalmetadata: Record<string, unknown>Optionalname: stringOptionalhandleCalled at the end of a Tool run, with the tool output and the run ID.
OptionalparentRunId: stringCalled if a Tool run encounters an error
OptionalparentRunId: stringCalled at the start of a Tool run, with the tool name and input and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Optionalmetadata: Record<string, unknown>Optionalname: stringStaticfromReadonlylc_aliases: undefined | { [key: string]: string }Readonlylc_attributes: undefined | { [key: string]: string }Readonlylc_id: string[]The final serialized identifier for the module.
Readonlylc_namespace: ["langchain_core", "callbacks", string]Readonlylc_secrets: undefined | { [key: string]: string }Readonlylc_serializable_keys: undefined | string[]Called when an agent is about to execute an action, with the action and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Called when an agent finishes execution, before it exits. with the final output and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Called at the end of a Chain run, with the outputs and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Optionalkwargs: { inputs?: Record<string, unknown> }Called if a Chain run encounters an error
OptionalparentRunId: stringOptionaltags: string[]Optionalkwargs: { inputs?: Record<string, unknown> }Called at the start of a Chain run, with the chain name and inputs and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Optionalmetadata: Record<string, unknown>OptionalrunType: stringOptionalrunName: stringCalled at the start of a Chat Model run, with the prompt(s) and the run ID.
OptionalparentRunId: stringOptionalextraParams: Record<string, unknown>Optionaltags: string[]Optionalmetadata: Record<string, unknown>OptionalrunName: stringOptionaltags: string[]Optionalmetadata: Record<string, any>Called at the end of an LLM/ChatModel run, with the output and the run ID.
OptionalparentRunId: stringOptionaltags: string[]OptionalextraParams: Record<string, unknown>Called if an LLM/ChatModel run encounters an error
OptionalparentRunId: stringOptionaltags: string[]OptionalextraParams: Record<string, unknown>Called when an LLM/ChatModel in streaming mode produces a new token
OptionalparentRunId: stringOptionaltags: string[]Optionalfields: HandleLLMNewTokenCallbackFieldsCalled at the start of an LLM or Chat Model run, with the prompt(s) and the run ID.
OptionalparentRunId: stringOptionalextraParams: Record<string, unknown>Optionaltags: string[]Optionalmetadata: Record<string, unknown>OptionalrunName: stringOptionalparentRunId: stringOptionaltags: string[]OptionalparentRunId: stringOptionaltags: string[]OptionalparentRunId: stringOptionaltags: string[]Optionalmetadata: Record<string, unknown>Optionalname: stringOptionalparentRunId: stringOptionaltags: string[]Called at the end of a Tool run, with the tool output and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Called if a Tool run encounters an error
OptionalparentRunId: stringOptionaltags: string[]Called at the start of a Tool run, with the tool name and input and the run ID.
OptionalparentRunId: stringOptionaltags: string[]Optionalmetadata: Record<string, unknown>OptionalrunName: stringStaticlc_The name of the serializable. Override to provide an alias or to preserve the serialized module name in minified environments.
Implemented as a static method to support loading logic.
A map of aliases for constructor args. Keys are the attribute names, e.g. "foo". Values are the alias that will replace the key in serialization. This is used to eg. make argument names match Python.