Skip to main content

npc-engine

NPC-Engine is a deep learning and NLP toolkit for designing NPC AI with natural language.

Build Status Build Status

Features

  • Chat-bot dialogue system.
  • SoTA tools like text semantic similarity and text to speech.
  • Easy, open source deep learning model standard (ONNX with YAML configs).
  • GPU accelerated inference with onnxruntime.
  • Engine agnostic API through ZMQ server via JSONRPC 2.0.

Getting started

The easiest way to get started is to use NPC Engine through the Unity integration

You can also use it directly through ZMQ or HTTP. See Documentation for more details.

Roadmap

Done:

  • Real-time end-to-end chatbot dialogue system
  • Semantic similarity
  • Real-time speech to text (experimental)
  • Unity integration
  • CLI tool for importing models from Huggingface
  • Asynchronous API features

In progress:

  • Actions and planning
  • Unreal integration
  • Importing models from popular TTS libraries
  • Emotion features
  • Multiple languages support
  • Much more

Build on Windows

  • Create virtualenv and activate it:

    > python3 -m venv npc-engine-venv
    > .\npc-engine-venv\activate.bat
    
  • Install dependencies

    > pip install -e .[dev,dml]
    
  • (Optional) Compile, build and install your custom ONNX python runtime

    Build instructions here https://onnxruntime.ai/

  • (Optional) Run tests

    > tox
    
  • Compile to exe with:

    > pyinstaller --hidden-import="sklearn.utils._cython_blas" --hidden-import="sklearn.neighbors.typedefs" ^
    --hidden-import="sklearn.neighbors.quad_tree" --hidden-import="sklearn.tree._utils" ^
    --hidden-import="sklearn.neighbors._typedefs" --hidden-import="sklearn.utils._typedefs" ^
    --hidden-import="sklearn.neighbors._partition_nodes" --additional-hooks-dir hooks ^
    --exclude-module tkinter --exclude-module matplotlib .\npc_engine\cli.py --onedir
    

Docker

If you wish to host NPC Engine somewhere you can use our the docker image. It's Linux image with TensorRT ONNX Runtime provider.

You can build it yourself with:

docker build -t npc-engine .

To run the image you must mount the models directory to /app/models e.g.

docker run --gpus all -it --mount type=bind,source=%cd%\tests\resources\models,target=/app/models -p 5000:5000 npc-engine/inference-engine:latest npc-engine run --port 5000

Where --gpus all will give access to the GPU, -it will output logs and let you use the container interactively, --mount will mount the models directory to the container, -p 5000:5000 will expose the port 5000 on the host machine.

Community

We have a Discord server where you can get support, ask questions and show off your creations.

If you would like to donate, you can check out our Patreon.

Our Patrons

  • Marrech Games

Authors

  • eublefar - Python, Neural Nets - github
  • igorzmitrovich - Python, CI/CD - github

See also the list of contributors who participated in this project.

Metadata

Release files for npc-engine 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for npc-engine 0.1.8
File Size Uploaded Provenance Actions
npc-engine-0.1.8.tar.gz 39.6 kB Without provenance Details for npc-engine-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for npc-engine 0.1.8
File Interpreter ABI Platform Actions
npc_engine-0.1.8-py3-none-any.whl Python 3 none any Details for npc_engine-0.1.8-py3-none-any.whl

Total release size: 94.0 kB

Release files / npc-engine-0.1.8.tar.gz

Download URL npc-engine-0.1.8.tar.gz
Size 39.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f8848cd279941b9825807ef5338c14d1d9dacd2341b4f840f089d7997b67e10b
BLAKE2b-256 checksum
How to use checksums
eac9f486e0c7a2a6c5f3158839e61319b0ef1e64a65967a974117d144373b41f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / npc_engine-0.1.8-py3-none-any.whl

Download URL npc_engine-0.1.8-py3-none-any.whl
Size 54.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f1c940d35bb41134a2b13fdba57b9c009a743808d083fb698ddd68f379a8020
BLAKE2b-256 checksum
How to use checksums
dd23517232c3d9afc39e903ffc665d2700f0b0cc8cff4dc61b0a5e7fd6262682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Security for npc-engine 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page