Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nemoguardrails/kb/kb.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ async def build(self):
# We also save the file for future use
os.makedirs(CACHE_FOLDER, exist_ok=True)
basic_index = cast(BasicEmbeddingsIndex, self.index)
if not basic_index.embeddings_index:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will you get the error after applying the changes in #1383 ?

raise Exception("Couldn't create basic embeddings index")
basic_index.embeddings_index.save(cache_file)

# And, explicitly save the size as we need it when we reload
Expand Down