From 8e89f30f286d3ca18c7d5d135735541576cf57b0 Mon Sep 17 00:00:00 2001 From: eric <104689238+eric-doug@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:34:47 +0800 Subject: [PATCH] bugfix: fix get_extra_readers() return None. --- modelscope_agent/rag/knowledge.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modelscope_agent/rag/knowledge.py b/modelscope_agent/rag/knowledge.py index 1450a6f1f..bc2fbf89b 100644 --- a/modelscope_agent/rag/knowledge.py +++ b/modelscope_agent/rag/knowledge.py @@ -243,11 +243,13 @@ def get_extra_readers( ) return extra_readers - return { + extra_readers.update({ '.pb': PandasCSVReader(), '.html': HTMLTagReader(), '.txt': FlatReader() - }.update(extra_readers) + }) + + return extra_readers def read(self, knowledge_source: Union[str, List[str]],