From d29263d226640e351030fd04970d440935862453 Mon Sep 17 00:00:00 2001
From: Siraj R Aizlewood <siraj@aurelio.ai>
Date: Thu, 1 Feb 2024 17:23:16 +0400
Subject: [PATCH] Removed Debugging Statements

---
 semantic_router/splitters/cumulative_sim.py |  5 ---
 semantic_router/text.py                     | 35 ---------------------
 2 files changed, 40 deletions(-)

diff --git a/semantic_router/splitters/cumulative_sim.py b/semantic_router/splitters/cumulative_sim.py
index b45ebc37..f832ca75 100644
--- a/semantic_router/splitters/cumulative_sim.py
+++ b/semantic_router/splitters/cumulative_sim.py
@@ -3,10 +3,6 @@ from semantic_router.splitters.base import BaseSplitter
 import numpy as np
 from semantic_router.schema import DocumentSplit
 from semantic_router.encoders import BaseEncoder
-# DEBUGGING: Start.
-import time
-# DEBUGGING: End.
-
 
 class CumulativeSimSplitter(BaseSplitter):
     
@@ -36,7 +32,6 @@ class CumulativeSimSplitter(BaseSplitter):
             if idx + 1 < total_docs:
                 curr_split_docs = "\n".join(docs[curr_split_start_idx : idx + 1])
                 next_doc = docs[idx + 1]
-                time.sleep(30)
                 curr_split_docs_embed = self.encoder([curr_split_docs])[0]
                 next_doc_embed = self.encoder([next_doc])[0]
 
diff --git a/semantic_router/text.py b/semantic_router/text.py
index 0847b739..002600ba 100644
--- a/semantic_router/text.py
+++ b/semantic_router/text.py
@@ -42,28 +42,9 @@ class Conversation(BaseModel):
         if self.splitter is None:
             raise ValueError("Splitter is not configured. Please call configure_splitter first.")
         new_topics = []
-        # DEBUGGING: Start.
-        print('#'*50)
-        print('self.topics')
-        print(self.topics)
-        print('#'*50)
-        # DEBUGGING: End.
-        # DEBUGGING: Start.
-        print('#'*50)
-        print('self.messages')
-        print(self.messages)
-        print('#'*50)
-        # DEBUGGING: End.
 
         # Get the messages that haven't been clustered into topics yet
         unclustered_messages = self.messages[len(self.topics):]
-
-        # DEBUGGING: Start.
-        print('#'*50)
-        print('unclustered_messages')
-        print(unclustered_messages)
-        print('#'*50)
-        # DEBUGGING: End.
         
         # If there are no unclustered messages, return early
         if not unclustered_messages:
@@ -81,30 +62,14 @@ class Conversation(BaseModel):
         
         # Add the unclustered messages to the docs
         docs.extend([f"{m.role}: {m.content}" for m in unclustered_messages])
-        
-        # DEBUGGING: Start.
-        print('#'*50)
-        print('docs')
-        print(docs)
-        print('#'*50)
-        # DEBUGGING: End.
 
         # Use the splitter to split the documents
         new_topics = self.splitter(docs)
 
-        # DEBUGGING: Start.
-        print('#'*50)
-        print('new_topics')
-        print(new_topics)
-        print('#'*50)
-        # DEBUGGING: End.
-
-        
         # Ensure there are new topics before proceeding
         if not new_topics:
             return self.topics, []
     
-
         # Check if there are any previously assigned topics
         if self.topics and new_topics:
             # Check if the first new topic includes the last message that was assigned a topic in the previous splitting.
-- 
GitLab