Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add Azure OpenAI embedding provider #702

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

shubhiroy
Copy link

Added support for azure open ai embedding model.

Copy link
Collaborator

@drazvan drazvan left a comment

Choose a reason for hiding this comment

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

Looks good 👍. You should update the configuration-guide.md file to mention this as well. Also, please add a minimal test for this. Thanks!

"""Retrieve the embedding dimension for the specified model."""
if self.embedding_model in self.MODEL_DIMENSIONS:
return self.MODEL_DIMENSIONS[self.embedding_model]
else:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should fall back to computing the embedding for a test string, and take the size from there. Otherwise, if a new model is published, it will not be usable until a new version of nemoguardrails is published.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shubhiroy : let me know if you can address these changes in the next few days, so we can include this in the 0.10.0 release. Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

Hi @drazvan,
I have done the required changes.

  1. Modified code to compute embedding using test string
  2. Added details in configuration-guide.md
  3. Added test

Sorry for late reply. I was not well from last few weeks.

@shubhiroy shubhiroy closed this Sep 19, 2024
@shubhiroy shubhiroy reopened this Sep 19, 2024
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.

2 participants