Class: ClipEmbedding
Hierarchy
↳
ClipEmbedding
Constructors
constructor
• new ClipEmbedding()
Inherited from
MultiModalEmbedding.constructor
Properties
modelType
• modelType: ClipEmbeddingModelType
= ClipEmbeddingModelType.XENOVA_CLIP_VIT_BASE_PATCH16
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:11
processor
• Private
processor: any
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:15
textModel
• Private
textModel: any
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:17
tokenizer
• Private
tokenizer: any
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:14
visionModel
• Private
visionModel: any
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:16
Methods
getImageEmbedding
▸ getImageEmbedding(image
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
image | ImageType |
Returns
Promise
<number
[]>
Overrides
MultiModalEmbedding.getImageEmbedding
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:61
getImageEmbeddings
▸ getImageEmbeddings(images
): Promise
<number
[][]>
Parameters
Name | Type |
---|---|
images | ImageType [] |
Returns
Promise
<number
[][]>
Inherited from
MultiModalEmbedding.getImageEmbeddings
Defined in
packages/core/src/embeddings/MultiModalEmbedding.ts:11
getProcessor
▸ getProcessor(): Promise
<any
>
Returns
Promise
<any
>
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:27
getQueryEmbedding
▸ getQueryEmbedding(query
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
query | string |
Returns
Promise
<number
[]>
Overrides
MultiModalEmbedding.getQueryEmbedding
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:76
getTextEmbedding
▸ getTextEmbedding(text
): Promise
<number
[]>
Parameters
Name | Type |
---|---|
text | string |
Returns
Promise
<number
[]>
Overrides
MultiModalEmbedding.getTextEmbedding
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:68
getTextModel
▸ getTextModel(): Promise
<any
>
Returns
Promise
<any
>
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:48
getTokenizer
▸ getTokenizer(): Promise
<any
>
Returns
Promise
<any
>
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:19
getVisionModel
▸ getVisionModel(): Promise
<any
>
Returns
Promise
<any
>
Defined in
packages/core/src/embeddings/ClipEmbedding.ts:35
similarity
▸ similarity(embedding1
, embedding2
, mode?
): number
Parameters
Name | Type | Default value |
---|---|---|
embedding1 | number [] | undefined |
embedding2 | number [] | undefined |
mode | SimilarityType | SimilarityType.DEFAULT |
Returns
number
Inherited from
MultiModalEmbedding.similarity