Closed cvarun94 closed 1 year ago
+1
Hi @cvarun94!
You can use the RailsConfig.from_content(colang_content, yaml_content)
method (https://github.com/NVIDIA/NeMo-Guardrails/blob/main/nemoguardrails/rails/llm/config.py#L204). You can see examples in some of the tests e.g. https://github.com/NVIDIA/NeMo-Guardrails/blob/main/tests/test_flow_when.py#L19.
You can generate the colang_content
and yaml_content
dynamically from your python code. Is this what you meant or was it something else?
Hi,
Thank you for the opensource tool. I want to create the config files (instruction, sample conversation) and the colang files (having canonical definition and flow definition) programmatically from python code itself. My aim is to take these as inputs using python and generate the config and colang files. Is this possible using nemoguardrails python-api and how to do this?