Microsoft.Extensions.AI Integration
Cross-SDK comparison
See the centralized MEAI documentation for feature matrices and comparisons across all tryAGI SDKs.
The TwelveLabs SDK implements IEmbeddingGenerator<string, Embedding<float>> from Microsoft.Extensions.AI, enabling text embeddings via the Twelve Labs Embed v2 API.
Installation
1 | |
Embedding Generation
Use the TwelveLabsClient as an IEmbeddingGenerator to generate text embeddings with the Marengo 3.0 model.
1 2 3 4 5 6 7 8 9 10 11 12 | |
Service Metadata
1 2 3 4 5 6 7 8 9 10 11 | |
Notes
- The
WithApiKey()call is required before using embedding generation (it sets thex-api-keyheader parameter) - The default model is
marengo3.0 - Twelve Labs Embed v2 accepts one text per request; multiple texts are parallelized automatically
- Embedding vectors are returned as
float[]