Optimize MistralAiEmbeddingModel dimensions method#4810
Open
nicolaskrier wants to merge 1 commit intospring-projects:mainfrom
Open
Optimize MistralAiEmbeddingModel dimensions method#4810nicolaskrier wants to merge 1 commit intospring-projects:mainfrom
nicolaskrier wants to merge 1 commit intospring-projects:mainfrom
Conversation
Contributor
Author
|
Hi @ilayaperumalg, could you have a look on this one? I have been inspired by this commit for this PR. |
7320cb0 to
62c4738
Compare
nicolaskrier
commented
Nov 6, 2025
| 1536); | ||
|
|
||
| private static final EmbeddingModelObservationConvention DEFAULT_OBSERVATION_CONVENTION = new DefaultEmbeddingModelObservationConvention(); | ||
| private final Map<String, Integer> knownEmbeddingDimensions = createKnownEmbeddingDimensions(); |
Contributor
Author
There was a problem hiding this comment.
I was a bit concerned about making a class constant mutable that is why I have decided to make it an attribute.
09f86fa to
e2ac527
Compare
e2ac527 to
1eb5b68
Compare
1266356 to
3d06d20
Compare
3d06d20 to
282f3fb
Compare
282f3fb to
8a3b820
Compare
8a3b820 to
c01391d
Compare
c01391d to
3f7f0db
Compare
0602411 to
5de4a49
Compare
- Calculate and cache values for unknown models only if necessary - Make known embedding dimensions a mutable map attribute - Verify the cache mechanism with MistralAiEmbeddingModelTests Signed-off-by: Nicolas Krier <7557886+nicolaskrier@users.noreply.github.com>
5de4a49 to
c89e6f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.