VectorPropertyModel.CanGenerateEmbedding<TEmbedding> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks whether the given embeddingGenerator can produce embeddings of type TEmbedding
for any input type known to this property model. The base implementation checks for String and DataContent;
VectorPropertyModel<TInput> also checks for TInput.
public:
generic <typename TEmbedding>
where TEmbedding : Microsoft::Extensions::AI::Embedding virtual bool CanGenerateEmbedding(Microsoft::Extensions::AI::IEmbeddingGenerator ^ embeddingGenerator);
public virtual bool CanGenerateEmbedding<TEmbedding>(Microsoft.Extensions.AI.IEmbeddingGenerator embeddingGenerator) where TEmbedding : Microsoft.Extensions.AI.Embedding;
abstract member CanGenerateEmbedding : Microsoft.Extensions.AI.IEmbeddingGenerator -> bool (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
override this.CanGenerateEmbedding : Microsoft.Extensions.AI.IEmbeddingGenerator -> bool (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
Public Overridable Function CanGenerateEmbedding(Of TEmbedding As Embedding) (embeddingGenerator As IEmbeddingGenerator) As Boolean
Type Parameters
- TEmbedding
The embedding type to check.
Parameters
- embeddingGenerator
- IEmbeddingGenerator
Returns
true if the generator can produce embeddings; otherwise, false.
Remarks
This is used for native vector property types, where the input type isn't known at model-build time.