Ga naar hoofdinhoud

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:292

Properties

apiKey

Optional apiKey: string = undefined

Defined in

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


baseURL

Optional baseURL: string = undefined

Defined in

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


llms

Optional llms: null | [LLMOptions] = undefined

Defined in

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


mode

Optional mode: string = undefined

Defined in

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


session

session: PortkeySession

Defined in

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

Accessors

metadata

get metadata(): LLMMetadata

Returns

LLMMetadata

Overrides

BaseLLM.metadata

Defined in

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

Methods

chat

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

Parameters

NameType
paramsLLMChatParamsStreaming<Record<string, unknown>>

Returns

Promise<AsyncIterable<ChatResponseChunk>>

Overrides

BaseLLM.chat

Defined in

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

chat(params): Promise<ChatResponse>

Parameters

NameType
paramsLLMChatParamsNonStreaming<Record<string, unknown>>

Returns

Promise<ChatResponse>

Overrides

BaseLLM.chat

Defined in

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


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:23

complete(params): Promise<CompletionResponse>

Parameters

NameType
paramsLLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Inherited from

BaseLLM.complete

Defined in

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


streamChat

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

Parameters

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

Returns

AsyncIterable<ChatResponseChunk>

Defined in

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