Lag till hantering av backend API endpoint
This commit is contained in:
@@ -25,6 +25,7 @@ class GlobalState:
|
||||
cls._instance.logger.setLevel(getattr(logging, cls._instance.log_level)) # Initialize root logger level
|
||||
cls._instance.logger.info(" __new__(cls): Logger in GlobalState created: %s", cls._instance.logger)
|
||||
cls._instance.llm = "phi3:mini" # Default LLM for queries. TODO: Check with ollama server that it actually exists
|
||||
cls._instance.backend_api_ep = "http://localhost:5005/api/chat" # Default backend API endpoint
|
||||
return cls._instance
|
||||
|
||||
def configure_logging(self, level=None):
|
||||
@@ -64,3 +65,11 @@ class GlobalState:
|
||||
"""Getter for which LLM is used for queries"""
|
||||
return self.llm
|
||||
|
||||
def set_backend_api_ep(self, be_api_ep=None):
|
||||
"""Set backend API endpoint"""
|
||||
self.backend_api_ep = be_api_ep
|
||||
|
||||
def get_backend_api_ep(self):
|
||||
"""Getter for backend API endpoint"""
|
||||
return self.backend_api_ep
|
||||
|
||||
|
||||
Reference in New Issue
Block a user