Class: CallbackManager
Implements
CallbackManagerMethods
Constructors
constructor
• new CallbackManager(handlers?
): CallbackManager
Parameters
Name | Type |
---|---|
handlers? | Partial <CallbackManagerMethods > |
Returns
Defined in
packages/core/src/callbacks/CallbackManager.ts:130
Properties
#handlers
• Private
#handlers: Map
<keyof LlamaIndexEventMaps
, EventHandler
<CustomEvent
<any
>>[]>
Defined in
packages/core/src/callbacks/CallbackManager.ts:128
Accessors
onLLMStream
• get
onLLMStream(): (params
: StreamCallbackResponse
) => void
| Promise
<void
>
Returns
fn
▸ (params
): void
| Promise
<void
>
Parameters
Name | Type |
---|---|
params | StreamCallbackResponse |
Returns
void
| Promise
<void
>
Deprecated
will be removed in the next major version
Implementation of
CallbackManagerMethods.onLLMStream
Defined in
packages/core/src/callbacks/CallbackManager.ts:87
• set
onLLMStream(_
): void
Parameters
Name | Type |
---|---|
_ | never |
Returns
void
Deprecated
will be removed in the next major version
Implementation of
CallbackManagerMethods.onLLMStream
Defined in
packages/core/src/callbacks/CallbackManager.ts:117
onRetrieve
• get
onRetrieve(): (params
: RetrievalCallbackResponse
) => void
| Promise
<void
>
Returns
fn
▸ (params
): void
| Promise
<void
>
Parameters
Name | Type |
---|---|
params | RetrievalCallbackResponse |
Returns
void
| Promise
<void
>
Deprecated
will be removed in the next major version
Implementation of
CallbackManagerMethods.onRetrieve
Defined in
packages/core/src/callbacks/CallbackManager.ts:102
• set
onRetrieve(_
): void
Parameters
Name | Type |
---|---|
_ | never |
Returns
void
Deprecated
will be removed in the next major version
Implementation of
CallbackManagerMethods.onRetrieve
Defined in
packages/core/src/callbacks/CallbackManager.ts:124
Methods
dispatchEvent
▸ dispatchEvent<K
>(event
, detail
): void
Type parameters
Name | Type |
---|---|
K | extends keyof LlamaIndexEventMaps |
Parameters
Name | Type |
---|---|
event | K |
detail | LlamaIndexEventMaps [K ]["detail" ] |
Returns
void
Defined in
packages/core/src/callbacks/CallbackManager.ts:163
off
▸ off<K
, H
>(event
, handler
): undefined
| CallbackManager
Type parameters
Name | Type |
---|---|
K | extends keyof LlamaIndexEventMaps |
H | extends EventHandler <LlamaIndexEventMaps [K ]> |
Parameters
Name | Type |
---|---|
event | K |
handler | H |
Returns
undefined
| CallbackManager
Defined in
packages/core/src/callbacks/CallbackManager.ts:148
on
▸ on<K
, H
>(event
, handler
): CallbackManager
Type parameters
Name | Type |
---|---|
K | extends keyof LlamaIndexEventMaps |
H | extends EventHandler <LlamaIndexEventMaps [K ]> |
Parameters
Name | Type |
---|---|
event | K |
handler | H |