Skip to content

Commit

Permalink
fix filter no engine
Browse files Browse the repository at this point in the history
  • Loading branch information
suluyana committed Jul 26, 2024
1 parent 6b7bb78 commit e23a5e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modelscope_agent/rag/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,13 @@ def run(self,
if isinstance(files, str):
files = [files]

if files and len(files) > 0:
self.set_filter(files)

if not self.query_engine:
print('No valid document. Return `Empty Response`.')
return 'Empty Response'

if files and len(files) > 0:
self.set_filter(files)

if use_llm:
return str(self.query_engine.query(query_bundle))
else:
Expand Down

0 comments on commit e23a5e0

Please sign in to comment.