mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
rm print statements
This commit is contained in:
@@ -41,7 +41,6 @@ class BaseFileKnowledgeSource(BaseKnowledgeSource, ABC):
|
|||||||
|
|
||||||
def model_post_init(self, _):
|
def model_post_init(self, _):
|
||||||
"""Post-initialization method to load content."""
|
"""Post-initialization method to load content."""
|
||||||
print("model_post_init")
|
|
||||||
self.safe_file_paths = self._process_file_paths()
|
self.safe_file_paths = self._process_file_paths()
|
||||||
self.validate_content()
|
self.validate_content()
|
||||||
self.content = self.load_content()
|
self.content = self.load_content()
|
||||||
@@ -71,7 +70,6 @@ class BaseFileKnowledgeSource(BaseKnowledgeSource, ABC):
|
|||||||
def _save_documents(self):
|
def _save_documents(self):
|
||||||
"""Save the documents to the storage."""
|
"""Save the documents to the storage."""
|
||||||
if self.storage:
|
if self.storage:
|
||||||
print("saving source documents to storage")
|
|
||||||
self.storage.save(self.chunks)
|
self.storage.save(self.chunks)
|
||||||
else:
|
else:
|
||||||
raise ValueError("No storage found to save documents.")
|
raise ValueError("No storage found to save documents.")
|
||||||
|
|||||||
@@ -46,9 +46,7 @@ class BaseKnowledgeSource(BaseModel, ABC):
|
|||||||
Save the documents to the storage.
|
Save the documents to the storage.
|
||||||
This method should be called after the chunks and embeddings are generated.
|
This method should be called after the chunks and embeddings are generated.
|
||||||
"""
|
"""
|
||||||
print("saving documents", self.storage)
|
|
||||||
if self.storage:
|
if self.storage:
|
||||||
print("storage found")
|
|
||||||
self.storage.save(self.chunks)
|
self.storage.save(self.chunks)
|
||||||
else:
|
else:
|
||||||
raise ValueError("No storage found to save documents.")
|
raise ValueError("No storage found to save documents.")
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ class KnowledgeStorage(BaseKnowledgeStorage):
|
|||||||
self.collection = self.app.get_or_create_collection(
|
self.collection = self.app.get_or_create_collection(
|
||||||
name=collection_name, embedding_function=self.embedder
|
name=collection_name, embedding_function=self.embedder
|
||||||
)
|
)
|
||||||
print("db initialized", self.collection)
|
|
||||||
else:
|
else:
|
||||||
raise Exception("Vector Database Client not initialized")
|
raise Exception("Vector Database Client not initialized")
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -195,11 +194,8 @@ class KnowledgeStorage(BaseKnowledgeStorage):
|
|||||||
embedder_config (Optional[Dict[str, Any]]): Configuration dictionary for the embedder.
|
embedder_config (Optional[Dict[str, Any]]): Configuration dictionary for the embedder.
|
||||||
If None or empty, defaults to the default embedding function.
|
If None or empty, defaults to the default embedding function.
|
||||||
"""
|
"""
|
||||||
print("embedder", embedder)
|
|
||||||
self.embedder = (
|
self.embedder = (
|
||||||
EmbeddingConfigurator().configure_embedder(embedder)
|
EmbeddingConfigurator().configure_embedder(embedder)
|
||||||
if embedder
|
if embedder
|
||||||
else self._create_default_embedding_function()
|
else self._create_default_embedding_function()
|
||||||
)
|
)
|
||||||
print("self.embedder", self.embedder)
|
|
||||||
print("type of self.embedder", type(self.embedder))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user