File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,16 @@ def run_cosmic_works_ai_agent(request: AIRequest):
6464# ========================
6565
6666# Create an instance of the CosmosDBChatSessionStateProvider class
67- cosmos_provider = CosmosDBChatSessionStateProvider ()
67+ # This will be used to load or create Chat Sessions
68+ chat_session_state_provider = CosmosDBChatSessionStateProvider ()
6869
6970@app .get ("/session/list" , response_model = List [ChatSessionResponse ])
7071def list_sessions ():
7172 """
7273 Endpoint to list all chat sessions.
7374 """
7475 try :
75- return cosmos_provider .list_sessions ()
76+ return chat_session_state_provider .list_sessions ()
7677 except RuntimeError as e :
7778 # Return an internal server error if a runtime error occurs
7879 raise HTTPException (status_code = 500 , detail = str (e ))
@@ -84,7 +85,7 @@ def load_session(session_id: str):
8485 Endpoint to load a chat session by session_id.
8586 """
8687 try :
87- return cosmos_provider .load_session (session_id )
88+ return chat_session_state_provider .load_session (session_id )
8889 except ValueError as e :
8990 # Return a 404 error if the session is not found
9091 raise HTTPException (status_code = 404 , detail = str (e ))
You can’t perform that action at this time.
0 commit comments