File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 1212from azure .identity .aio import DefaultAzureCredential
1313from services .chat_service import ChatService
1414
15+
1516class AgentFactory :
1617 """
1718 Singleton factory for creating and managing an AzureAIAgent instance.
Original file line number Diff line number Diff line change 2727logging .basicConfig (level = logging .INFO )
2828logger = logging .getLogger (__name__ )
2929
30+
3031class ExpCache (TTLCache ):
3132 """
3233 Extended TTLCache that associates an agent and deletes Azure AI agent threads when items expire or are evicted (LRU).
@@ -64,7 +65,9 @@ class ChatService:
6465 Service for handling chat interactions, including streaming responses,
6566 processing RAG responses, and generating chart data for visualization.
6667 """
68+
6769 thread_cache = None
70+
6871 def __init__ (self , request : Request ):
6972 config = Config ()
7073 self .azure_openai_endpoint = config .azure_openai_endpoint
You can’t perform that action at this time.
0 commit comments