Skip to content

Commit

Permalink
fix rag bugs (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh1994 authored Oct 21, 2024
1 parent e42c8b9 commit 312793d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lazyllm/tools/rag/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ def forward(self, *args, **kw) -> List[DocNode]:
return self._impl.retrieve(*args, **kw)

def __repr__(self):
return lazyllm.make_repr("Module", "Document", manager=bool(self._manager))
return lazyllm.make_repr("Module", "Document", manager=hasattr(self._impl, '_manager'))
2 changes: 1 addition & 1 deletion lazyllm/tools/rag/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def get_status_cond_and_params(status: Union[str, List[str]],

if isinstance(exclude_status, str):
assert exclude_status != DocListManager.Status.all, 'Invalid status provided'
conds.append('{prefix}status != ?')
conds.append(f'{prefix}status != ?')
params.append(exclude_status)
elif isinstance(exclude_status, (tuple, list)):
conds.append(f'{prefix}status NOT IN ({",".join("?" * len(exclude_status))})')
Expand Down

0 comments on commit 312793d

Please sign in to comment.