انتقل إلى المحتوى الرئيسي

Class: FireworksLLM

Hierarchy

Constructors

constructor

new FireworksLLM(init?): FireworksLLM

Parameters

NameType
init?Partial<OpenAI>

Returns

FireworksLLM

Overrides

OpenAI.constructor

Defined in

packages/core/src/llm/fireworks.ts:5

Properties

additionalChatOptions

Optional additionalChatOptions: OpenAIAdditionalChatOptions

Inherited from

OpenAI.additionalChatOptions

Defined in

packages/core/src/llm/open_ai.ts:176


additionalSessionOptions

Optional additionalSessionOptions: Omit<Partial<ClientOptions>, "apiKey" | "timeout" | "maxRetries">

Inherited from

OpenAI.additionalSessionOptions

Defined in

packages/core/src/llm/open_ai.ts:183


apiKey

Optional apiKey: string = undefined

Inherited from

OpenAI.apiKey

Defined in

packages/core/src/llm/open_ai.ts:179


maxRetries

maxRetries: number

Inherited from

OpenAI.maxRetries

Defined in

packages/core/src/llm/open_ai.ts:180


maxTokens

Optional maxTokens: number

Inherited from

OpenAI.maxTokens

Defined in

packages/core/src/llm/open_ai.ts:175


model

model: string

Inherited from

OpenAI.model

Defined in

packages/core/src/llm/open_ai.ts:172


session

session: OpenAISession

Inherited from

OpenAI.session

Defined in

packages/core/src/llm/open_ai.ts:182


temperature

temperature: number

Inherited from

OpenAI.temperature

Defined in

packages/core/src/llm/open_ai.ts:173


timeout

Optional timeout: number

Inherited from

OpenAI.timeout

Defined in

packages/core/src/llm/open_ai.ts:181


topP

topP: number

Inherited from

OpenAI.topP

Defined in

packages/core/src/llm/open_ai.ts:174

Accessors

metadata

get metadata(): LLMMetadata & OpenAIAdditionalMetadata

Returns

LLMMetadata & OpenAIAdditionalMetadata

Inherited from

OpenAI.metadata

Defined in

packages/core/src/llm/open_ai.ts:241

Methods

chat

chat(params): Promise<AsyncIterable<{ delta: string ; options?: OpenAIAdditionalMessageOptions }>>

Parameters

NameType
paramsLLMChatParamsStreaming<OpenAIAdditionalChatOptions>

Returns

Promise<AsyncIterable<{ delta: string ; options?: OpenAIAdditionalMessageOptions }>>

Inherited from

OpenAI.chat

Defined in

packages/core/src/llm/open_ai.ts:321

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

Parameters

NameType
paramsLLMChatParamsNonStreaming<OpenAIAdditionalChatOptions>

Returns

Promise<ChatResponse<OpenAIAdditionalMessageOptions>>

Inherited from

OpenAI.chat

Defined in

packages/core/src/llm/open_ai.ts:324


complete

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

Parameters

NameType
paramsLLMCompletionParamsStreaming

Returns

Promise<AsyncIterable<CompletionResponse>>

Inherited from

OpenAI.complete

Defined in

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

complete(params): Promise<CompletionResponse>

Parameters

NameType
paramsLLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Inherited from

OpenAI.complete

Defined in

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


streamChat

streamChat(baseRequestParams): AsyncIterable<{ delta: string ; options?: OpenAIAdditionalMessageOptions }>

Parameters

NameType
baseRequestParamsChatCompletionCreateParams

Returns

AsyncIterable<{ delta: string ; options?: OpenAIAdditionalMessageOptions }>

Inherited from

OpenAI.streamChat

Defined in

packages/core/src/llm/open_ai.ts:378


toOpenAIMessage

toOpenAIMessage(messages): ChatCompletionMessageParam[]

Parameters

NameType
messages{ content: MessageContent ; options?: OpenAIAdditionalMessageOptions ; role: MessageType }[]

Returns

ChatCompletionMessageParam[]

Inherited from

OpenAI.toOpenAIMessage

Defined in

packages/core/src/llm/open_ai.ts:274


toOpenAIRole

toOpenAIRole(messageType): ChatCompletionRole

Parameters

NameType
messageTypeMessageType

Returns

ChatCompletionRole

Inherited from

OpenAI.toOpenAIRole

Defined in

packages/core/src/llm/open_ai.ts:257


toTool

toTool(tool): ChatCompletionTool

Parameters

NameType
toolBaseTool

Returns

ChatCompletionTool

Inherited from

OpenAI.toTool

Defined in

packages/core/src/llm/open_ai.ts:413