メインコンテンツまでスキップ

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/portkey.ts:78

Properties

apiKey

Optional apiKey: string = undefined

Defined in

packages/core/src/llm/portkey.ts:72


baseURL

Optional baseURL: string = undefined

Defined in

packages/core/src/llm/portkey.ts:73


llms

Optional llms: null | [LLMOptions] = undefined

Defined in

packages/core/src/llm/portkey.ts:75


mode

Optional mode: string = undefined

Defined in

packages/core/src/llm/portkey.ts:74


session

session: PortkeySession

Defined in

packages/core/src/llm/portkey.ts:76

Accessors

metadata

get metadata(): LLMMetadata

Returns

LLMMetadata

Overrides

BaseLLM.metadata

Defined in

packages/core/src/llm/portkey.ts:92

Methods

chat

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

Parameters

NameType
paramsLLMChatParamsStreaming<object, object>

Returns

Promise<AsyncIterable<ChatResponseChunk>>

Overrides

BaseLLM.chat

Defined in

packages/core/src/llm/portkey.ts:96

chat(params): Promise<ChatResponse<object>>

Parameters

NameType
paramsLLMChatParamsNonStreaming<object, object>

Returns

Promise<ChatResponse<object>>

Overrides

BaseLLM.chat

Defined in

packages/core/src/llm/portkey.ts:99


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

complete(params): Promise<CompletionResponse>

Parameters

NameType
paramsLLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Inherited from

BaseLLM.complete

Defined in

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


streamChat

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

Parameters

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

Returns

AsyncIterable<ChatResponseChunk>

Defined in

packages/core/src/llm/portkey.ts:123