Class: TogetherLLM
Hierarchy
-
↳
TogetherLLM
Constructors
constructor
• new TogetherLLM(init?
): TogetherLLM
Parameters
Name | Type |
---|---|
init? | Partial <OpenAI > |
Returns
Overrides
Defined in
packages/core/src/llm/together.ts:5
Properties
additionalChatOptions
• Optional
additionalChatOptions: OpenAIAdditionalChatOptions
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:160
additionalSessionOptions
• Optional
additionalSessionOptions: Omit
<Partial
<ClientOptions
>, "apiKey"
| "timeout"
| "maxRetries"
>
Inherited from
OpenAI.additionalSessionOptions
Defined in
packages/core/src/llm/open_ai.ts:167
apiKey
• Optional
apiKey: string
= undefined
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:163
maxRetries
• maxRetries: number
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:164
maxTokens
• Optional
maxTokens: number
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:159
model
• model: string
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:156
session
• session: OpenAISession
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:166
temperature
• temperature: number
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:157
timeout
• Optional
timeout: number
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:165
topP
• topP: number
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:158
Accessors
metadata
• get
metadata(): LLMMetadata
& OpenAIAdditionalMetadata
Returns
LLMMetadata
& OpenAIAdditionalMetadata
Inherited from
OpenAI.metadata
Defined in
packages/core/src/llm/open_ai.ts:225
Methods
chat
▸ chat(params
): Promise
<AsyncIterable
<ChatResponseChunk
>>
Parameters
Name | Type |
---|---|
params | LLMChatParamsStreaming <OpenAIAdditionalChatOptions > |
Returns
Promise
<AsyncIterable
<ChatResponseChunk
>>
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:277
▸ chat(params
): Promise
<ChatResponse
>
Parameters
Name | Type |
---|---|
params | LLMChatParamsNonStreaming <OpenAIAdditionalChatOptions > |
Returns
Promise
<ChatResponse
>
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:280
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:23
▸ complete(params
): Promise
<CompletionResponse
>
Parameters
Name | Type |
---|---|
params | LLMCompletionParamsNonStreaming |
Returns
Promise
<CompletionResponse
>
Inherited from
Defined in
packages/core/src/llm/base.ts:26
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/open_ai.ts:241
streamChat
▸ streamChat(baseRequestParams
): AsyncIterable
<ChatResponseChunk
>
Parameters
Name | Type |
---|---|
baseRequestParams | ChatCompletionCreateParams |
Returns
AsyncIterable
<ChatResponseChunk
>
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:330
toOpenAIMessage
▸ toOpenAIMessage(messages
): { content
: MessageContent
= message.content; role
: "function"
| "user"
| "assistant"
| "system"
| "tool"
}[]
Parameters
Name | Type |
---|---|
messages | ChatMessage [] |
Returns
{ content
: MessageContent
= message.content; role
: "function"
| "user"
| "assistant"
| "system"
| "tool"
}[]
Inherited from
Defined in
packages/core/src/llm/open_ai.ts:260
toTool
▸ toTool(tool
): ChatCompletionTool
Parameters
Name | Type |
---|---|
tool | BaseTool |
Returns
ChatCompletionTool