diff --git a/.gitignore b/.gitignore index b54db8e1..85d3eaf9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,6 @@ /chatchat-server/chatchat/data/knowledge_base/samples/vector_store !/chatchat-server/chatchat/data/nltk_data -/chatchat-server/chatchat/configs/*.py -/chatchat-server/chatchat/configs/loom.yaml .vscode/ # below are standard python ignore files @@ -176,12 +174,9 @@ cython_debug/ # Test File test.py -configs/*.py /knowledge_base/samples/content/202311-D平台项目工作大纲参数,人员中间库表结构说明V1.1(1).docx /knowledge_base/samples/content/imi_temeplate.txt -/chatchat/configs/*.py -/chatchat/configs/*.yaml chatchat/data /chatchat-server/chatchat/configs/model_providers.yaml diff --git a/chatchat-server/chatchat/configs/basic_config.py.example b/chatchat-server/chatchat/configs/basic_config.py similarity index 100% rename from chatchat-server/chatchat/configs/basic_config.py.example rename to chatchat-server/chatchat/configs/basic_config.py diff --git a/chatchat-server/chatchat/configs/kb_config.py.example b/chatchat-server/chatchat/configs/kb_config.py similarity index 95% rename from chatchat-server/chatchat/configs/kb_config.py.example rename to chatchat-server/chatchat/configs/kb_config.py index 661407d3..9fed2715 100644 --- a/chatchat-server/chatchat/configs/kb_config.py.example +++ b/chatchat-server/chatchat/configs/kb_config.py @@ -1,7 +1,11 @@ import os +from pathlib import Path -from .basic_config import DATA_PATH +# chatchat 项目根目录 +CHATCHAT_ROOT = str(Path(__file__).absolute().parent.parent) +# 用户数据根目录 +DATA_PATH = os.path.join(CHATCHAT_ROOT, "data") # 默认使用的知识库 DEFAULT_KNOWLEDGE_BASE = "samples" diff --git a/chatchat-server/chatchat/configs/model_config.py.example b/chatchat-server/chatchat/configs/model_config.py similarity index 100% rename from chatchat-server/chatchat/configs/model_config.py.example rename to chatchat-server/chatchat/configs/model_config.py diff --git a/chatchat-server/chatchat/configs/model_providers.yaml.example b/chatchat-server/chatchat/configs/model_providers.yaml.example deleted file mode 100644 index 4c6f4ff1..00000000 --- a/chatchat-server/chatchat/configs/model_providers.yaml.example +++ /dev/null @@ -1,37 +0,0 @@ -openai: - model_credential: - - model: 'gpt-3.5-turbo' - model_type: 'llm' - model_credentials: - openai_api_key: 'sk-' - openai_organization: '' - openai_api_base: '' - - model: 'gpt-4' - model_type: 'llm' - model_credentials: - openai_api_key: 'sk-' - openai_organization: '' - openai_api_base: '' - - provider_credential: - openai_api_key: 'sk-' - openai_organization: '' - openai_api_base: '' - -xinference: - model_credential: - - model: 'chatglm3-6b' - model_type: 'llm' - model_credentials: - server_url: 'http://127.0.0.1:9997/' - model_uid: 'chatglm3-6b' - -ollama: - model_credential: - - model: 'llama3' - model_type: 'llm' - model_credentials: - base_url: 'http://172.21.80.1:11434' - - - diff --git a/chatchat-server/chatchat/configs/prompt_config.py.example b/chatchat-server/chatchat/configs/prompt_config.py similarity index 100% rename from chatchat-server/chatchat/configs/prompt_config.py.example rename to chatchat-server/chatchat/configs/prompt_config.py diff --git a/chatchat-server/chatchat/configs/server_config.py.example b/chatchat-server/chatchat/configs/server_config.py similarity index 100% rename from chatchat-server/chatchat/configs/server_config.py.example rename to chatchat-server/chatchat/configs/server_config.py