之前存在106.52上的仓库被重新初始化了,同时增加了测试账号的兼容,测试账号hxbtest001,...hxbtest005
This commit is contained in:
@@ -48,8 +48,8 @@ class MesumAntiqueService(CommonService):
|
||||
# 统一替换中文分号为英文分号,并去除末尾分号
|
||||
if categories_text:
|
||||
categories_text = categories_text.replace(";", ";").rstrip(";")
|
||||
# 分割并清理空格/空值
|
||||
mesum_antique_categories = [dynasty.strip() for dynasty in categories_text.split(";") if dynasty.strip()]
|
||||
# 分割并清理空格/空值
|
||||
mesum_antique_categories = [dynasty.strip() for dynasty in categories_text.split(";") if dynasty.strip()]
|
||||
|
||||
finally:
|
||||
pass
|
||||
@@ -115,7 +115,8 @@ class MesumAntiqueService(CommonService):
|
||||
for obj in query.dicts():
|
||||
labels_data.append({
|
||||
'id': obj['id'],
|
||||
'label': obj['label']
|
||||
'label': obj['label'],
|
||||
"category": obj['category'],
|
||||
})
|
||||
|
||||
return labels_data
|
||||
|
||||
@@ -625,7 +625,7 @@ def chat(dialog, messages, stream=True, **kwargs):
|
||||
fid = None
|
||||
llm_id = tmp[0]
|
||||
if len(tmp)>1: fid = tmp[1]
|
||||
|
||||
#logging.info(f"dialog_service--0 message={messages}") # cyx
|
||||
llm = LLMService.query(llm_name=llm_id) if not fid else LLMService.query(llm_name=llm_id, fid=fid)
|
||||
if not llm:
|
||||
llm = TenantLLMService.query(tenant_id=dialog.tenant_id, llm_name=llm_id) if not fid else \
|
||||
@@ -716,8 +716,8 @@ def chat(dialog, messages, stream=True, **kwargs):
|
||||
top=dialog.top_k, aggs=False, rerank_mdl=rerank_mdl)
|
||||
knowledges = [ck["content_with_weight"] for ck in kbinfos["chunks"]]
|
||||
logging.debug( "{}->{}".format(" ".join(questions), "\n->".join(knowledges)))
|
||||
# 打印历史记录
|
||||
# logging.info( "dale-----!!!:{}->{}".format(" ".join(questions), "\n->".join(knowledges)))
|
||||
# 打印查询到的知识库信息
|
||||
#logging.info( "知识库中知识--!!!:{}->{}".format(" ".join(questions), "\n->".join(knowledges)))
|
||||
retrieval_tm = timer()
|
||||
|
||||
if not knowledges and prompt_config.get("empty_response"):
|
||||
@@ -736,7 +736,7 @@ def chat(dialog, messages, stream=True, **kwargs):
|
||||
assert len(msg) >= 2, f"message_fit_in has bug: {msg}"
|
||||
prompt = msg[0]["content"]
|
||||
prompt += "\n\n### Query:\n%s" % " ".join(questions)
|
||||
|
||||
#logging.info(f"dialog_service--3 chat msg={msg}") # cyx
|
||||
if "max_tokens" in gen_conf:
|
||||
gen_conf["max_tokens"] = min(
|
||||
gen_conf["max_tokens"],
|
||||
|
||||
Reference in New Issue
Block a user