Compare commits
3 Commits
7b040ae248
...
5189d4368f
| Author | SHA1 | Date | |
|---|---|---|---|
| 5189d4368f | |||
| 5f182075aa | |||
| b1ef410638 |
@@ -50,9 +50,9 @@ def get_chat_engine(filters=None, params:dict=None):
|
|||||||
query_engine_tool_1 = QueryEngineTool.from_defaults(query_engine=query_engine, name="zj_query_tool_1",
|
query_engine_tool_1 = QueryEngineTool.from_defaults(query_engine=query_engine, name="zj_query_tool_1",
|
||||||
description=tree_summary_query_engine_tool_messages)
|
description=tree_summary_query_engine_tool_messages)
|
||||||
|
|
||||||
tools.append(summary_query_tool)
|
|
||||||
tools.append(query_engine_tool)
|
tools.append(query_engine_tool)
|
||||||
tools.append(query_engine_tool_1)
|
tools.append(query_engine_tool_1)
|
||||||
|
tools.append(summary_query_tool)
|
||||||
|
|
||||||
# Add additional tools
|
# Add additional tools
|
||||||
tools += ToolFactory.from_env()
|
tools += ToolFactory.from_env()
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ def create_summary_query_engine(index, top_k=3, use_reranker=False, filters=None
|
|||||||
summary_query_engine = summary_index.as_query_engine(
|
summary_query_engine = summary_index.as_query_engine(
|
||||||
response_mode=ResponseMode.TREE_SUMMARIZE,
|
response_mode=ResponseMode.TREE_SUMMARIZE,
|
||||||
use_async=True,
|
use_async=True,
|
||||||
streaming=True,
|
streaming=False,
|
||||||
)
|
)
|
||||||
return summary_query_engine
|
return summary_query_engine
|
||||||
|
|
||||||
|
|||||||
@@ -130,5 +130,5 @@ ReActChatFormatter_messages = (
|
|||||||
|
|
||||||
|
|
||||||
summary_query_tool_messages = "适用于任何需要进行全面总结、概括的要求。"
|
summary_query_tool_messages = "适用于任何需要进行全面总结、概括的要求。"
|
||||||
query_engine_tool_messages = "由博微公司编制的关于电力造价知识、电力造价编制软件知识和造价工程文件结构的知识库。适用于查询电力领域、电力造价领域、博微、博微电力、博微造价等业务等内容。如果本知识库没有直接答案但有解决思路的可以返回解决办法后建议使用“zjdata_query_tool”工具。",
|
query_engine_tool_messages = "适用于回答任何问题。",
|
||||||
tree_summary_query_engine_tool_messages = "由博微公司编制的关于电力造价知识、电力造价编制软件知识和造价工程文件结构的知识库。适用于查询电力领域、电力造价领域、博微、博微电力、博微造价等业务等内容。如果本知识库没有直接答案但有解决思路的可以返回解决办法后,且在询问工程中单位的具体数值,例如用量,费率,合计,金额等的时候建议使用“zj_query_tool_1”工具。",
|
tree_summary_query_engine_tool_messages = "在询问工程中单位的具体数值,例如用量,费率,合计,金额等的时候建议使用本工具。",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from util.register import *
|
|||||||
from llama_index.core.callbacks import CallbackManager
|
from llama_index.core.callbacks import CallbackManager
|
||||||
from modelProvide.customDashScope import CustomDashScope
|
from modelProvide.customDashScope import CustomDashScope
|
||||||
|
|
||||||
ModelPlateCategory = 'Ä£ÐÍÆ½Ì¨'
|
ModelPlateCategory = '模型平台'
|
||||||
|
|
||||||
def get_node_postprocessors():
|
def get_node_postprocessors():
|
||||||
rerank_enabled = os.getenv("RERANK_ENABLED").title()
|
rerank_enabled = os.getenv("RERANK_ENABLED").title()
|
||||||
|
|||||||
Reference in New Issue
Block a user