Unverified Commit bb7f454e authored by John Wang's avatar John Wang Committed by GitHub

fix: dataset desc npe (#246)

parent 7f48fadd
......@@ -90,7 +90,9 @@ class MultiDatasetRouterChain(Chain):
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)
router_template = MULTI_PROMPT_ROUTER_TEMPLATE.format(
destinations=destinations_str
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment