-
Notifications
You must be signed in to change notification settings - Fork 709
Expand file tree
/
Copy pathconfig_kernel.py
More file actions
51 lines (42 loc) · 1.86 KB
/
Copy pathconfig_kernel.py
File metadata and controls
51 lines (42 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Import AppConfig from app_config
from app_config import config
# This file is left as a lightweight wrapper around AppConfig for backward compatibility
# All configuration is now handled by AppConfig in app_config.py
class Config:
# Use values from AppConfig
AZURE_TENANT_ID = config.AZURE_TENANT_ID
AZURE_CLIENT_ID = config.AZURE_CLIENT_ID
AZURE_CLIENT_SECRET = config.AZURE_CLIENT_SECRET
# CosmosDB settings
COSMOSDB_ENDPOINT = config.COSMOSDB_ENDPOINT
COSMOSDB_DATABASE = config.COSMOSDB_DATABASE
COSMOSDB_CONTAINER = config.COSMOSDB_CONTAINER
# Azure OpenAI settings
AZURE_OPENAI_DEPLOYMENT_NAME = config.AZURE_OPENAI_DEPLOYMENT_NAME
AZURE_OPENAI_API_VERSION = config.AZURE_OPENAI_API_VERSION
AZURE_OPENAI_ENDPOINT = config.AZURE_OPENAI_ENDPOINT
AZURE_OPENAI_SCOPES = config.AZURE_OPENAI_SCOPES
# Other settings
FRONTEND_SITE_NAME = config.FRONTEND_SITE_NAME
AZURE_AI_SUBSCRIPTION_ID = config.AZURE_AI_SUBSCRIPTION_ID
AZURE_AI_RESOURCE_GROUP = config.AZURE_AI_RESOURCE_GROUP
AZURE_AI_PROJECT_NAME = config.AZURE_AI_PROJECT_NAME
AZURE_AI_AGENT_PROJECT_CONNECTION_STRING = (
config.AZURE_AI_AGENT_PROJECT_CONNECTION_STRING
)
@staticmethod
def GetAzureCredentials():
"""Get Azure credentials using the AppConfig implementation."""
return config.get_azure_credentials()
@staticmethod
def GetCosmosDatabaseClient():
"""Get a Cosmos DB client using the AppConfig implementation."""
return config.get_cosmos_database_client()
@staticmethod
def CreateKernel():
"""Creates a new Semantic Kernel instance using the AppConfig implementation."""
return config.create_kernel()
@staticmethod
def GetAIProjectClient():
"""Get an AIProjectClient using the AppConfig implementation."""
return config.get_ai_project_client()