Skip to content

Commit

Permalink
Errors fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Mar 24, 2024
1 parent e3bc897 commit ae8e489
Show file tree
Hide file tree
Showing 3 changed files with 733 additions and 2,501 deletions.
7 changes: 5 additions & 2 deletions aifs/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,11 @@ def search(query, path=None, file_paths=None, max_results=5, verbose=False, pyth
for file_path, file_index in index.items():
if "__pycache__" in file_path:
continue
ids = [str(id) for id in range(id_counter, id_counter + len(file_index["chunks"]))]
id_counter += len(file_index["chunks"])
if file_index and "chunks" in file_index:
ids = [str(id) for id in range(id_counter, id_counter + len(file_index["chunks"]))]
id_counter += len(file_index["chunks"])
else:
ids = []
if ids:
collection.add(
ids=ids,
Expand Down
Loading

0 comments on commit ae8e489

Please sign in to comment.