Describe the bug
When using the dimensions attribute on a IEmbeddingGenerator request, the outputted dimensions from the Vertex API call is whatever the default is for the model.
To Reproduce
var embeddings = await embeddingGenerationService.GenerateAsync("hello",new EmbeddingGenerationOptions() {
Dimensions = 128,
ModelId = "gemini-embedding-001",
}, cancellationToken);
Console.WriteLine(embeddings.Vector.Length);
^ The above outputs: 3072 (the default for that model.)
Expected behavior
The outputted dimensions should respect the inputted value.
Platform
- Language: C#
- Source:
Microsoft.SemanticKernel.Connectors.Google, 1.63.0-alpha
- AI model: Google
gemini-embedding-001
- IDE: vscode
- OS: Mac
Additional context
Related:
#10488
#10489
The above previous changes look to have only added support to the Google Gemini connector, not the VertexAI connector.
Describe the bug
When using the
dimensionsattribute on aIEmbeddingGeneratorrequest, the outputted dimensions from theVertexAPI call is whatever the default is for the model.To Reproduce
^ The above outputs:
3072(the default for that model.)Expected behavior
The outputted dimensions should respect the inputted value.
Platform
Microsoft.SemanticKernel.Connectors.Google, 1.63.0-alphagemini-embedding-001Additional context
Related:
#10488
#10489
The above previous changes look to have only added support to the Google Gemini connector, not the VertexAI connector.