> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GalileoObserveCallback

***

# Class: ~~GalileoObserveCallback~~

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

## Deprecated

This class is no longer actively maintained. Please use `GalileoCallback` instead.

## Extends

* `BaseCallbackHandler`

## Constructors

### Constructor

```ts theme={null}
new GalileoObserveCallback(project_name: string, version?: string): GalileoObserveCallback;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

#### Parameters

##### project\_name

`string`

##### version?

`string`

#### Returns

`GalileoObserveCallback`

#### Overrides

```ts theme={null}
BaseCallbackHandler.constructor;
```

## Properties

### ~~awaitHandlers~~

```ts theme={null}
awaitHandlers: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:187

#### Inherited from

```ts theme={null}
BaseCallbackHandler.awaitHandlers;
```

***

### ~~ignoreAgent~~

```ts theme={null}
ignoreAgent: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:183

#### Inherited from

```ts theme={null}
BaseCallbackHandler.ignoreAgent;
```

***

### ~~ignoreChain~~

```ts theme={null}
ignoreChain: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:182

#### Inherited from

```ts theme={null}
BaseCallbackHandler.ignoreChain;
```

***

### ~~ignoreCustomEvent~~

```ts theme={null}
ignoreCustomEvent: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:185

#### Inherited from

```ts theme={null}
BaseCallbackHandler.ignoreCustomEvent;
```

***

### ~~ignoreLLM~~

```ts theme={null}
ignoreLLM: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:181

#### Inherited from

```ts theme={null}
BaseCallbackHandler.ignoreLLM;
```

***

### ~~ignoreRetriever~~

```ts theme={null}
ignoreRetriever: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:184

#### Inherited from

```ts theme={null}
BaseCallbackHandler.ignoreRetriever;
```

***

### ~~lc\_kwargs~~

```ts theme={null}
lc_kwargs: SerializedFields;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:179

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_kwargs;
```

***

### ~~lc\_serializable~~

```ts theme={null}
lc_serializable: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:156

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_serializable;
```

***

### ~~name~~

```ts theme={null}
name: string = "GalileoObserveCallback";
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

#### Overrides

```ts theme={null}
BaseCallbackHandler.name;
```

***

### ~~project\_name~~

```ts theme={null}
project_name: string;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

***

### ~~raiseError~~

```ts theme={null}
raiseError: boolean;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:186

#### Inherited from

```ts theme={null}
BaseCallbackHandler.raiseError;
```

***

### ~~version?~~

```ts theme={null}
optional version: string;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

## Accessors

### ~~lc\_aliases~~

#### Get Signature

```ts theme={null}
get lc_aliases():
  | undefined
  | {
[key: string]: string;
};
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:164

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.

##### Returns

\| `undefined`
\| \{
\[`key`: `string`]: `string`;
}

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_aliases;
```

***

### ~~lc\_attributes~~

#### Get Signature

```ts theme={null}
get lc_attributes():
  | undefined
  | {
[key: string]: string;
};
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:161

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

##### Returns

\| `undefined`
\| \{
\[`key`: `string`]: `string`;
}

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_attributes;
```

***

### ~~lc\_id~~

#### Get Signature

```ts theme={null}
get lc_id(): string[];
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:178

The final serialized identifier for the module.

##### Returns

`string`\[]

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_id;
```

***

### ~~lc\_namespace~~

#### Get Signature

```ts theme={null}
get lc_namespace(): ["langchain_core", "callbacks", string];
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:157

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.

##### Returns

\[`"langchain_core"`, `"callbacks"`, `string`]

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_namespace;
```

***

### ~~lc\_secrets~~

#### Get Signature

```ts theme={null}
get lc_secrets():
  | undefined
  | {
[key: string]: string;
};
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:158

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.

##### Returns

\| `undefined`
\| \{
\[`key`: `string`]: `string`;
}

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_secrets;
```

***

### ~~lc\_serializable\_keys~~

#### Get Signature

```ts theme={null}
get lc_serializable_keys(): undefined | string[];
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:167

A manual list of keys that should be serialized.
If not overridden, all fields passed into the constructor will be serialized.

##### Returns

`undefined` | `string`\[]

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_serializable_keys;
```

## Methods

### ~~copy()~~

```ts theme={null}
copy(): BaseCallbackHandler;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:189

#### Returns

`BaseCallbackHandler`

#### Inherited from

```ts theme={null}
BaseCallbackHandler.copy;
```

***

### ~~handleAgentAction()?~~

