cd@bziiit.com
commited on
Commit
·
b82230b
1
Parent(s):
3a8ddd8
Remove debug print statements from PineconeConnector
Browse files- model/__init__.py +0 -0
- vectore_store/PineconeConnector.py +0 -10
model/__init__.py
ADDED
|
File without changes
|
vectore_store/PineconeConnector.py
CHANGED
|
@@ -21,9 +21,6 @@ class PineconeConnector(ConnectorStrategy):
|
|
| 21 |
self.index_name = os.environ.get("PINECONE_INDEX_NAME")
|
| 22 |
self.namespace = os.environ.get("PINECONE_NAMESPACE")
|
| 23 |
|
| 24 |
-
print(f"Index name: {self.index_name}")
|
| 25 |
-
print(f"Namespace: {self.namespace}")
|
| 26 |
-
print(f"Pinecone API Key: {pinecone_api_key}")
|
| 27 |
|
| 28 |
pc = Pinecone(api_key=pinecone_api_key)
|
| 29 |
|
|
@@ -44,7 +41,6 @@ class PineconeConnector(ConnectorStrategy):
|
|
| 44 |
|
| 45 |
def getDocs(self):
|
| 46 |
# Simulate getting docs from Pinecone
|
| 47 |
-
print("Fetching documents from Pinecone")
|
| 48 |
|
| 49 |
docs_names = []
|
| 50 |
for ids in self.index.list(namespace=self.namespace):
|
|
@@ -65,13 +61,9 @@ class PineconeConnector(ConnectorStrategy):
|
|
| 65 |
documents = []
|
| 66 |
uuids = []
|
| 67 |
|
| 68 |
-
print(file_name)
|
| 69 |
-
|
| 70 |
for i, chunk in enumerate(text_chunks):
|
| 71 |
clean_filename = remove_non_standard_ascii(file_name)
|
| 72 |
uuid = f"{clean_filename}_{i}"
|
| 73 |
-
|
| 74 |
-
print(f"Adding document with ID {uuid}")
|
| 75 |
|
| 76 |
document = Document(
|
| 77 |
page_content=chunk,
|
|
@@ -92,8 +84,6 @@ class PineconeConnector(ConnectorStrategy):
|
|
| 92 |
|
| 93 |
def retriever(self, query, embedding):
|
| 94 |
|
| 95 |
-
print(f"Retrieving documents from Pinecone for query '{query}'")
|
| 96 |
-
|
| 97 |
vector_store = PineconeVectorStore(index=self.index, embedding=embedding,namespace=self.namespace)
|
| 98 |
|
| 99 |
retriever = vector_store.as_retriever(
|
|
|
|
| 21 |
self.index_name = os.environ.get("PINECONE_INDEX_NAME")
|
| 22 |
self.namespace = os.environ.get("PINECONE_NAMESPACE")
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
pc = Pinecone(api_key=pinecone_api_key)
|
| 26 |
|
|
|
|
| 41 |
|
| 42 |
def getDocs(self):
|
| 43 |
# Simulate getting docs from Pinecone
|
|
|
|
| 44 |
|
| 45 |
docs_names = []
|
| 46 |
for ids in self.index.list(namespace=self.namespace):
|
|
|
|
| 61 |
documents = []
|
| 62 |
uuids = []
|
| 63 |
|
|
|
|
|
|
|
| 64 |
for i, chunk in enumerate(text_chunks):
|
| 65 |
clean_filename = remove_non_standard_ascii(file_name)
|
| 66 |
uuid = f"{clean_filename}_{i}"
|
|
|
|
|
|
|
| 67 |
|
| 68 |
document = Document(
|
| 69 |
page_content=chunk,
|
|
|
|
| 84 |
|
| 85 |
def retriever(self, query, embedding):
|
| 86 |
|
|
|
|
|
|
|
| 87 |
vector_store = PineconeVectorStore(index=self.index, embedding=embedding,namespace=self.namespace)
|
| 88 |
|
| 89 |
retriever = vector_store.as_retriever(
|