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

community: Azure Search Vector Store is missing Access Token Authentication #24330

Merged
merged 46 commits into from
Aug 26, 2024

Conversation

levalencia
Copy link
Contributor

Added Azure Search Access Token Authentication instead of API KEY auth.
Fixes Issue: #24263
Dependencies: None
Twitter: @levalencia

@baskaryan

Could you please review? First time creating a PR that fixes some code.

Copy link

vercel bot commented Jul 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Aug 26, 2024 10:38pm

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. community Related to langchain-community Ɑ: vector store Related to vector store module 🤖:improvement Medium size change to existing code to handle new use-cases labels Jul 17, 2024
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 17, 2024
@levalencia
Copy link
Contributor Author

can someone take a look at this, I cant remove the new dependency azure.identiy
@baskaryan

@levalencia
Copy link
Contributor Author

I am tagging some contributors to this file as I need some help to continue:

  1. Azure.Identity is a dependency that I need to be able to create an AccessToken to be able to use the token as a mean of Authentication instead of the API KEY, I noticed this is implemented in OpenAI but not in AzureSearch.py

I tried to fix it but I get errors with the depency, if I add the dependency using Poetry, then the dependecy check fails, if I dont, then I get different errors.

@thedavgar @mattgotteiner

Your help is greatly appreciated.

@mattgotteiner
Copy link
Contributor

I am tagging some contributors to this file as I need some help to continue:

  1. Azure.Identity is a dependency that I need to be able to create an AccessToken to be able to use the token as a mean of Authentication instead of the API KEY, I noticed this is implemented in OpenAI but not in AzureSearch.py

I tried to fix it but I get errors with the depency, if I add the dependency using Poetry, then the dependecy check fails, if I dont, then I get different errors.

@thedavgar @mattgotteiner

Your help is greatly appreciated.

https://python.langchain.com/v0.2/docs/contributing/code/setup/#working-with-optional-dependencies

@levalencia
Copy link
Contributor Author

extended_testing_deps.txt already has the azure-identity

I am tagging some contributors to this file as I need some help to continue:

  1. Azure.Identity is a dependency that I need to be able to create an AccessToken to be able to use the token as a mean of Authentication instead of the API KEY, I noticed this is implemented in OpenAI but not in AzureSearch.py

I tried to fix it but I get errors with the depency, if I add the dependency using Poetry, then the dependecy check fails, if I dont, then I get different errors.
@thedavgar @mattgotteiner
Your help is greatly appreciated.

https://python.langchain.com/v0.2/docs/contributing/code/setup/#working-with-optional-dependencies

I added azure-core to extended_testing_deps.txt, azure-identity was already there.

azure-core>=1.29.7,<2
azure-identity>=1.15.0,<2

However I have this error:
https://github.com/langchain-ai/langchain/actions/runs/9977236809/job/27571413449?pr=24330#step:6:48

langchain_community/vectorstores/azuresearch.py:27: in
from azure.core.credentials import AccessToken, TokenCredential
E ModuleNotFoundError: No module named 'azure'

that can be solved using poetry add, but if I do then I get a test dependency error, because it should be optional.

or shouldnt I use poetry add?

Copy link
Contributor Author

@levalencia levalencia left a comment

Choose a reason for hiding this comment

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

@mattgotteiner canb you approve?

@levalencia
Copy link
Contributor Author

@baskaryan can you merge or something else is needed?

@levalencia
Copy link
Contributor Author

@baskaryan I have tried all communication channels for this PR to be approved, in the meantime changes have happened on the community repo and several versions have been released, almost 30 days waiting time seems a lot, or maybe I am reaching the wrong person?

@efriis efriis self-assigned this Aug 26, 2024
@efriis efriis merged commit 99f9a66 into langchain-ai:master Aug 26, 2024
27 checks passed
@efriis
Copy link
Member

efriis commented Aug 26, 2024

Hey @levalencia ! Sorry for the delay. You did nothing wrong, and we're working on publishing better expectations for getting community PRs reviewed and how to escalate issues, based on VSCode's issue triaging.

Thank you for your contribution!

@levalencia levalencia deleted the AzureSearchVectorDatabase branch August 28, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community 🤖:improvement Medium size change to existing code to handle new use-cases size:M This PR changes 30-99 lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants