diff --git a/semantic_router/index/local.py b/semantic_router/index/local.py index 4bf212dcbe9742759f4ac2624c0d3ad8b02a9601..6d322f07c456a41afd54f0fa4e8571d9c30623ec 100644 --- a/semantic_router/index/local.py +++ b/semantic_router/index/local.py @@ -68,7 +68,6 @@ class LocalIndex(BaseIndex): if self.index is None or self.routes is None: raise ValueError("Index or routes are not populated.") if route_filter is not None: - print(f"Filtering routes with filter: {route_filter}") filtered_index = [] filtered_routes = [] for route, vec in zip(self.routes, self.index): @@ -84,7 +83,6 @@ class LocalIndex(BaseIndex): sim = similarity_matrix(vector, self.index) scores, idx = top_scores(sim, top_k) route_names = [self.routes[i] for i in idx] - print(f"Routes considered for similarity calculation: {route_names}") return scores, route_names def delete(self, route_name: str): diff --git a/semantic_router/index/pinecone.py b/semantic_router/index/pinecone.py index 500b78e9e866ee3bafdd7cddf3648c1b4e4302ef..07d519f0c17bfc6aec45d6b501bd6197cf4a57a4 100644 --- a/semantic_router/index/pinecone.py +++ b/semantic_router/index/pinecone.py @@ -229,7 +229,6 @@ class PineconeIndex(BaseIndex): raise ValueError("Index is not populated.") query_vector_list = vector.tolist() if route_filter is not None: - print(f"Filtering routes with filter: {route_filter}") filter_query = {"sr_route": {"$in": route_filter}} else: filter_query = None @@ -241,7 +240,6 @@ class PineconeIndex(BaseIndex): ) scores = [result["score"] for result in results["matches"]] route_names = [result["metadata"]["sr_route"] for result in results["matches"]] - print(f"Routes considered for similarity calculation: {route_names}") return np.array(scores), route_names def delete_index(self): diff --git a/semantic_router/layer.py b/semantic_router/layer.py index ba99e04a9faa4c03d263a38622c07be857acdcc1..39232c69955ece223221fe8ce22da85d07cbb18d 100644 --- a/semantic_router/layer.py +++ b/semantic_router/layer.py @@ -241,7 +241,6 @@ class RouteLayer: vector = self._encode(text=text) route, top_class_scores = self._retrieve_top_route(vector, route_filter) - print(f"Selected route: {route.name if route else 'None'}") passed = self._check_threshold(top_class_scores, route) if passed and route is not None and not simulate_static: