Skip to content

Conversation

@nicolaskrier
Copy link
Contributor

@nicolaskrier nicolaskrier commented Nov 5, 2025

  • Calculate and cache values for unknown models only if necessary
  • Make known embedding dimensions a mutable map attribute
  • Fix warnings in MistralAiEmbeddingModelTests unit tests

@nicolaskrier
Copy link
Contributor Author

nicolaskrier commented Nov 5, 2025

Hi @ilayaperumalg, could you have a look on this one? I have been inspired by this commit for this PR.
Thank you.

- Calculate and cache values for unknown models only if necessary
- Make known embedding dimensions a mutable map attribute
- Fix warnings in MistralAiEmbeddingModelTests unit tests

Signed-off-by: Nicolas Krier <[email protected]>
@nicolaskrier nicolaskrier force-pushed the optimize-mistral-ai-embedding-model-dimensions-method branch from 7320cb0 to 62c4738 Compare November 6, 2025 20:00
1536);

private static final EmbeddingModelObservationConvention DEFAULT_OBSERVATION_CONVENTION = new DefaultEmbeddingModelObservationConvention();
private final Map<String, Integer> knownEmbeddingDimensions = createKnownEmbeddingDimensions();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit concerned about making a class constant mutable that is why I have decided to make it an attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant