diff --git a/smartassist/src/startservices.py b/smartassist/src/startservices.py index 18aeb4c..638709f 100644 --- a/smartassist/src/startservices.py +++ b/smartassist/src/startservices.py @@ -85,7 +85,7 @@ def configure(): endpoint["default_llm"] = llm if preferred_ep: # If preferred_ep is specified, set it as the default endpoint - list_of_eps = global_state.get_endpoints_with_key_values("title", preferred_ep) # Should only be one element in the list... + list_of_eps = global_state.get_endpoints_with_key_value("title", preferred_ep) # Should only be one element in the list... default_endpoint = next(iter(list_of_eps),None) # Same as default_endpoint = list_of_eps[0] if list_of_eps else None else: default_endpoint = next(iter(endpoints),None) # Set default_endpoint to first endpoint from list of all endpoints diff --git a/smartassist/src/utils.py b/smartassist/src/utils.py index af86f7f..2f0c12c 100644 --- a/smartassist/src/utils.py +++ b/smartassist/src/utils.py @@ -216,7 +216,7 @@ class GlobalState: """ return [ep for ep in self.endpoints if key in ep] - def get_endpoints_with_key_values(self, key: str, value: any) -> list[dict]: + def get_endpoints_with_key_value(self, key: str, value: any) -> list[dict]: """ Returns a list of endpoint dictionaries that contain the specified key-value pair.