From 8ed791c66a790a024315fde9afe007eb4cba7a3e Mon Sep 17 00:00:00 2001 From: Fangyin Cheng Date: Thu, 25 Jul 2024 22:21:40 +0800 Subject: [PATCH] chore: Remove unused code --- .env.template | 3 +-- dbgpt/_private/config.py | 1 - dbgpt/app/knowledge/request/request.py | 1 - dbgpt/app/knowledge/service.py | 1 - dbgpt/app/openapi/api_v1/api_v1.py | 2 +- dbgpt/rag/knowledge/__init__.py | 1 - 6 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.env.template b/.env.template index ad99bdeaa..f90af90ee 100644 --- a/.env.template +++ b/.env.template @@ -297,5 +297,4 @@ DBGPT_LOG_LEVEL=INFO #*******************************************************************# #** FINANCIAL CHAT Config **# #*******************************************************************# -# FIN_REPORT_MODEL=/app/models/bge-large-zh -# FIN_CLASSIFIER_PKL=/app/models/logistic_regression_model.pkl \ No newline at end of file +# FIN_REPORT_MODEL=/app/models/bge-large-zh \ No newline at end of file diff --git a/dbgpt/_private/config.py b/dbgpt/_private/config.py index fb763a487..0ea313bac 100644 --- a/dbgpt/_private/config.py +++ b/dbgpt/_private/config.py @@ -314,7 +314,6 @@ def __init__(self) -> None: ) # experimental financial report model configuration self.FIN_REPORT_MODEL = os.getenv("FIN_REPORT_MODEL", None) - self.FIN_CLASSIFIER_PKL = os.getenv("FIN_CLASSIFIER_PKL", None) @property def local_db_manager(self) -> "ConnectorManager": diff --git a/dbgpt/app/knowledge/request/request.py b/dbgpt/app/knowledge/request/request.py index 08ffe7d09..fd6fc08fb 100644 --- a/dbgpt/app/knowledge/request/request.py +++ b/dbgpt/app/knowledge/request/request.py @@ -32,7 +32,6 @@ class BusinessFieldType(Enum): """BusinessFieldType""" NORMAL = "Normal" - FINANCIAL_REPORT = "FinancialReport" class KnowledgeDocumentRequest(BaseModel): diff --git a/dbgpt/app/knowledge/service.py b/dbgpt/app/knowledge/service.py index e1e3fa306..8ad9c2aa9 100644 --- a/dbgpt/app/knowledge/service.py +++ b/dbgpt/app/knowledge/service.py @@ -9,7 +9,6 @@ KnowledgeDocumentEntity, ) from dbgpt.app.knowledge.request.request import ( - BusinessFieldType, ChunkQueryRequest, DocumentQueryRequest, DocumentSummaryRequest, diff --git a/dbgpt/app/openapi/api_v1/api_v1.py b/dbgpt/app/openapi/api_v1/api_v1.py index 57f5e2a91..ac2916994 100644 --- a/dbgpt/app/openapi/api_v1/api_v1.py +++ b/dbgpt/app/openapi/api_v1/api_v1.py @@ -11,7 +11,7 @@ from dbgpt._private.config import Config from dbgpt._private.pydantic import model_to_dict, model_to_json -from dbgpt.app.knowledge.request.request import BusinessFieldType, KnowledgeSpaceRequest +from dbgpt.app.knowledge.request.request import KnowledgeSpaceRequest from dbgpt.app.knowledge.service import KnowledgeService from dbgpt.app.openapi.api_view_model import ( ChatSceneVo, diff --git a/dbgpt/rag/knowledge/__init__.py b/dbgpt/rag/knowledge/__init__.py index 8317e404b..d19a3a870 100644 --- a/dbgpt/rag/knowledge/__init__.py +++ b/dbgpt/rag/knowledge/__init__.py @@ -57,5 +57,4 @@ def __getattr__(name: str): "TXTKnowledge", "URLKnowledge", "ExcelKnowledge", - "FinReportKnowledge", ]