update webui.py
This commit is contained in:
parent
9f07ead562
commit
264981e4b6
|
|
@ -69,7 +69,7 @@ LLM_HISTORY_LEN = 3
|
|||
# return top-k text chunk from vector store
|
||||
VECTOR_SEARCH_TOP_K = 5
|
||||
|
||||
# 如果为0,则不生效,经测试小于500值的结果更精准
|
||||
# 知识检索内容相关度 Score, 数值范围0-1000,如果为0,则不生效,经测试设置为小于500时,匹配结果更精准
|
||||
VECTOR_SEARCH_SCORE_THRESHOLD = 0
|
||||
|
||||
NLTK_DATA_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "nltk_data")
|
||||
|
|
|
|||
2
webui.py
2
webui.py
|
|
@ -57,7 +57,7 @@ def get_answer(query, vs_path, history, mode, score_threshold=VECTOR_SEARCH_SCOR
|
|||
else:
|
||||
source = "".join(
|
||||
[
|
||||
f"""<details> <summary>[score值]:{doc.metadata["score"]} - ({i + 1})[出处]: {os.path.split(doc.metadata["source"])[-1]}</summary>\n"""
|
||||
f"""<details> <summary>【出处{i + 1}】: {os.path.split(doc.metadata["source"])[-1]} - 【内容匹配相关度 Score】:{doc.metadata["score"]}</summary>\n"""
|
||||
f"""{doc.page_content}\n"""
|
||||
f"""</details>"""
|
||||
for i, doc in
|
||||
|
|
|
|||
Loading…
Reference in New Issue