Skip to content

Add Support for AzureOpenAI based64 format embedding responses #4261

@wpanas

Description

@wpanas

Expected Behavior
It is possible to set encodingFormat in AzureOpenAiEmbeddingOptions the same way as it's possible for OpenAiEmbeddingOptions.

Current Behavior
The default encodingFormat is used which is inefficient for high-load traffic. For companies that aren't using OpenAI embedding models directly it's impossible to change it in Spring AI.

Context
There was a change implemented in #3786 for OpenAI integration, but it has to be mirrored to be available for AzureOpenAI. Without it we can't benefit for improved performance of base64 encoded embeddings. We can workaround it by using Azure SDK for Java without Spring AI, but we loose all the good features the project gives us.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions