更新了chatglm3 6b agent的文档,提示词 (#2041)
更新了chatglm3 6b agent的文档,提示词 修复代理no_proxy格式问题 #1838 的问题,感谢多次复现和验证 修改了pg清理知识库后还会引用之前知识库的问题
This commit is contained in:
parent
91ff0574df
commit
94d4304638
|
|
@ -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",
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,8 @@ PROMPT_TEMPLATES = {
|
|||
Question: {input}
|
||||
Thought: {agent_scratchpad}
|
||||
""",
|
||||
# ChatGLM3必须用官方的提示词,没有修改空间,参数都不会传入进去
|
||||
"ChatGLM3":
|
||||
|
||||
"ChatGLM3": # ChatGLM3必须用官方的提示词,没有修改空间,目前参数都不会传入进去
|
||||
"""
|
||||
history:
|
||||
{history}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue