From e4a1730a5b9959326ef1e544dc5eb7f0215336cf Mon Sep 17 00:00:00 2001 From: kom-senapati Date: Tue, 22 Oct 2024 17:58:41 +0530 Subject: [PATCH] fix: MongoDB imports --- application/api/answer/routes.py | 2 +- application/api/internal/routes.py | 2 +- application/api/user/routes.py | 2 +- application/usage.py | 2 +- application/worker.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/api/answer/routes.py b/application/api/answer/routes.py index 40c4d8cb..ad434157 100644 --- a/application/api/answer/routes.py +++ b/application/api/answer/routes.py @@ -11,8 +11,8 @@ from bson.objectid import ObjectId from flask import Blueprint, current_app, make_response, request, Response from flask_restx import fields, Namespace, Resource -from core.mongo_db import MongoDB +from application.core.mongo_db import MongoDB from application.core.settings import settings from application.error import bad_request from application.extensions import api diff --git a/application/api/internal/routes.py b/application/api/internal/routes.py index f004cf97..c8e32d11 100755 --- a/application/api/internal/routes.py +++ b/application/api/internal/routes.py @@ -1,10 +1,10 @@ import os import datetime from flask import Blueprint, request, send_from_directory -from core.mongo_db import MongoDB from werkzeug.utils import secure_filename from bson.objectid import ObjectId +from application.core.mongo_db import MongoDB from application.core.settings import settings mongo = MongoDB.get_client() diff --git a/application/api/user/routes.py b/application/api/user/routes.py index 3469c800..ca4a051b 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -8,11 +8,11 @@ from bson.dbref import DBRef from bson.objectid import ObjectId from flask import Blueprint, jsonify, make_response, request from flask_restx import inputs, fields, Namespace, Resource -from core.mongo_db import MongoDB from werkzeug.utils import secure_filename from application.api.user.tasks import ingest, ingest_remote +from application.core.mongo_db import MongoDB from application.core.settings import settings from application.extensions import api from application.utils import check_required_fields diff --git a/application/usage.py b/application/usage.py index 31feb5f1..e87ebe38 100644 --- a/application/usage.py +++ b/application/usage.py @@ -1,6 +1,6 @@ import sys -from core.mongo_db import MongoDB from datetime import datetime +from application.core.mongo_db import MongoDB from application.utils import num_tokens_from_string mongo = MongoDB.get_client() diff --git a/application/worker.py b/application/worker.py index fc780d61..33cd90e5 100755 --- a/application/worker.py +++ b/application/worker.py @@ -8,8 +8,8 @@ from urllib.parse import urljoin import requests from bson.objectid import ObjectId -from core.mongo_db import MongoDB +from application.core.mongo_db import MongoDB from application.core.settings import settings from application.parser.file.bulk import SimpleDirectoryReader from application.parser.open_ai_func import call_openai_api