diff --git a/configs/model_config.py.example b/configs/model_config.py.example index 7a7a20f..e1c2a09 100644 --- a/configs/model_config.py.example +++ b/configs/model_config.py.example @@ -153,6 +153,9 @@ MODEL_PATH = { "chatglm2-6b": "THUDM/chatglm2-6b", "chatglm2-6b-32k": "THUDM/chatglm2-6b-32k", + "chatglm3-6b": "THUDM/chatglm3-6b", + "chatglm3-6b-32k": "THUDM/chatglm3-6b-32k", + "baichuan2-13b": "baichuan-inc/Baichuan2-13B-Chat", "baichuan2-7b": "baichuan-inc/Baichuan2-7B-Chat", diff --git a/configs/prompt_config.py.example b/configs/prompt_config.py.example index 6a8a086..52ff73e 100644 --- a/configs/prompt_config.py.example +++ b/configs/prompt_config.py.example @@ -100,8 +100,8 @@ PROMPT_TEMPLATES = { Question: {input} Thought: {agent_scratchpad} """, - # ChatGLM3必须用官方的提示词,没有修改空间,参数都不会传入进去 - "ChatGLM3": + + "ChatGLM3": # ChatGLM3必须用官方的提示词,没有修改空间,目前参数都不会传入进去 """ history: {history} diff --git a/server/knowledge_base/kb_service/pg_kb_service.py b/server/knowledge_base/kb_service/pg_kb_service.py index 6337e2b..3a6bab0 100644 --- a/server/knowledge_base/kb_service/pg_kb_service.py +++ b/server/knowledge_base/kb_service/pg_kb_service.py @@ -10,6 +10,7 @@ from configs import kbs_config from server.knowledge_base.kb_service.base import SupportedVSType, KBService, EmbeddingsFunAdapter, \ score_threshold_process from server.knowledge_base.utils import KnowledgeFile +import shutil class PGKBService(KBService): @@ -50,6 +51,7 @@ class PGKBService(KBService): DELETE FROM langchain_pg_collection WHERE name = '{self.kb_name}'; ''')) connect.commit() + shutil.rmtree(self.kb_path) def do_search(self, query: str, top_k: int, score_threshold: float): self._load_pg_vector() diff --git a/server/utils.py b/server/utils.py index df4ee03..9368c58 100644 --- a/server/utils.py +++ b/server/utils.py @@ -623,7 +623,8 @@ def get_httpx_client( }) for host in os.environ.get("no_proxy", "").split(","): if host := host.strip(): - default_proxies.update({host: None}) + # default_proxies.update({host: None}) # Origin code + default_proxies.update({'all://' + host: None}) # PR 1838 fix, if not add 'all://', httpx will raise error # merge default proxies with user provided proxies if isinstance(proxies, str):