diff --git a/level_4/cognitive_architecture/classifiers/classifier.py b/level_4/cognitive_architecture/classifiers/classifier.py index 1a09cc2c8..570cec7e9 100644 --- a/level_4/cognitive_architecture/classifiers/classifier.py +++ b/level_4/cognitive_architecture/classifiers/classifier.py @@ -15,7 +15,7 @@ from langchain.chains import create_extraction_chain from langchain.chat_models import ChatOpenAI from ..config import Config - +from ..database.vectordb.loaders.loaders import _document_loader config = Config() config.load() OPENAI_API_KEY = config.openai_key @@ -24,9 +24,6 @@ from langchain.document_loaders import DirectoryLoader async def classify_documents(query:str, document_id:str, loader_settings:dict): - from ..database.vectordb.loaders.loaders import _document_loader - - document_context = await _document_loader(query, loader_settings) logging.info("This is the document context", document_context) @@ -66,10 +63,6 @@ async def classify_documents(query:str, document_id:str, loader_settings:dict): arguments_str = classifier_output.additional_kwargs['function_call']['arguments'] print("This is the arguments string", arguments_str) arguments_dict = json.loads(arguments_str) - # classfier_value = arguments_dict.get('summarizer', None) - - # print("This is the classifier value", classfier_value) - return arguments_dict diff --git a/level_4/main.py b/level_4/main.py index bc22c6e44..9302badbd 100644 --- a/level_4/main.py +++ b/level_4/main.py @@ -183,9 +183,6 @@ async def load_documents_to_vectorstore(session: AsyncSession, user_id: str, job operation_type="DATA_LOAD", ), ) - - - memory = await Memory.create_memory(user_id, session, namespace=namespace_id, job_id=job_id, memory_label=namespace_id) document_names = get_document_names(loader_settings.get("path", "None")) for doc in document_names: