Open clairebehue opened 2 months ago
This also fails in the same manner when attempting to use Managed Service Identity, which is preferable from a security perspective as it removes the weakness of persistent secrets which could be compromised and used by a malicious actor.
For reference the issue also exists on: langchain-community==0.3.0 platform: linux python 3.12.5
Checked other resources
Example Code
The following code fails to instantiate an AzureSearch instance:
Error Message and Stack Trace (if applicable)
Description
instantiating
AzureSearch
withazure_ad_access_token
!= None is trying to create an instance ofTokenCredential
which is an interface and not instantiable. (see https://python.langchain.com/v0.2/api_reference/_modules/langchain_community/vectorstores/azuresearch.html#AzureSearch.__init__ )Additional Notes:
azure_search_key
&azure_ad_access_token
toNone
but setting the following env var: (authentification will then use thefrom azure.identity import DefaultAzureCredential
class. see Azure doc about this os.environ["AZURE_TENANT_ID"] = TENANTID os.environ["AZURE_CLIENT_ID"] = APPID os.environ["AZURE_CLIENT_SECRET"] = APPSECRETSystem Info
langchain-community==0.2.16 platform: mac python 3.9