Pular para o conteúdo principal

Function: wrapLLMEvent()

Internal

wrapLLMEvent<AdditionalChatOptions, AdditionalMessageOptions>(originalMethod, _context): (this, ...params) => Promise <ChatResponse<AdditionalMessageOptions> | AsyncIterable <ChatResponseChunk<AdditionalMessageOptions>>>

Type parameters

AdditionalChatOptions extends object = object

AdditionalMessageOptions extends object = object

Parameters

originalMethod

_context: ClassMethodDecoratorContext<unknown, (this, ...args) => any>

Returns

Function

Parameters

this: LLM<AdditionalChatOptions, AdditionalMessageOptions>

• ...params: [LLMChatParamsStreaming<AdditionalChatOptions, object> | LLMChatParamsNonStreaming<AdditionalChatOptions, object>]

Returns

Promise <ChatResponse<AdditionalMessageOptions> | AsyncIterable <ChatResponseChunk<AdditionalMessageOptions>>>

Source

packages/llamaindex/src/llm/utils.ts:134