mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 03:46:52 +08:00
fix: dataset desc npe (#246)
This commit is contained in:
@@ -90,7 +90,9 @@ class MultiDatasetRouterChain(Chain):
|
|||||||
callback_manager=llm_callback_manager
|
callback_manager=llm_callback_manager
|
||||||
)
|
)
|
||||||
|
|
||||||
destinations = ["{}: {}".format(d.id, d.description.replace('\n', ' ')) for d in datasets]
|
destinations = ["{}: {}".format(d.id, d.description.replace('\n', ' ') if d.description
|
||||||
|
else ('useful for when you want to answer queries about the ' + d.name))
|
||||||
|
for d in datasets]
|
||||||
destinations_str = "\n".join(destinations)
|
destinations_str = "\n".join(destinations)
|
||||||
router_template = MULTI_PROMPT_ROUTER_TEMPLATE.format(
|
router_template = MULTI_PROMPT_ROUTER_TEMPLATE.format(
|
||||||
destinations=destinations_str
|
destinations=destinations_str
|
||||||
|
|||||||
Reference in New Issue
Block a user