NeMo-Guardrails icon indicating copy to clipboard operation
NeMo-Guardrails copied to clipboard

How to initialize the Context variable in the UI

Open cyun9601 opened this issue 1 year ago • 2 comments

Hello.

I understand that the way to pass context to chat in API format is "role":"context". What if I want to put a specific value in the Context variable on startup from the UI as well?

cyun9601 avatar Apr 30 '24 08:04 cyun9601

Hi @cyun9601!

The content for the message with "role": "context" is a dict, and every key in the dict will be available in the context of the conversation. Typically, you would put that as the first message. But you can have as many such messages as you want, and they can be at any point in the conversation.

drazvan avatar Apr 30 '24 20:04 drazvan

In the Chat UI provided by nemoguardrails, there is no function to set the initial variable value ?

cyun9601 avatar May 02 '24 09:05 cyun9601