@@ -421,7 +421,7 @@ def __init__(
421421 self .aggregation = aggregation
422422 if self .aggregation not in ["sum" , "mean" , "max" ]:
423423 raise ValueError (
424- f"Unsupported aggregation method chosen: { aggregation } . Choose either 'SUM ', 'MEAN ', or 'MAX '."
424+ f"Unsupported aggregation method chosen: { aggregation } . Choose either 'sum ', 'mean ', or 'max '."
425425 )
426426 self .aggregation_method = self ._set_aggregation_method (self .aggregation )
427427 # to keep PostgresIndex backwards compatible we will default auto_sync to "local",
@@ -1295,19 +1295,6 @@ def _refresh_routes(self):
12951295 Not yet implemented for BaseRouter.
12961296 """
12971297 raise NotImplementedError ("This method has not yet been implemented." )
1298- route_mapping = {route .name : route for route in self .routes }
1299- index_routes = self .index .get_utterances ()
1300- new_routes_names = []
1301- new_routes = []
1302- for route_name , utterance in index_routes :
1303- if route_name in route_mapping :
1304- if route_name not in new_routes_names :
1305- existing_route = route_mapping [route_name ]
1306- new_routes .append (existing_route )
1307-
1308- new_routes .append (Route (name = route_name , utterances = [utterance ]))
1309- route = route_mapping [route_name ]
1310- self .routes .append (route )
13111298
13121299 def _get_hash (self ) -> ConfigParameter :
13131300 """Get the hash of the current routes.
@@ -1530,7 +1517,7 @@ def _set_aggregation_method(self, aggregation: str = "sum"):
15301517 return lambda x : max (x )
15311518 else :
15321519 raise ValueError (
1533- f"Unsupported aggregation method chosen: { aggregation } . Choose either 'SUM ', 'MEAN ', or 'MAX '."
1520+ f"Unsupported aggregation method chosen: { aggregation } . Choose either 'sum ', 'mean ', or 'max '."
15341521 )
15351522
15361523 def _score_routes (
0 commit comments