Skip to content
Open
Show file tree
Hide file tree
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: 1 addition & 1 deletion nemoguardrails/actions/llm/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def init(self):
self._init_flows_index(),
)

def _extract_user_message_example(self, flow: Flow):
def _extract_user_message_example(self, flow: Flow) -> None:
"""Heuristic to extract user message examples from a flow."""
elements = [
item
Expand Down
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