File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 8
8
9
9
from dotenv import load_dotenv
10
10
11
- from helper .azure_credential_utils import get_azure_credential_async , get_azure_credential
12
-
13
11
from fastapi import FastAPI
14
12
from fastapi .middleware .cors import CORSMiddleware
15
13
14
+ from helper .azure_credential_utils import get_azure_credential
15
+
16
16
from semantic_kernel .agents .azure_ai .azure_ai_agent import AzureAIAgent # pylint: disable=E0611
17
17
18
18
from sql_agents .agent_manager import clear_sql_agents , set_sql_agents
Original file line number Diff line number Diff line change 15
15
import os
16
16
17
17
from azure .identity .aio import ClientSecretCredential
18
+
18
19
from helper .azure_credential_utils import get_azure_credential
19
20
20
21
Original file line number Diff line number Diff line change 2
2
3
3
from azure .storage .blob import BlobServiceClient
4
4
5
+ from common .config .config import app_config
5
6
from common .logger .app_logger import AppLogger
6
7
from common .storage .blob_base import BlobStorageBase
8
+
7
9
from helper .azure_credential_utils import get_azure_credential
8
10
9
- from common .config .config import app_config
10
11
11
12
class AzureBlobStorage (BlobStorageBase ):
12
13
def __init__ (self , account_name : str , container_name : Optional [str ] = None ):
Original file line number Diff line number Diff line change 1
1
import os
2
- from azure .identity import ManagedIdentityCredential , DefaultAzureCredential
3
- from azure .identity .aio import ManagedIdentityCredential as AioManagedIdentityCredential , DefaultAzureCredential as AioDefaultAzureCredential
2
+
3
+ from azure .identity import DefaultAzureCredential , ManagedIdentityCredential
4
+ from azure .identity .aio import DefaultAzureCredential as AioDefaultAzureCredential , ManagedIdentityCredential as AioManagedIdentityCredential
4
5
5
6
6
7
async def get_azure_credential_async (client_id = None ):
@@ -33,4 +34,4 @@ def get_azure_credential(client_id=None):
33
34
if os .getenv ("APP_ENV" , "prod" ).lower () == 'dev' :
34
35
return DefaultAzureCredential () # CodeQL [SM05139] Okay use of DefaultAzureCredential as it is only used in development
35
36
else :
36
- return ManagedIdentityCredential (client_id = client_id )
37
+ return ManagedIdentityCredential (client_id = client_id )
You can’t perform that action at this time.
0 commit comments