NeMo-Guardrails
NeMo-Guardrails copied to clipboard
Execution of action in parallel with input guardrails
I'm trying to make my bot fast in responding to the user. So, instead of waiting for the input guardrail to finish, I want to use colang logic to determine by action and fetch the context; meanwhile, the input guardrails decide whether to allow the input or reject.
This was context/retrieved knowledge ready for inference or some other action by the time the guardrails had passed.
Is there a way to do this now? Currently, I'm utilising 2 Nemo apps to make this happen (Hacky way)
Hi @maneeshv8! Currently, this is not possible. We'll think of a way to enable this through a flag, and it will be part of #256. Thanks for bringing this up. Good timing.
Ok. Thanks for the response @drazvan. I am looking forward to that change.
Hi @drazvan I am looking for the same feature but couldn't find in merged PR. If it is added is there any chance to give an example usage?
Hi @curefatih! That feature did not make it, unfortunately. It should make it to 0.10.0, though.
As a workaround, you can achieve this by making to parallel calls from your code. One that only triggers the input rails and one that only triggers the others (https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/docs/user_guides/advanced/generation-options.md#disabling-rails).
Thanks a lot for the quick response @drazvan Make sense to use by switching the rail in this case as you suggested