spring-projects / spring-projects/spring-ai

Add Support for AzureOpenAI based64 format embedding responses

Open
#4,261 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare AzureOpenAiEmbeddingOptions with OpenAiEmbeddingOptions, then review the related change in issue #3786 to identify the existing encodingFormat support. The work is done when AzureOpenAI accepts encodingFormat in the same way as the OpenAI integration and the relevant tests confirm the option is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, java
Domain
backend, cloud
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.