Class: TogetherLLM
OpenAI LLM implementation
Hierarchy
↳
TogetherLLM
Constructors
constructor
• new TogetherLLM(init?
)
Parameters
Name | Type |
---|---|
init? | Partial <OpenAI > |
Overrides
Defined in
packages/core/src/llm/together.ts:4
Properties
additionalChatOptions
• Optional
additionalChatOptions: Omit
<Partial
<ChatCompletionCreateParams
>, "stream"
| "max_tokens"
| "messages"
| "model"
| "temperature"
| "top_p"
>
Inherited from
Defined in
packages/core/src/llm/LLM.ts:71
additionalSessionOptions
• Optional
additionalSessionOptions: Omit
<Partial
<ClientOptions
>, "apiKey"
| "timeout"
| "maxRetries"
>
Inherited from
OpenAI.additionalSessionOptions
Defined in
packages/core/src/llm/LLM.ts:81
apiKey
• Optional
apiKey: string
= undefined
Inherited from
Defined in
packages/core/src/llm/LLM.ts:77
callbackManager
• Optional
callbackManager: CallbackManager
Inherited from
Defined in
packages/core/src/llm/LLM.ts:86
maxRetries
• maxRetries: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:78
maxTokens
• Optional
maxTokens: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:70
model
• model: string
Inherited from
Defined in
packages/core/src/llm/LLM.ts:67
session
• session: OpenAISession
Inherited from
Defined in
packages/core/src/llm/LLM.ts:80
temperature
• temperature: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:68
timeout
• Optional
timeout: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:79
topP
• topP: number
Inherited from
Defined in
packages/core/src/llm/LLM.ts:69
Accessors
metadata
• get
metadata(): Object
Returns
Object
Name | Type |
---|---|
contextWindow | number |
maxTokens | undefined | number |
model | string |
temperature | number |
tokenizer | CL100K_BASE |
topP | number |
Inherited from
OpenAI.metadata
Defined in
packages/core/src/llm/LLM.ts:143
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:190
▸ chat(params
): Promise
<ChatResponse
>
Parameters
Name | Type |
---|---|
params | LLMChatParamsNonStreaming |
Returns
Promise
<ChatResponse
>
Inherited from
Defined in
packages/core/src/llm/LLM.ts:193
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:18
▸ complete(params
): Promise
<CompletionResponse
>
Parameters
Name | Type |
---|---|
params | LLMCompletionParamsNonStreaming |
Returns
Promise
<CompletionResponse
>
Inherited from
Defined in
packages/core/src/llm/base.ts:21
mapMessageType
▸ mapMessageType(messageType
): "function"
| "user"
| "assistant"
| "system"
Parameters
Name | Type |
---|---|
messageType | MessageType |
Returns
"function"
| "user"
| "assistant"
| "system"
Inherited from
Defined in
packages/core/src/llm/LLM.ts:173
streamChat
▸ Protected
streamChat(«destructured»
): AsyncIterable
<ChatResponseChunk
>
Parameters
Name | Type |
---|---|
«destructured» | LLMChatParamsStreaming |
Returns
AsyncIterable
<ChatResponseChunk
>
Inherited from
Defined in
packages/core/src/llm/LLM.ts:228
tokens
▸ tokens(messages
): number
Parameters
Name | Type |
---|---|
messages | ChatMessage [] |
Returns
number