bug: The custom variables passed to register_prompt_context are not substituted in general_instructions #925
Labels
bug
Something isn't working
status: needs triage
New issues that have not yet been reviewed or categorized.
Did you check docs and existing issues?
Python version (python --version)
Python 3.11
Operating system/version
MacOS 14.6.1 (Sonoma)
NeMo-Guardrails version (if you must use a specific version and not the latest
0.11.0
Describe the bug
The context variables set as part of
rails.register_prompt_context(<key>, <value>)
are not passed to thegeneral_instructions
section for the generic prompt.In line 902 of
[nemo](https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/nemoguardrails/actions/llm/generation.py)
, I think the set context is not sent to the prompt rendering part.Kindly treat this as urgent and fix it.
Thanks,
Paddy
Steps To Reproduce
general_instructions
section ofconfig.yml
with a custom variablerails.register_prompt_conext(<key>, <value>)
Expected Behavior
The prompt used as part of
general_instructions
section should honour the custom variables set usingrails.register_prompt_conext(<key>, <value>)
Actual Behavior
The prompt used as part of
general_instructions
section is not receiving the custom variables set usingrails.register_prompt_conext(<key>, <value>)
The text was updated successfully, but these errors were encountered: