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

Azure OpenAI encoder #56

Merged
merged 5 commits into from
Jan 11, 2024
Merged

Conversation

MichaelAnckaert
Copy link
Contributor

Problem

Azure OpenAI can't be used with this library. I stumbled upon this issue when I tried to implement the Azure OpenAI client for use with the canopy-sdk.

Solution

This PR implements the dense encoder using the Azure OpenAI embeddings. I subclassed a new encoder from the existing OpenAIEncoder and used the AzureOpenAI client.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

No specific tests were added as the existing OpenAIEncoder tests should cover all use cases.

acatav
acatav previously requested changes Dec 3, 2023
Copy link
Collaborator

@acatav acatav left a comment

Choose a reason for hiding this comment

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

Thanks @MichaelAnckaert for your contribution. Can you please add tests? we'll make sure all required env vars will be available in CI via github secrets

pinecone_text/dense/openai_encoder.py Show resolved Hide resolved
@acatav
Copy link
Collaborator

acatav commented Jan 10, 2024

@MichaelAnckaert Thanks for you contribution! we wanted to merge this PR ASAP so we added tests and changed the code to align with this project high level design.

Copy link
Contributor

@igiloh-pinecone igiloh-pinecone left a comment

Choose a reason for hiding this comment

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

LGTM!

@acatav acatav self-requested a review January 11, 2024 11:04
@acatav acatav enabled auto-merge January 11, 2024 11:04
@acatav acatav added this pull request to the merge queue Jan 11, 2024
Merged via the queue into pinecone-io:main with commit ebc5c35 Jan 11, 2024
13 checks passed
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.

3 participants