Gaming Non-Playing Character (NPC) Bot#
This section describes the sample bots available showcasing how you can:
build LLM driven Natural Language Understanding (NLU) and Natural Language Generation (NLG) capabilities for non-playable characters in a game.
There are two sample NPC bots provided as part of the NVIDIA ACE Agent release. Each bot corresponds to one unique character in the game, having a unique personality, and backstory. You can find the backstories for the two characters in the samples/jin/plugin_config.yaml
and samples/elara/plugin_config.yaml
files respectively. You can change this backstory, if needed, based on the character you are designing. The placeholders in this backstory denoted by {{ }}
are populated by a custom plugin module at runtime.
Follow the directory structure of samples/npc_bots
to understand how to organize multiple bots in a single directory. These bots use NVIDIA API Catalog’s nemotron-mini-4b-instruct
as the main model.
The Gaming NPC bot showcases the following ACE Agent features:
Low latency using ASR 2 pass End of Utterance (EOU)
Always-on Barge-In support
Integrating SLM model with the bot Custom SLM prompts for each character
Support deployment using Event Architecture
Docker-based bot deployment
The NPC sample bot utilizes nemotron-mini-4b-instruct
from the NVIDIA API Catalog.
Set the API key for the NVIDIA API Catalog.
export NVIDIA_API_KEY=...
Prepare the environment for the Docker compose commands.
export BOT_PATH=./samples/npc_bots/{bot_name} source deploy/docker/docker_init.sh
Deploy the Speech and NLP models required for the bot. This might take 20-40 minutes for the first time. With the Stock Market sample bot, Riva ASR (Automatic Speech Recognition) and TTS (Text to Speech) models will be deployed.
docker compose -f deploy/docker/docker-compose.yml up model-utils-speech
Deploy the ACE Agent microservices. Deploy the Chat Engine, Plugin server, and NLP server containers.
docker compose -f deploy/docker/docker-compose.yml up speech-event-bot -d
Interact with the bot using the URL
http://<workstation IP>:7006/
.