From ca531ea0e669b286263c515565e6d6f8e39577ac Mon Sep 17 00:00:00 2001 From: Vits <vittorio.mayellaro.dev@gmail.com> Date: Thu, 18 Jul 2024 01:22:56 +0200 Subject: [PATCH] Formatting and linting --- semantic_router/index/pinecone.py | 4 +++- semantic_router/layer.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/semantic_router/index/pinecone.py b/semantic_router/index/pinecone.py index f4fa0b80..858d56c9 100644 --- a/semantic_router/index/pinecone.py +++ b/semantic_router/index/pinecone.py @@ -277,7 +277,9 @@ class PineconeIndex(BaseIndex): elif self.sync == "merge": utterances_to_include = local_utterances - remote_utterances if local_utterances or remote_utterances: - layer_routes[route] = list(remote_utterances.union(local_utterances)) + layer_routes[route] = list( + remote_utterances.union(local_utterances) + ) else: raise ValueError("Invalid sync mode specified") diff --git a/semantic_router/layer.py b/semantic_router/layer.py index 5852b8db..61824033 100644 --- a/semantic_router/layer.py +++ b/semantic_router/layer.py @@ -491,7 +491,7 @@ class RouteLayer: routes=route_names, utterances=all_utterances, ) - + def _add_and_sync_routes(self, routes: List[Route]): # create embeddings for all routes and sync at startup with remote ones based on sync setting all_utterances = [ -- GitLab