Nhảy tới nội dung

Class: TogetherLLM

Hierarchy

Constructors

constructor

new TogetherLLM(init?): TogetherLLM

Parameters

NameType
init?Partial<OpenAI>

Returns

TogetherLLM

Overrides

OpenAI.constructor

Defined in

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

Properties

additionalChatOptions

Optional additionalChatOptions: OpenAIAdditionalChatOptions

Inherited from

OpenAI.additionalChatOptions

Defined in

packages/core/src/llm/openai.ts:167


additionalSessionOptions

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

Inherited from

OpenAI.additionalSessionOptions

Defined in

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


apiKey

Optional apiKey: string = undefined

Inherited from

OpenAI.apiKey

Defined in

packages/core/src/llm/openai.ts:170


maxRetries

maxRetries: number

Inherited from

OpenAI.maxRetries

Defined in

packages/core/src/llm/openai.ts:171


maxTokens

Optional maxTokens: number

Inherited from

OpenAI.maxTokens

Defined in

packages/core/src/llm/openai.ts:166


model

model: string

Inherited from

OpenAI.model

Defined in

packages/core/src/llm/openai.ts:163


session

session: OpenAISession

Inherited from

OpenAI.session

Defined in

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


temperature

temperature: number

Inherited from

OpenAI.temperature

Defined in

packages/core/src/llm/openai.ts:164


timeout

Optional timeout: number

Inherited from

OpenAI.timeout

Defined in

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


topP

topP: number

Inherited from

OpenAI.topP

Defined in

packages/core/src/llm/openai.ts:165

Accessors

metadata

get metadata(): LLMMetadata

Returns

LLMMetadata

Inherited from

OpenAI.metadata

Defined in

packages/core/src/llm/openai.ts:236


supportToolCall

get supportToolCall(): boolean

Returns

boolean

Inherited from

OpenAI.supportToolCall

Defined in

packages/core/src/llm/openai.ts:232

Methods

chat

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

Parameters

NameType
paramsLLMChatParamsStreaming<OpenAIAdditionalChatOptions, ToolCallLLMMessageOptions>

Returns

Promise<AsyncIterable<ChatResponseChunk<ToolCallLLMMessageOptions>>>

Inherited from

OpenAI.chat

Defined in

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

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

Parameters

NameType
paramsLLMChatParamsNonStreaming<OpenAIAdditionalChatOptions, ToolCallLLMMessageOptions>

Returns

Promise<ChatResponse<ToolCallLLMMessageOptions>>

Inherited from

OpenAI.chat

Defined in

packages/core/src/llm/openai.ts:319


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

complete(params): Promise<CompletionResponse>

Parameters

NameType
paramsLLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Inherited from

OpenAI.complete

Defined in

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


streamChat

streamChat(baseRequestParams): AsyncIterable<ChatResponseChunk<ToolCallLLMMessageOptions>>

Parameters

NameType
baseRequestParamsChatCompletionCreateParams

Returns

AsyncIterable<ChatResponseChunk<ToolCallLLMMessageOptions>>

Inherited from

OpenAI.streamChat

Defined in

packages/core/src/llm/openai.ts:394


toOpenAIMessage

toOpenAIMessage(messages): ChatCompletionMessageParam[]

Parameters

NameType
messagesChatMessage<ToolCallLLMMessageOptions>[]

Returns

ChatCompletionMessageParam[]

Inherited from

OpenAI.toOpenAIMessage

Defined in

packages/core/src/llm/openai.ts:264


toOpenAIRole

toOpenAIRole(messageType): ChatCompletionRole

Parameters

NameType
messageTypeMessageType

Returns

ChatCompletionRole

Inherited from

OpenAI.toOpenAIRole

Defined in

packages/core/src/llm/openai.ts:251


toTool

toTool(tool): ChatCompletionTool

Parameters

NameType
toolBaseTool<any>

Returns

ChatCompletionTool

Inherited from

OpenAI.toTool

Defined in

packages/core/src/llm/openai.ts:472