```ts theme={null}
optional handleAgentAction(
   action: AgentAction,
   runId: string,
   parentRunId?: string,
tags?: string[]): void | Promise<void>;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:115

Called when an agent is about to execute an action,
with the action and the run ID.

#### Parameters

##### action

`AgentAction`

##### runId

`string`

##### parentRunId?

`string`

##### tags?

`string`\[]

#### Returns

`void` | `Promise`\<`void`>

#### Inherited from

```ts theme={null}
BaseCallbackHandler.handleAgentAction;
```

***

### ~~handleAgentEnd()~~

```ts theme={null}
handleAgentEnd(action: undefined | AgentFinish, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called when an agent finishes execution, before it exits.
with the final output and the run ID.

#### Parameters

##### action

`undefined` | `AgentFinish`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleAgentEnd;
```

***

### ~~handleChainEnd()~~

```ts theme={null}
handleChainEnd(outputs: ChainValues, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called at the end of a Chain run, with the outputs and the run ID.

#### Parameters

##### outputs

`ChainValues`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleChainEnd;
```

***

### ~~handleChainError()~~

```ts theme={null}
handleChainError(err: AxiosError, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called if a Chain run encounters an error

#### Parameters

##### err

`AxiosError`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleChainError;
```

***

### ~~handleChainStart()~~

```ts theme={null}
handleChainStart(
   chain: undefined | Serialized,
   inputs: ChainValues,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   metadata?: Record<string, unknown>): void;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called at the start of a Chain run, with the chain name and inputs
and the run ID.

#### Parameters

##### chain

`undefined` | `Serialized`

##### inputs

`ChainValues`

##### runId

`string`

##### parentRunId?

`string`

##### tags?

`string`\[]

##### metadata?

`Record`\<`string`, `unknown`>

#### Returns

`void`

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleChainStart;
```

***

### ~~handleChatModelStart()~~

```ts theme={null}
handleChatModelStart(
   llm: undefined | Serialized,
   messages: BaseMessage[][],
   runId: string,
   parentRunId?: string,
   extraParams?: Record<string, unknown>,
   tags?: string[],
   metadata?: Record<string, unknown>): void;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called at the start of a Chat Model run, with the prompt(s)
and the run ID.

#### Parameters

##### llm

`undefined` | `Serialized`

##### messages

`BaseMessage`\[]\[]

##### runId

`string`

##### parentRunId?

`string`

##### extraParams?

`Record`\<`string`, `unknown`>

##### tags?

`string`\[]

##### metadata?

`Record`\<`string`, `unknown`>

#### Returns

`void`

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleChatModelStart;
```

***

### ~~handleCustomEvent()?~~

```ts theme={null}
optional handleCustomEvent(
   eventName: string,
   data: any,
   runId: string,
   tags?: string[],
   metadata?: Record<string, any>): any;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:127

#### Parameters

##### eventName

`string`

##### data

`any`

##### runId

`string`

##### tags?

`string`\[]

##### metadata?

`Record`\<`string`, `any`>

#### Returns

`any`

#### Inherited from

```ts theme={null}
BaseCallbackHandler.handleCustomEvent;
```

***

### ~~handleLLMEnd()~~

```ts theme={null}
handleLLMEnd(output: LLMResult, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called at the end of an LLM/ChatModel run, with the output and the run ID.

#### Parameters

##### output

`LLMResult`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleLLMEnd;
```

***

### ~~handleLLMError()~~

```ts theme={null}
handleLLMError(err: AxiosError, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called if an LLM/ChatModel run encounters an error

#### Parameters

##### err

`AxiosError`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleLLMError;
```

***

### ~~handleLLMNewToken()~~

```ts theme={null}
handleLLMNewToken(
   token: string,
   idx: NewTokenIndices,
   runId: string): void;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called when LLM generates a new token.

#### Parameters

##### token

`string`

##### idx

`NewTokenIndices`

##### runId

`string`

#### Returns

`void`

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleLLMNewToken;
```

***

### ~~handleLLMStart()~~

```ts theme={null}
handleLLMStart(
   llm: undefined | Serialized,
   prompts: string[],
   runId: string,
   parentRunId?: string,
   extraParams?: Record<string, unknown>,
   tags?: string[],
   metadata?: Record<string, unknown>): void;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called at the start of an LLM or Chat Model run, with the prompt(s)
and the run ID.

#### Parameters

##### llm

`undefined` | `Serialized`

##### prompts

`string`\[]

##### runId

`string`

##### parentRunId?

`string`

##### extraParams?

`Record`\<`string`, `unknown`>

##### tags?

`string`\[]

##### metadata?

`Record`\<`string`, `unknown`>

#### Returns

`void`

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleLLMStart;
```

***

### ~~handleRetrieverEnd()~~

```ts theme={null}
handleRetrieverEnd(documents: DocumentInterface<Record<string, unknown>>[], runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

#### Parameters

##### documents

`DocumentInterface`\<`Record`\<`string`, `unknown`>>\[]

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleRetrieverEnd;
```

***

### ~~handleRetrieverError()~~

```ts theme={null}
handleRetrieverError(err: AxiosError, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

#### Parameters

##### err

`AxiosError`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleRetrieverError;
```

***

### ~~handleRetrieverStart()~~

```ts theme={null}
handleRetrieverStart(
   retriever: undefined | Serialized,
   query: string,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   metadata?: Record<string, unknown>): void;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

#### Parameters

##### retriever

`undefined` | `Serialized`

##### query

`string`

##### runId

`string`

##### parentRunId?

`string`

##### tags?

`string`\[]

##### metadata?

`Record`\<`string`, `unknown`>

#### Returns

`void`

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleRetrieverStart;
```

***

### ~~handleText()?~~

```ts theme={null}
optional handleText(
   text: string,
   runId: string,
   parentRunId?: string,
tags?: string[]): void | Promise<void>;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:110

#### Parameters

##### text

`string`

##### runId

`string`

##### parentRunId?

`string`

##### tags?

`string`\[]

#### Returns

`void` | `Promise`\<`void`>

#### Inherited from

```ts theme={null}
BaseCallbackHandler.handleText;
```

***

### ~~handleToolEnd()~~

```ts theme={null}
handleToolEnd(output: string, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called at the end of a Tool run, with the tool output and the run ID.

#### Parameters

##### output

`string`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleToolEnd;
```

***

### ~~handleToolError()~~

```ts theme={null}
handleToolError(err: AxiosError, runId: string): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called if a Tool run encounters an error

#### Parameters

##### err

`AxiosError`

##### runId

`string`

#### Returns

`Promise`\<`void`>

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleToolError;
```

***

### ~~handleToolStart()~~

```ts theme={null}
handleToolStart(
   tool: undefined | Serialized,
   input: string,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   metadata?: Record<string, unknown>): void;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

Called at the start of a Tool run, with the tool name and input
and the run ID.

#### Parameters

##### tool

`undefined` | `Serialized`

##### input

`string`

##### runId

`string`

##### parentRunId?

`string`

##### tags?

`string`\[]

##### metadata?

`Record`\<`string`, `unknown`>

#### Returns

`void`

#### Overrides

```ts theme={null}
BaseCallbackHandler.handleToolStart;
```

***

### ~~init()~~

```ts theme={null}
init(): Promise<void>;
```

Defined in: [src/observe/callback.ts](https://github.com/rungalileo/galileo-js/blob/main/src/observe/callback.ts)

#### Returns

`Promise`\<`void`>

***

### ~~toJSON()~~

```ts theme={null}
toJSON(): Serialized;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:190

#### Returns

`Serialized`

#### Inherited from

```ts theme={null}
BaseCallbackHandler.toJSON;
```

***

### ~~toJSONNotImplemented()~~

```ts theme={null}
toJSONNotImplemented(): SerializedNotImplemented;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:191

#### Returns

`SerializedNotImplemented`

#### Inherited from

```ts theme={null}
BaseCallbackHandler.toJSONNotImplemented;
```

***

### ~~fromMethods()~~

```ts theme={null}
static fromMethods(methods: BaseCallbackHandlerMethodsClass): object;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:192

#### Parameters

##### methods

`BaseCallbackHandlerMethodsClass`

#### Returns

##### ~~awaitHandlers~~

```ts theme={null}
awaitHandlers: boolean;
```

##### ~~ignoreAgent~~

```ts theme={null}
ignoreAgent: boolean;
```

##### ~~ignoreChain~~

```ts theme={null}
ignoreChain: boolean;
```

##### ~~ignoreCustomEvent~~

```ts theme={null}
ignoreCustomEvent: boolean;
```

##### ~~ignoreLLM~~

```ts theme={null}
ignoreLLM: boolean;
```

##### ~~ignoreRetriever~~

```ts theme={null}
ignoreRetriever: boolean;
```

##### ~~lc\_aliases~~

```ts theme={null}
readonly lc_aliases:
  | undefined
  | {
[key: string]: string;
};
```

##### ~~lc\_attributes~~

```ts theme={null}
readonly lc_attributes:
  | undefined
  | {
[key: string]: string;
};
```

##### ~~lc\_id~~

```ts theme={null}
readonly lc_id: string[];
```

The final serialized identifier for the module.

##### ~~lc\_kwargs~~

```ts theme={null}
lc_kwargs: SerializedFields;
```

##### ~~lc\_namespace~~

```ts theme={null}
readonly lc_namespace: ["langchain_core", "callbacks", string];
```

##### ~~lc\_secrets~~

```ts theme={null}
readonly lc_secrets:
  | undefined
  | {
[key: string]: string;
};
```

##### ~~lc\_serializable~~

```ts theme={null}
lc_serializable: boolean;
```

##### ~~lc\_serializable\_keys~~

```ts theme={null}
readonly lc_serializable_keys: undefined | string[];
```

##### ~~name~~

```ts theme={null}
name: string;
```

##### ~~raiseError~~

```ts theme={null}
raiseError: boolean;
```

##### ~~copy()~~

```ts theme={null}
copy(): BaseCallbackHandler;
```

###### Returns

`BaseCallbackHandler`

##### ~~handleAgentAction()?~~

```ts theme={null}
optional handleAgentAction(
   action: AgentAction,
   runId: string,
   parentRunId?: string,
tags?: string[]): void | Promise<void>;
```

Called when an agent is about to execute an action,
with the action and the run ID.

###### Parameters

###### action

`AgentAction`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### Returns

`void` | `Promise`\<`void`>

##### ~~handleAgentEnd()?~~

```ts theme={null}
optional handleAgentEnd(
   action: AgentFinish,
   runId: string,
   parentRunId?: string,
tags?: string[]): void | Promise<void>;
```

Called when an agent finishes execution, before it exits.
with the final output and the run ID.

###### Parameters

###### action

`AgentFinish`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### Returns

`void` | `Promise`\<`void`>

##### ~~handleChainEnd()?~~

```ts theme={null}
optional handleChainEnd(
   outputs: ChainValues,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   kwargs?: object): any;
```

Called at the end of a Chain run, with the outputs and the run ID.

###### Parameters

###### outputs

`ChainValues`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### kwargs?

###### inputs?

`Record`\<`string`, `unknown`>

###### Returns

`any`

##### ~~handleChainError()?~~

```ts theme={null}
optional handleChainError(
   err: any,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   kwargs?: object): any;
```

Called if a Chain run encounters an error

###### Parameters

###### err

`any`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### kwargs?

###### inputs?

`Record`\<`string`, `unknown`>

###### Returns

`any`

##### ~~handleChainStart()?~~

```ts theme={null}
optional handleChainStart(
   chain: Serialized,
   inputs: ChainValues,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   metadata?: Record<string, unknown>,
   runType?: string,
   runName?: string): any;
```

Called at the start of a Chain run, with the chain name and inputs
and the run ID.

###### Parameters

###### chain

`Serialized`

###### inputs

`ChainValues`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### metadata?

`Record`\<`string`, `unknown`>

###### runType?

`string`

###### runName?

`string`

###### Returns

`any`

##### ~~handleChatModelStart()?~~

```ts theme={null}
optional handleChatModelStart(
   llm: Serialized,
   messages: BaseMessage[][],
   runId: string,
   parentRunId?: string,
   extraParams?: Record<string, unknown>,
   tags?: string[],
   metadata?: Record<string, unknown>,
   runName?: string): any;
```

Called at the start of a Chat Model run, with the prompt(s)
and the run ID.

###### Parameters

###### llm

`Serialized`

###### messages

`BaseMessage`\[]\[]

###### runId

`string`

###### parentRunId?

`string`

###### extraParams?

`Record`\<`string`, `unknown`>

###### tags?

`string`\[]

###### metadata?

`Record`\<`string`, `unknown`>

###### runName?

`string`

###### Returns

`any`

##### ~~handleCustomEvent()?~~

```ts theme={null}
optional handleCustomEvent(
   eventName: string,
   data: any,
   runId: string,
   tags?: string[],
   metadata?: Record<string, any>): any;
```

###### Parameters

###### eventName

`string`

###### data

`any`

###### runId

`string`

###### tags?

`string`\[]

###### metadata?

`Record`\<`string`, `any`>

###### Returns

`any`

##### ~~handleLLMEnd()?~~

```ts theme={null}
optional handleLLMEnd(
   output: LLMResult,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   extraParams?: Record<string, unknown>): any;
```

Called at the end of an LLM/ChatModel run, with the output and the run ID.

###### Parameters

###### output

`LLMResult`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### extraParams?

`Record`\<`string`, `unknown`>

###### Returns

`any`

##### ~~handleLLMError()?~~

```ts theme={null}
optional handleLLMError(
   err: any,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   extraParams?: Record<string, unknown>): any;
```

Called if an LLM/ChatModel run encounters an error

###### Parameters

###### err

`any`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### extraParams?

`Record`\<`string`, `unknown`>

###### Returns

`any`

##### ~~handleLLMNewToken()?~~

```ts theme={null}
optional handleLLMNewToken(
   token: string,
   idx: NewTokenIndices,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   fields?: HandleLLMNewTokenCallbackFields): any;
```

Called when an LLM/ChatModel in `streaming` mode produces a new token

###### Parameters

###### token

`string`

###### idx

`NewTokenIndices`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### fields?

`HandleLLMNewTokenCallbackFields`

###### Returns

`any`

##### ~~handleLLMStart()?~~

```ts theme={null}
optional handleLLMStart(
   llm: Serialized,
   prompts: string[],
   runId: string,
   parentRunId?: string,
   extraParams?: Record<string, unknown>,
   tags?: string[],
   metadata?: Record<string, unknown>,
   runName?: string): any;
```

Called at the start of an LLM or Chat Model run, with the prompt(s)
and the run ID.

###### Parameters

###### llm

`Serialized`

###### prompts

`string`\[]

###### runId

`string`

###### parentRunId?

`string`

###### extraParams?

`Record`\<`string`, `unknown`>

###### tags?

`string`\[]

###### metadata?

`Record`\<`string`, `unknown`>

###### runName?

`string`

###### Returns

`any`

##### ~~handleRetrieverEnd()?~~

```ts theme={null}
optional handleRetrieverEnd(
   documents: DocumentInterface<Record<string, any>>[],
   runId: string,
   parentRunId?: string,
   tags?: string[]): any;
```

###### Parameters

###### documents

`DocumentInterface`\<`Record`\<`string`, `any`>>\[]

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### Returns

`any`

##### ~~handleRetrieverError()?~~

```ts theme={null}
optional handleRetrieverError(
   err: any,
   runId: string,
   parentRunId?: string,
   tags?: string[]): any;
```

###### Parameters

###### err

`any`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### Returns

`any`

##### ~~handleRetrieverStart()?~~

```ts theme={null}
optional handleRetrieverStart(
   retriever: Serialized,
   query: string,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   metadata?: Record<string, unknown>,
   name?: string): any;
```

###### Parameters

###### retriever

`Serialized`

###### query

`string`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### metadata?

`Record`\<`string`, `unknown`>

###### name?

`string`

###### Returns

`any`

##### ~~handleText()?~~

```ts theme={null}
optional handleText(
   text: string,
   runId: string,
   parentRunId?: string,
tags?: string[]): void | Promise<void>;
```

###### Parameters

###### text

`string`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### Returns

`void` | `Promise`\<`void`>

##### ~~handleToolEnd()?~~

```ts theme={null}
optional handleToolEnd(
   output: any,
   runId: string,
   parentRunId?: string,
   tags?: string[]): any;
```

Called at the end of a Tool run, with the tool output and the run ID.

###### Parameters

###### output

`any`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### Returns

`any`

##### ~~handleToolError()?~~

```ts theme={null}
optional handleToolError(
   err: any,
   runId: string,
   parentRunId?: string,
   tags?: string[]): any;
```

Called if a Tool run encounters an error

###### Parameters

###### err

`any`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### Returns

`any`

##### ~~handleToolStart()?~~

```ts theme={null}
optional handleToolStart(
   tool: Serialized,
   input: string,
   runId: string,
   parentRunId?: string,
   tags?: string[],
   metadata?: Record<string, unknown>,
   runName?: string): any;
```

Called at the start of a Tool run, with the tool name and input
and the run ID.

###### Parameters

###### tool

`Serialized`

###### input

`string`

###### runId

`string`

###### parentRunId?

`string`

###### tags?

`string`\[]

###### metadata?

`Record`\<`string`, `unknown`>

###### runName?

`string`

###### Returns

`any`

##### ~~toJSON()~~

```ts theme={null}
toJSON(): Serialized;
```

###### Returns

`Serialized`

##### ~~toJSONNotImplemented()~~

```ts theme={null}
toJSONNotImplemented(): SerializedNotImplemented;
```

###### Returns

`SerializedNotImplemented`

#### Inherited from

```ts theme={null}
BaseCallbackHandler.fromMethods;
```

***

### ~~lc\_name()~~

```ts theme={null}
static lc_name(): string;
```

Defined in: node\_modules/@langchain/core/dist/callbacks/base.d.ts:174

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.

#### Returns

`string`

#### Inherited from

```ts theme={null}
BaseCallbackHandler.lc_name;
```
