Skip to content

.Net: MEVD Built in embedding generation throws when used with AzureOpenAI #11902

Closed
@westey-m

Description

@westey-m

Describe the bug
MEVD Built in embedding generation throws when used with AzureOpenAI with This model does not support specifying dimensions.

To Reproduce
Find RAGWithInMemoryVectorStoreAndPluginAsync sample in samples

Update text embedding generator to azure open ai:

        var textEmbeddingGenerator = new AzureOpenAIClient(new Uri(TestConfiguration.AzureOpenAIEmbeddings.Endpoint), new AzureCliCredential())
            .GetEmbeddingClient(TestConfiguration.AzureOpenAIEmbeddings.DeploymentName)
            .AsIEmbeddingGenerator();

Sample fails:

    System.ClientModel.ClientResultException : HTTP 400 (invalid_request_error: )
    
    This model does not support specifying dimensions.

  Stack Trace: 
    ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
    EmbeddingClient.GenerateEmbeddingsAsync(BinaryContent content, RequestOptions options)
    EmbeddingClient.GenerateEmbeddingsAsync(IEnumerable`1 inputs, EmbeddingGenerationOptions options, CancellationToken cancellationToken)
    OpenAIEmbeddingGenerator.GenerateAsync(IEnumerable`1 values, EmbeddingGenerationOptions options, CancellationToken cancellationToken)
    InMemoryVectorStoreRecordCollection`2.UpsertAsync(IEnumerable`1 records, CancellationToken cancellationToken) line 280
    WithPlugins.RAGWithInMemoryVectorStoreAndPluginAsync() line 62```

**Expected behavior**
Sample can generate embeddings

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencebugSomething isn't workingmemory connectormsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Type

Projects

Status

Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions