Colang not working as expected #1262
Replies: 3 comments
-
|
out of curiosity does it works when you trying any of the examples https://docs.nvidia.com/nemo/guardrails/latest/user-guides/colang-language-syntax-guide.html ? Am asking this question because am facing similar issue as your even for flow that are part of the examples. Also, if I may ask, what LLM provider are you using ? |
Beta Was this translation helpful? Give feedback.
-
|
I notice in |
Beta Was this translation helpful? Give feedback.
-
|
Your config is using topical/dialog rails but you want to use it as input rails. Currently this is not possible. with a python action, for example: async def check_political_content(context: dict):
user_message = context.get("user_message", "").lower()
keywords = ["politics", "vote", "government"]
return any(keyword in user_message for keyword in keywords)you can add it to actions.py or register it with your LLMRails instance's If you still want to use dialouge rails without invoking any LLM calls you might find embeddings only option handy. Have a look at https://docs.nvidia.com/nemo/guardrails/latest/user-guides/configuration-guide/guardrails-configuration.html#embeddings-only |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, When I am using colang flow, it didn't passing user political message, if I remove it, then it works.
config.yml:
flows.co:
code:
response:
Beta Was this translation helpful? Give feedback.
All reactions