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

Add support for AzureOpenAI #131

Merged
merged 7 commits into from
Apr 25, 2024
Merged

Add support for AzureOpenAI #131

merged 7 commits into from
Apr 25, 2024

Conversation

ajac-zero
Copy link
Contributor

Objetive

Added a new TextVectorizer for the AzureOpenAI API, which is based on the AzureOpenAI and AsyncAzureOpenAI classes from openai>=1.0.0.

Reason

Compatibility with Azure OpenAI is an important feature for developers that are building enterprise AI applications with Azure Cloud. Particularly for use cases where privacy is a concern, and data must stay within their cloud tenant.

My team particularly wants to integrate Semantic Cache (with Azure Cache for Redis Enterprise). Since we rely on the Azure OpenAI API, I created this new vectorizer to add that functionality.

@tylerhutcherson tylerhutcherson self-requested a review March 21, 2024 19:28
@tylerhutcherson tylerhutcherson added the enhancement New feature or request label Mar 21, 2024
@tylerhutcherson
Copy link
Collaborator

@ajac-zero thanks for opening this -- will take a look and we will definitely get this in soon.

Copy link
Collaborator

@tylerhutcherson tylerhutcherson left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution! Will you please add tests for this (there are tests for other vectorizers you can follow along) and also a small addition to the docs user_guide for vectorizers. Thanks!

@ajac-zero
Copy link
Contributor Author

ajac-zero commented Apr 19, 2024

Sure thing, @tylerhutcherson. I've added the Azure vectorizer to the vectorizer test loop and a new section for Azure OpenAI in the vectorizers notebook.

All vectorizer tests pass with the Azure OpenAI vectorizer.
image

Copy link
Collaborator

@tylerhutcherson tylerhutcherson left a comment

Choose a reason for hiding this comment

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

So close! Left one small typo comment, then I will merge. I will fast follow with a commit to add the env vars to our github actions scripts.

redisvl/utils/vectorize/text/azureopenai.py Outdated Show resolved Hide resolved
@tylerhutcherson tylerhutcherson merged commit a9124bd into redis:main Apr 25, 2024
2 of 18 checks passed
justin-cechmanek pushed a commit that referenced this pull request May 6, 2024
**Objective**

Added a new TextVectorizer for the AzureOpenAI API, which is based on
the AzureOpenAI and AsyncAzureOpenAI classes from openai>=1.0.0.

**Reason**

Compatibility with Azure OpenAI is an important feature for developers
that are building enterprise AI applications with Azure Cloud.
Particularly for use cases where privacy is a concern, and data must
stay within their cloud tenant.

My team particularly wants to integrate Semantic Cache (with Azure Cache
for Redis Enterprise). Since we rely on the Azure OpenAI API, I created
this new vectorizer to add that functionality.

---------

Co-authored-by: Anibal <a8065384@banorte.com>
Co-authored-by: Tyler Hutcherson <tyler.hutcherson@redis.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants