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
  • Verify the cache mechanism with MistralAiEmbeddingModelTests

@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.

@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.

@nicolaskrier nicolaskrier force-pushed the optimize-mistral-ai-embedding-model-dimensions-method branch 5 times, most recently from 09f86fa to e2ac527 Compare November 13, 2025 18:56
@nicolaskrier nicolaskrier force-pushed the optimize-mistral-ai-embedding-model-dimensions-method branch from e2ac527 to 1eb5b68 Compare November 19, 2025 22:52
@nicolaskrier nicolaskrier force-pushed the optimize-mistral-ai-embedding-model-dimensions-method branch from 1eb5b68 to 1266356 Compare December 3, 2025 21:48
- 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 <[email protected]>
@nicolaskrier nicolaskrier force-pushed the optimize-mistral-ai-embedding-model-dimensions-method branch from 1266356 to 3d06d20 Compare December 10, 2025 21:29
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