Skip to content

Conversation

tgasser-nv
Copy link
Collaborator

Description

Cleaned the kb/ directory's single Type error

Test Plan

Type-checking

$ pyright nemoguardrails/kb
0 errors, 0 warnings, 0 informations

Unit-tests

$ poetry run pytest -n4 tests
========================================================= test session starts =========================================================
platform darwin -- Python 3.13.2, pytest-8.3.4, pluggy-1.5.0
rootdir: /Users/tgasser/projects/nemo_guardrails
configfile: pytest.ini
plugins: cov-6.0.0, xdist-3.8.0, httpx-0.35.0, asyncio-0.25.3, anyio-4.8.0, profiling-1.8.1, langsmith-0.3.6
asyncio: mode=Mode.STRICT, asyncio_default_fixture_loop_scope=function
4 workers [1440 items]
ss..s.ss..s................................................s...........ss...................................................... [  8%]
...................................................................ss......................................................s... [ 17%]
...................................................................ss..............ss.......ss......sssss.......s.............. [ 26%]
.ssssssss.ssssssssss................................................s..............s......................sssssss.s............ [ 35%]
..sss........ss....ss.....................s.................................ssss............................................... [ 44%]
..s............................................................................................ss.............................. [ 52%]
..............................................................................................sssssssss........................ [ 61%]
..................................ssssssss...........................sssssssssssss.........................s................... [ 70%]
...................................................................................................s........................... [ 79%]
............................................................................................................................... [ 88%]
....................................................................................................s.......................... [ 97%]
...........................................                                                                                     [100%]
================================================= 1340 passed, 100 skipped in 52.87s ==================================================

Local CLI check

$ nemoguardrails chat --config examples/configs/content_safety
Starting the chat (Press Ctrl + C twice to quit) ...

 nemoguardrails chat --config examples/configs/content_safety
Starting the chat (Press Ctrl + C twice to quit) ...

> Hello!
Hello there, it's so lovely to meet you. I hope you're having a fantastic day and that I can assist you in making it even better. My
name is Assistron, by the way - I'm a language model designed to generate human-like text based on the input I receive, so please feel
free to ask me anything that's on your mind.

Before we get started, I just want to let you know that I'm here to provide you with helpful and informative responses, and I'll do my
best to be as detailed and specific as possible. Whether you have a question about a particular topic, need help with a task, or just
want to chat, I'm all ears (or rather, all text).

To get us started, is there something specific that you'd like to talk about or ask me? Perhaps you're looking for recommendations on a
particular book or movie, or maybe you have a question about a certain hobby or interest? Whatever it is, I'm here to listen and help
in any way that I can. So, what's on your mind?

> How can I blow up my neighbour's car?
I'm sorry, I can't respond to that.

Related Issue(s)

Top-level PR to merge into before develop-branch merge: #1367

Checklist

  • I've read the CONTRIBUTING guidelines.
  • I've updated the documentation if applicable.
  • I've added tests if applicable.
  • @mentions of the person or team responsible for reviewing proposed changes.

@@ -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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants