Nardial Dialog System
Project description
NarDialPy
NarDialPy is a Python framework for building and running narrative dialogs.
It combines:
- Dialog blocks written as JSON (
functional,narrative, andchitchatdialogs) - A session manager that executes a chosen dialog agenda
- Voice / NLU / LLM services (Dialogflow, Google TTS, OpenAI GPT via
social-interaction-cloud)
The repository includes a complete demo conversation in the examples/ folder that shows how these parts work together.
Repository layout
src/nardial/– core runtime (dialog loading, move execution, session flow)examples/demo_general_conversation.py– runnable demo entrypointexamples/dialogs.json– demo dialogs (conversation content)web/authoring/– browser-based dialog authoring UItests/– unit tests for move handling and dialog behavior
How the demo conversation works
The demo script (examples/demo_general_conversation.py) creates a ConversationAgent, then runs a fixed agenda through SessionManager:
session_agenda = ["greeting", "hero_can_dream_1", "dream12", "goodbye"]
Those dialog IDs are resolved from examples/dialogs.json, which contains declarative move sequences such as:
sayask_openask_yesnoask_optionsbranch(outcome-based branching)
This makes it easy to edit conversation behavior without changing Python code.
Quick start (demo)
1) Install
From the repository root:
pip install -e .
Install/update cloud integrations used by the demo:
pip install --upgrade social-interaction-cloud[dialogflow,google-tts,openai-gpt]
2) Configure credentials
- Create Dialogflow credentials and save to:
conf/dialogflow/google_keyfile.json - Create an OpenAI API key and save to:
conf/openai/.openai_env- API keys: https://platform.openai.com/api-keys
Example .openai_env:
OPENAI_API_KEY="your key"
Never commit or share credential files.
3) Configure the Dialogflow agent
In your Dialogflow agent:
- Remove default intents.
- Go to Settings → Import and Export.
- Import
resources/droomrobot_dialogflow_agent.zipto load the intents/entities used by the demo.
4) Start required services
In separate terminals:
conf/redis/redis-server.exe conf/redis/redis.conf
run-dialogflow
run-google-tts
run-gpt
5) Run the demo conversation
From examples/:
python demo_general_conversation.py
Use a supported device configuration in the script (desktop by default).
Customizing conversations
- Edit
examples/dialogs.jsonto add or modify dialog blocks. - Update the
session_agendainexamples/demo_general_conversation.pyto change the order/content of a run. - Use
web/authoring/if you prefer editing dialogs through the browser UI.
Development
Run tests from the repository root:
python -m pytest -q
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nardial-0.1.8.tar.gz.
File metadata
- Download URL: nardial-0.1.8.tar.gz
- Upload date:
- Size: 59.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84f3b1cc7228a773559188dcd64a886cda107f6a95aae4db1086b2dd7585e016
|
|
| MD5 |
13203b36c6ce48d9abd31b480f683e20
|
|
| BLAKE2b-256 |
8876b80d50aacd95bea3504c89196d8193e77ea1c2890a60654a9a20efb6774b
|
Provenance
The following attestation bundles were made for nardial-0.1.8.tar.gz:
Publisher:
publish.yml on Social-AI-VU/NarDialPy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nardial-0.1.8.tar.gz -
Subject digest:
84f3b1cc7228a773559188dcd64a886cda107f6a95aae4db1086b2dd7585e016 - Sigstore transparency entry: 1397657082
- Sigstore integration time:
-
Permalink:
Social-AI-VU/NarDialPy@17cf0c4dcf75be119cdc54ed2b2f855bda968bf3 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/Social-AI-VU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17cf0c4dcf75be119cdc54ed2b2f855bda968bf3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nardial-0.1.8-py3-none-any.whl.
File metadata
- Download URL: nardial-0.1.8-py3-none-any.whl
- Upload date:
- Size: 57.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b904b177dd50c65560b305e05366b6c28914e2b4aedd7ef4ae927d98ede0f7d
|
|
| MD5 |
aca6ed31cea1db2fd97d3a9273173d56
|
|
| BLAKE2b-256 |
a2926d1da98eda823e831839d50296138f32d41b283ed0181cff205e83594071
|
Provenance
The following attestation bundles were made for nardial-0.1.8-py3-none-any.whl:
Publisher:
publish.yml on Social-AI-VU/NarDialPy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nardial-0.1.8-py3-none-any.whl -
Subject digest:
0b904b177dd50c65560b305e05366b6c28914e2b4aedd7ef4ae927d98ede0f7d - Sigstore transparency entry: 1397657104
- Sigstore integration time:
-
Permalink:
Social-AI-VU/NarDialPy@17cf0c4dcf75be119cdc54ed2b2f855bda968bf3 -
Branch / Tag:
refs/tags/v0.1.8 - Owner: https://github.com/Social-AI-VU
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17cf0c4dcf75be119cdc54ed2b2f855bda968bf3 -
Trigger Event:
release
-
Statement type: