cwyodmodules 0.3.29__py3-none-any.whl → 0.3.30__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cwyodmodules/batch/utilities/helpers/azure_identity_helper.py +11 -5
- cwyodmodules/batch/utilities/helpers/azure_search_helper.py +3 -3
- {cwyodmodules-0.3.29.dist-info → cwyodmodules-0.3.30.dist-info}/METADATA +1 -1
- {cwyodmodules-0.3.29.dist-info → cwyodmodules-0.3.30.dist-info}/RECORD +7 -7
- {cwyodmodules-0.3.29.dist-info → cwyodmodules-0.3.30.dist-info}/WHEEL +0 -0
- {cwyodmodules-0.3.29.dist-info → cwyodmodules-0.3.30.dist-info}/licenses/LICENSE +0 -0
- {cwyodmodules-0.3.29.dist-info → cwyodmodules-0.3.30.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,8 @@ from azure.identity import (
|
|
4
4
|
ManagedIdentityCredential,
|
5
5
|
EnvironmentCredential,
|
6
6
|
TokenCachePersistenceOptions,
|
7
|
-
get_bearer_token_provider
|
7
|
+
get_bearer_token_provider,
|
8
|
+
DefaultAzureCredential
|
8
9
|
)
|
9
10
|
|
10
11
|
from logging import getLogger
|
@@ -34,6 +35,7 @@ class AzureIdentityHelper:
|
|
34
35
|
environment_credential = EnvironmentCredential(
|
35
36
|
token_cache_persistence_options=token_cache_options
|
36
37
|
)
|
38
|
+
|
37
39
|
|
38
40
|
# Create a chain of credentials
|
39
41
|
# The chain will try credentials in the order they are provided.
|
@@ -45,12 +47,16 @@ class AzureIdentityHelper:
|
|
45
47
|
)
|
46
48
|
else:
|
47
49
|
logger.info("Using Managed Identity Credential first with token cache persistence.")
|
48
|
-
self._credential = ChainedTokenCredential(
|
49
|
-
|
50
|
-
|
50
|
+
# self._credential = ChainedTokenCredential(
|
51
|
+
|
52
|
+
# managed_identity_credential,
|
53
|
+
# environment_credential
|
54
|
+
# )
|
55
|
+
self._credential = DefaultAzureCredential(
|
56
|
+
token_cache_persistence_options=token_cache_options
|
51
57
|
)
|
52
58
|
|
53
|
-
def get_credential(self)
|
59
|
+
def get_credential(self):
|
54
60
|
"""
|
55
61
|
Returns the configured ChainedTokenCredential.
|
56
62
|
"""
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import logging
|
2
|
-
from azure.identity import ChainedTokenCredential
|
2
|
+
from azure.identity import ChainedTokenCredential, DefaultAzureCredential
|
3
3
|
from typing import Union
|
4
4
|
from langchain_community.vectorstores import AzureSearch
|
5
5
|
from azure.core.credentials import AzureKeyCredential
|
@@ -55,7 +55,7 @@ class AzureSearchHelper:
|
|
55
55
|
return credential
|
56
56
|
|
57
57
|
def _create_search_client(
|
58
|
-
self, search_credential: Union[AzureKeyCredential, ChainedTokenCredential]
|
58
|
+
self, search_credential: Union[AzureKeyCredential, ChainedTokenCredential, DefaultAzureCredential]
|
59
59
|
) -> SearchClient:
|
60
60
|
return SearchClient(
|
61
61
|
endpoint=self.env_helper.AZURE_SEARCH_SERVICE,
|
@@ -64,7 +64,7 @@ class AzureSearchHelper:
|
|
64
64
|
)
|
65
65
|
|
66
66
|
def _create_search_index_client(
|
67
|
-
self, search_credential: Union[AzureKeyCredential, ChainedTokenCredential]
|
67
|
+
self, search_credential: Union[AzureKeyCredential, ChainedTokenCredential, DefaultAzureCredential]
|
68
68
|
):
|
69
69
|
return SearchIndexClient(
|
70
70
|
endpoint=self.env_helper.AZURE_SEARCH_SERVICE, credential=search_credential
|
@@ -30,10 +30,10 @@ cwyodmodules/batch/utilities/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
30
30
|
cwyodmodules/batch/utilities/helpers/azure_blob_storage_client.py,sha256=FN2XnEThmtbWnwSi1sEfgekuPH7aJBOAU5n2DBmQ9ww,10315
|
31
31
|
cwyodmodules/batch/utilities/helpers/azure_computer_vision_client.py,sha256=5qhxriTEaKkRc8K4E9oKQjCOzV_JSkad37z1FskCpOg,3661
|
32
32
|
cwyodmodules/batch/utilities/helpers/azure_form_recognizer_helper.py,sha256=kN9pjanKj_IsGM0XQA8QwICuLaB0yBdtRMINmhSD_mU,6699
|
33
|
-
cwyodmodules/batch/utilities/helpers/azure_identity_helper.py,sha256=
|
33
|
+
cwyodmodules/batch/utilities/helpers/azure_identity_helper.py,sha256=lq10tDgH4kMKnmj5cAUj97-P_RIdav-Mbac93WZVE8U,3264
|
34
34
|
cwyodmodules/batch/utilities/helpers/azure_postgres_helper.py,sha256=RV2jcqFuTofbz1gk8CDYdECPgl_ypH3K84Yeu3kjU7o,10823
|
35
35
|
cwyodmodules/batch/utilities/helpers/azure_postgres_helper_light_rag.py,sha256=DLgJ7KNK71qSUlRHTWgRgp6-4ufnC8frL_pOWE-oKgM,10915
|
36
|
-
cwyodmodules/batch/utilities/helpers/azure_search_helper.py,sha256=
|
36
|
+
cwyodmodules/batch/utilities/helpers/azure_search_helper.py,sha256=GniJ8JhRTBdzI1kN0yHtyR8ocZBav5C635uFfD1eHrc,10473
|
37
37
|
cwyodmodules/batch/utilities/helpers/document_chunking_helper.py,sha256=2MZOjW-fHXgYijP3m9O-nizOlk96Yg0axyxT0K6fTnM,725
|
38
38
|
cwyodmodules/batch/utilities/helpers/document_loading_helper.py,sha256=2HBEl3vW-_PKbX5pPntTC_R5eToTk2Qb-q3M4Mt6hCU,603
|
39
39
|
cwyodmodules/batch/utilities/helpers/env_helper.py,sha256=l0kRDKEzYcPyKm6USVRKDtk-NXHrr7hbq8CxWlPvfm0,15893
|
@@ -108,8 +108,8 @@ cwyodmodules/graphrag/query/generate.py,sha256=xBnZs2U9xFWtPk4AfAZgYKbHdcxNcIO6Q
|
|
108
108
|
cwyodmodules/graphrag/query/graph_search.py,sha256=95h3ecSWx4864XgKABtG0fh3Nk8HkqJVzoCrO8daJ-Y,7724
|
109
109
|
cwyodmodules/graphrag/query/types.py,sha256=1Iq1dp4I4a56_cuFjOZ0NTgd0A2_MpVFznp_czgt6cI,617
|
110
110
|
cwyodmodules/graphrag/query/vector_search.py,sha256=9Gwu9LPjtoAYUU8WKqCvbCHAIg3dpk71reoYd1scLnQ,1807
|
111
|
-
cwyodmodules-0.3.
|
112
|
-
cwyodmodules-0.3.
|
113
|
-
cwyodmodules-0.3.
|
114
|
-
cwyodmodules-0.3.
|
115
|
-
cwyodmodules-0.3.
|
111
|
+
cwyodmodules-0.3.30.dist-info/licenses/LICENSE,sha256=UqBDTipijsSW2ZSOXyTZnMsXmLoEHTgNEM0tL4g-Sso,1150
|
112
|
+
cwyodmodules-0.3.30.dist-info/METADATA,sha256=3dkF8so-qsIVsLXqNoG4lrUMJP8Q3OsHoIbYef58F5k,1969
|
113
|
+
cwyodmodules-0.3.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
114
|
+
cwyodmodules-0.3.30.dist-info/top_level.txt,sha256=99RENLbkdRX-qpJvsxZ5AfmTL5s6shSaKOWYpz1vwzg,13
|
115
|
+
cwyodmodules-0.3.30.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|