Class: FireworksLLM
OpenAI LLM implementation
Hierarchy
-
↳
FireworksLLM
Constructors
constructor
• new FireworksLLM(init?
): FireworksLLM
Parameters
Name | Type |
---|---|
init? | Partial <OpenAI > |
Returns
Overrides
Defined in
packages/core/src/llm/fireworks.ts:5
Properties
additionalChatOptions
• Optional
additionalChatOptions: Omit
<Partial
<ChatCompletionCreateParams
>, "messages"
| "stream"
| "max_tokens"
| "model"
| "temperature"
| "top_p"
| "tools"
| "toolChoice"
>
Inherited from
Defined in
packages/core/src/llm/LLM.ts:82
additionalSessionOptions
• Optional
additionalSessionOptions: Omit
<Partial
<ClientOptions
>, "apiKey"
| "timeout"
| "maxRetries"
>
Inherited from
OpenAI.additionalSessionOptions
Defined in
packages/core/src/llm/LLM.ts:99
apiKey
• Optional
apiKey: string
= undefined
Inherited from
Defined in
packages/core/src/llm/LLM.ts:95
maxRetries
• maxRetries: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:96
maxTokens
• Optional
maxTokens: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:81
model
• model: string
Inherited from
Defined in
packages/core/src/llm/LLM.ts:78
session
• session: OpenAISession
Inherited from
Defined in
packages/core/src/llm/LLM.ts:98
temperature
• temperature: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:79
timeout
• Optional
timeout: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:97
topP
• topP: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:80
Accessors
metadata
• get
metadata(): Object
Returns
Object
Name | Type |
---|---|
contextWindow | number |
isFunctionCallingModel | boolean |
maxTokens | undefined | number |
model | string |
temperature | number |
tokenizer | CL100K_BASE |
topP | number |
Inherited from
OpenAI.metadata
Defined in
packages/core/src/llm/LLM.ts:157
Methods
chat
▸ chat(params
): Promise
<AsyncIterable
<ChatResponseChunk
>>
Parameters
Name | Type |
---|---|
params | LLMChatParamsStreaming |
Returns
Promise
<AsyncIterable
<ChatResponseChunk
>>
Inherited from
Defined in
packages/core/src/llm/LLM.ts:209
▸ chat(params
): Promise
<ChatResponse
>
Parameters
Name | Type |
---|---|
params | LLMChatParamsNonStreaming |
Returns
Promise
<ChatResponse
>
Inherited from
Defined in
packages/core/src/llm/LLM.ts:212
complete
▸ complete(params
): Promise
<AsyncIterable
<CompletionResponse
>>
Parameters
Name | Type |
---|---|
params | LLMCompletionParamsStreaming |
Returns
Promise
<AsyncIterable
<CompletionResponse
>>
Inherited from
Defined in
packages/core/src/llm/base.ts:17
▸ complete(params
): Promise
<CompletionResponse
>
Parameters
Name | Type |
---|---|
params | LLMCompletionParamsNonStreaming |
Returns
Promise
<CompletionResponse
>
Inherited from
Defined in
packages/core/src/llm/base.ts:20
mapMessageType
▸ mapMessageType(messageType
): "function"
| "user"
| "assistant"
| "system"
| "tool"
Parameters
Name | Type |
---|---|
messageType | MessageType |
Returns
"function"
| "user"
| "assistant"
| "system"
| "tool"
Inherited from
Defined in
packages/core/src/llm/LLM.ts:173
streamChat
▸ streamChat(«destructured»
): AsyncIterable
<ChatResponseChunk
>
Parameters
Name | Type |
---|---|
«destructured» | LLMChatParamsStreaming |
Returns
AsyncIterable
<ChatResponseChunk
>
Inherited from
Defined in
packages/core/src/llm/LLM.ts:259
toOpenAIMessage
▸ toOpenAIMessage(messages
): { content
: any
= message.content; role
: "function"
| "user"
| "assistant"
| "system"
| "tool"
}[]
Parameters
Name | Type |
---|---|
messages | ChatMessage [] |
Returns
{ content
: any
= message.content; role
: "function"
| "user"
| "assistant"
| "system"
| "tool"
}[]