Closed AadarshBhalerao closed 1 month ago
Hey @AadarshBhalerao i dont think current code base directly provide a way to pass by generate_next_step
, generate_bot_message
or any task that is part of dialog
rails. check below https://github.com/NVIDIA/NeMo-Guardrails/blob/4fbddce0a02232af33e4958618914a1d3b4bfd37/nemoguardrails/rails/llm/options.py#L35C1-L43C1 :
To invoke only some specific input/output rails:
rails.generate(messages=messages, options={
"rails": {
"input": ["check jailbreak"],
"output": ["output moderation v2"]
}
})
But mentioned task are part of dialog
& dialog is take a boolean value
https://github.com/NVIDIA/NeMo-Guardrails/blob/4fbddce0a02232af33e4958618914a1d3b4bfd37/nemoguardrails/rails/llm/options.py#L126
For reference, pasting this here: https://docs.nvidia.com/nemo/guardrails/user_guides/advanced/generation-options.html#input-rails-only.
res = rails.generate(messages=[{
"role": "user",
"content": "Some user input."
}], options={
"rails": ["input"]
})
Hello!
After the input rail, when the library runs the
generate_user_intent
, is there a way to stop further findinggenerate_next_step
andgenerate_bot_message
. As we have a seprate OpenAI model dedicated to give RAG based answer to the user asked query.We need NeMo Guardrails at input and then to generate_user_intent only. Once the intend is understood we can then setup another code to take it ahead from there.