NVIDIA / NeMo-Guardrails

NeMo Guardrails is an open-source toolkit for easily adding programmable guardrails to LLM-based conversational systems.
Other
3.73k stars 331 forks source link

Colang 2.0 multi_modal tutorial error #527

Open rgstephens opened 1 month ago

rgstephens commented 1 month ago

Running the multi_modal_demo_v2_x tutorial when trying to start the number guessing flow, play the number guessing game, it fails with this error if I run it as a server.

Total processing took 0.33 seconds. LLM Stats: 0 total calls, 0 total time, 0 total tokens, 0 total prompt tokens, 0 total completion tokens, [] as latencies
INFO:     127.0.0.1:53421 - "POST /v1/chat/completions HTTP/1.1" 200 OK
ERROR:nemoguardrails.server.api:Providing `assistant` messages as input is not supported for Colang 2.0 configurations.
Traceback (most recent call last):
  File "/Users/greg/Dev/nemo/NeMo-Guardrails-rgstephens/nemoguardrails/server/api.py", line 337, in chat_completion
    res = await llm_rails.generate_async(
  File "/Users/greg/Dev/nemo/NeMo-Guardrails-rgstephens/nemoguardrails/rails/llm/llmrails.py", line 629, in generate_async
    events = self._get_events_for_messages(messages, state)
  File "/Users/greg/Dev/nemo/NeMo-Guardrails-rgstephens/nemoguardrails/rails/llm/llmrails.py", line 490, in _get_events_for_messages
    raise ValueError(
ValueError: Providing `assistant` messages as input is not supported for Colang 2.0 configurations.

Does this demo require a special UI?

drazvan commented 1 month ago

The server UI does not work with Colang 2.0. You can only test it through the nemoguardrails chat CLI. We'll try to fix for 0.10 as well.

rgstephens commented 1 month ago

Thanks, with the multi-modal gestures are there any interfaces that you're working with that support this with graphics or digital human interfaces?