Class: TogetherEmbedding
Hierarchy
↳
TogetherEmbedding
Constructors
constructor
• new TogetherEmbedding(init?
)
Parameters
Name | Type |
---|---|
init? | Partial <OpenAIEmbedding > |
Overrides
Defined in
packages/core/src/embeddings/together.ts:5
Properties
additionalSessionOptions
• Optional
additionalSessionOptions: Omit
<Partial
<ClientOptions
>, "apiKey"
| "timeout"
| "maxRetries"
>
Inherited from
OpenAIEmbedding.additionalSessionOptions
Defined in
packages/core/src/embeddings/OpenAIEmbedding.ts:23
apiKey
• Optional
apiKey: string
= undefined
Inherited from
Defined in
packages/core/src/embeddings/OpenAIEmbedding.ts:20
maxRetries
• maxRetries: number
Inherited from
Defined in
packages/core/src/embeddings/OpenAIEmbedding.ts:21
model
• model: string
Overrides
Defined in
packages/core/src/embeddings/together.ts:4
session
• session: OpenAISession
Inherited from
Defined in
packages/core/src/embeddings/OpenAIEmbedding.ts:28
timeout
• Optional
timeout: number
Inherited from
Defined in
packages/core/src/embeddings/OpenAIEmbedding.ts:22
Methods
getQueryEmbedding
▸ getQueryEmbedding(query
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
query | string |
Returns
Promise
<number
[]>
Inherited from
OpenAIEmbedding.getQueryEmbedding
Defined in
packages/core/src/embeddings/OpenAIEmbedding.ts:89
getTextEmbedding
▸ getTextEmbedding(text
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
text | string |
Returns
Promise
<number
[]>
Inherited from
OpenAIEmbedding.getTextEmbedding
Defined in
packages/core/src/embeddings/OpenAIEmbedding.ts:85
similarity
▸ similarity(embedding1
, embedding2
, mode?
): number
Parameters
Name | Type | Default value |
---|---|---|
embedding1 | number [] | undefined |
embedding2 | number [] | undefined |
mode | SimilarityType | SimilarityType.DEFAULT |
Returns
number