Skip to main content

A hybrid chatbot.

Project description

Logo WAFL 0.1.0 TestsDocs

Introduction

WAFL is a framework for personal agents. It integrates Large language models, speech recognition and text to speech. This framework combines Large Language Models and rules to create a predictable behavior. A set of rules is used to define the behavior of the agent, supporting function calling and a working memory. The current version requires the user to specify the rules to follow.

Installation

In this version, WAFL is a two-part system. Both can be installed on the same machine.

The two parts of WAFL

Interface side

The first part is local to your machine and needs to have access to a microphone and speaker. To install it, run the following commands:

$ sudo apt-get install portaudio19-dev ffmpeg
$ pip install wafl

After installing the requirements, you can initialize the interface by running the following command:

$ wafl init

which creates a config.json file that you can edit to change the default settings. A standard rule file is also created as wafl.rules. Please see the examples in the following chapters.

LLM side (needs a GPU)

The second part (LLM side) is a model server for the speech-to-text model, the LLM, the embedding system, and the text-to-speech model.

Installation

In order to quickly run the LLM side, you can use the following installation commands:

pip install wafl-llm
wafl-llm start

which will use the default models and start the server on port 8080.

The interface side has a config.json file that needs to be filled with the IP address of the LLM side. The default is localhost. Alternatively, you can run the LLM side by cloning this repository.

Running WAFL

This document contains a few examples of how to use the wafl CLI. There are four modes in which to run the system

$ wafl run

Starts all the available interfaces of the chatbot at the same time.

$ wafl run-audio

This is the main mode of operation. It will run the system in a loop, waiting for the user to speak a command. The activation word is the name defined in config.json. The default name is "computer", but you can change it to whatever you want.

$ wafl run-server

It runs a local web server that listens for HTTP requests on port 8090. The server will act as a chatbot, executing commands and returning the result as defined in the rules.

$ wafl run-cli

This command works as for the run-server command, but it will listen for commands on the command line. It does not run a webserver and is useful for testing purposes.

$ wafl run-tests

This command will run all the tests defined in the file testcases.txt.

Documentation

The documentation can be found at wafl.readthedocs.io.

Mastodon

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wafl-0.1.3.tar.gz (386.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wafl-0.1.3-py3-none-any.whl (406.3 kB view details)

Uploaded Python 3

File details

Details for the file wafl-0.1.3.tar.gz.

File metadata

  • Download URL: wafl-0.1.3.tar.gz
  • Upload date:
  • Size: 386.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.10.0 requests/2.32.3 setuptools/52.0.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/3.9.2

File hashes

Hashes for wafl-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ad4b239b12ac51561cd58df42af0263d376d1ced5d049d3dcd056a37c0327973
MD5 5d5f56c50a6c0ff4a8ce19f2e58d579f
BLAKE2b-256 5132931a1a17af245c48a8ae168e3430274b72ecf1e57e9a1a4f0a9e5a4132b7

See more details on using hashes here.

File details

Details for the file wafl-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: wafl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 406.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.10.0 requests/2.32.3 setuptools/52.0.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/3.9.2

File hashes

Hashes for wafl-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 52295d9b558023278fdf51f37cfb1987a52fd96b914ebb8e62babe866974d0b8
MD5 70d52f555456664012424ebc56544e8d
BLAKE2b-256 9a98ce48685454bdab6c487d93486ecb9a9db40eef153ab5e0a828b7b48a15ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page