Class: Portkey
Hierarchy
-
BaseLLM
↳
Portkey
Constructors
constructor
• new Portkey(init?
): Portkey
Parameters
Name | Type |
---|---|
init? | Partial <Portkey > |
Returns
Overrides
BaseLLM.constructor
Defined in
packages/core/src/llm/LLM.ts:293
Properties
apiKey
• Optional
apiKey: string
= undefined
Defined in
packages/core/src/llm/LLM.ts:287
baseURL
• Optional
baseURL: string
= undefined
Defined in
packages/core/src/llm/LLM.ts:288
llms
• Optional
llms: null
| [LLMOptions
] = undefined
Defined in
packages/core/src/llm/LLM.ts:290
mode
• Optional
mode: string
= undefined
Defined in
packages/core/src/llm/LLM.ts:289
session
• session: PortkeySession
Defined in
packages/core/src/llm/LLM.ts:291
Accessors
metadata
• get
metadata(): LLMMetadata
Returns
Overrides
BaseLLM.metadata
Defined in
packages/core/src/llm/LLM.ts:307
Methods
chat
▸ chat(params
): Promise
<AsyncIterable
<{ delta
: string
; options?
: Record
<string
, unknown
> }>>
Parameters
Name | Type |
---|---|
params | LLMChatParamsStreaming <Record <string , unknown >> |
Returns
Promise
<AsyncIterable
<{ delta
: string
; options?
: Record
<string
, unknown
> }>>
Overrides
BaseLLM.chat
Defined in
packages/core/src/llm/LLM.ts:311
▸ chat(params
): Promise
<ChatResponse
<Record
<string
, unknown
>>>
Parameters
Name | Type |
---|---|
params | LLMChatParamsNonStreaming <Record <string , unknown >> |
Returns
Promise
<ChatResponse
<Record
<string
, unknown
>>>
Overrides
BaseLLM.chat
Defined in
packages/core/src/llm/LLM.ts:314
complete
▸ complete(params
): Promise
<AsyncIterable
<CompletionResponse
>>
Parameters
Name | Type |
---|---|
params | LLMCompletionParamsStreaming |
Returns
Promise
<AsyncIterable
<CompletionResponse
>>
Inherited from
BaseLLM.complete
Defined in
packages/core/src/llm/base.ts:27
▸ complete(params
): Promise
<CompletionResponse
>
Parameters
Name | Type |
---|---|
params | LLMCompletionParamsNonStreaming |
Returns
Promise
<CompletionResponse
>
Inherited from
BaseLLM.complete
Defined in
packages/core/src/llm/base.ts:30