Nemo guardrail provide the support to configure the guardrail hub library using config.yml file of nemoguardrail.
The restrictToTopic library of guardrail hub requires openai_api_key. The openai_api_key should be of https://platform.openai.com/ platform. I want to use llm model like azure openai or other llm model not only openai platform specific. In this case i have to create the python llm_callable function and pass it to the restrictToTopic. Using python code i think its straight forward. In case of nemoguardrail integration the its not easy. Following is the snippet of config.yml file of nemoguardrail.
rails:
config:
guardrails_ai:
validators:
- name: restricttotopic
parameters:
invalid_topics: [ “cooking” ]
llm_callable:
metadata: {}
In this example i can’t pass custom llm_callable function. Even though if i try to pass some value, it treats the value as string instead of function. Is there any option to set the llm_callable in config.yml file or do i need to do some workaround?