Replies: 3 comments
-
@schuellc-nvidia, could you please assist with this? |
Beta Was this translation helpful? Give feedback.
-
Hi @radush-v Also note that |
Beta Was this translation helpful? Give feedback.
-
Great, thank you for your assistance @Pouyanpi, it has definetely fixed it, but now it seems like it is ignored by the guardrail. config.yml
rails.co
actions.py
And the part of guardrails node, that is validating the dialog
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello team,
I'm currently trying to implement a custom action within NeMo Guardrails, following your official documentation, but I'm encountering an issue where my custom action isn't being recognized. I've attempted two different approaches for defining the action: using register directly in my Python code and using the @action decorator. Unfortunately, both methods have resulted in the same error.
My project setup is straightforward, with all necessary files (config.yml, rails.co, actions.py) located in a single folder.
Here are the relevant code snippets for context:
actions.py:
Python
rails.co:
config.yml:
Upon initialization of the Guardrails application, I consistently receive the following error, indicating that ```
DetectLanguageAction is not defined:
[agent] [backend] File "/app/venv/lib/python3.11/site-packages/nemoguardrails/colang/v1_0/runtime/eval.py", line 71, in eval_expression
[agent] [backend] raise Exception(f"Error evaluating '{expr}': {str(ex)}")
[agent] [backend] Exception: Error evaluating 'DetectLanguageAction($userMessage)': Function 'DetectLanguageAction' not defined, for expression 'DetectLanguageAction(var_userMessage)'.
[agent] [backend] An error occurred: Error evaluating 'DetectLanguageAction($userMessage)': Function 'DetectLanguageAction' not defined, for expression 'DetectLanguageAction(var_userMessage)'.
Could you please help me understand why DetectLanguageAction is not being recognized by the Guardrails runtime, despite being defined in actions.py and referenced in rails.co? Any guidance on resolving this Function 'DetectLanguageAction' not defined error would be greatly appreciated."
Beta Was this translation helpful? Give feedback.
All reactions