Pular para o conteúdo principal

Class: Portkey

Hierarchy

  • BaseLLM

    Portkey

Constructors

constructor

new Portkey(init?): Portkey

Parameters

NameType
init?Partial<Portkey>

Returns

Portkey

Overrides

BaseLLM.constructor

Defined in

packages/core/src/llm/LLM.ts:751

Properties

apiKey

Optional apiKey: string = undefined

Defined in

packages/core/src/llm/LLM.ts:745


baseURL

Optional baseURL: string = undefined

Defined in

packages/core/src/llm/LLM.ts:746


llms

Optional llms: null | [LLMOptions] = undefined

Defined in

packages/core/src/llm/LLM.ts:748


mode

Optional mode: string = undefined

Defined in

packages/core/src/llm/LLM.ts:747


session

session: PortkeySession

Defined in

packages/core/src/llm/LLM.ts:749

Accessors

metadata

get metadata(): LLMMetadata

Returns

LLMMetadata

Overrides

BaseLLM.metadata

Defined in

packages/core/src/llm/LLM.ts:765

Methods

chat

chat(params): Promise<AsyncIterable<ChatResponseChunk>>

Parameters

NameType
paramsLLMChatParamsStreaming

Returns

Promise<AsyncIterable<ChatResponseChunk>>

Overrides

BaseLLM.chat

Defined in

packages/core/src/llm/LLM.ts:769

chat(params): Promise<ChatResponse>

Parameters

NameType
paramsLLMChatParamsNonStreaming

Returns

Promise<ChatResponse>

Overrides

BaseLLM.chat

Defined in

packages/core/src/llm/LLM.ts:772


complete

complete(params): Promise<AsyncIterable<CompletionResponse>>

Parameters

NameType
paramsLLMCompletionParamsStreaming

Returns

Promise<AsyncIterable<CompletionResponse>>

Inherited from

BaseLLM.complete

Defined in

packages/core/src/llm/base.ts:17

complete(params): Promise<CompletionResponse>

Parameters

NameType
paramsLLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Inherited from

BaseLLM.complete

Defined in

packages/core/src/llm/base.ts:20


streamChat

streamChat(messages, params?): AsyncIterable<ChatResponseChunk>

Parameters

NameType
messagesChatMessage[]
params?Record<string, any>

Returns

AsyncIterable<ChatResponseChunk>

Defined in

packages/core/src/llm/LLM.ts:793