Skip to main content

Chat with GPT LLMs over voice, UI & terminal. All with access to the internet. Powered by OpenAI.

Project description

pyrobbot-logo

pyRobBot
Chat with GPT LLMs over voice, UI & terminal.
All with access to the internet.

Pepy Total Downlods PyPI - Version Streamlit App

Poetry Contributors Welcome Linting Tests codecov

PyRobBot is a python package that uses OpenAI's GPT large language models (LLMs) to implement:

  • A fully configurable personal assistant that can speak and listen to you
  • An equally fully configurable text-based chatbot that can be used either via web UI or terminal

Features

  • Personal assistant with text-to-speech and speech-to-text capabilities
    • Talk to the GPT assistant and the assistant will talk back to you!
    • Choose your preferred language (e.g., rob --lang pt-br)
    • Choose your preferred Text-to-Speech (TTS) engine (e.g., rob --tts google)
    • Choose your preferred Speech-to-Text (STT) engine
      • Also between OpenAI and Google (default)
  • Web browser UI (made with Streamlit)
    • Add/remove conversations dynamically
    • Automatic/editable conversation summary title
    • Input via text or voice
  • Terminal UI
    • For a more "Wake up, Neo" experience
  • Internet access: The assistent will search the web and to find the answers it doesn't have in its training data
    • E.g. current events, weather forecasts, etc.
  • Fully configurable
    • Support for multiple GPT LLMs
    • Control over the parameters passed to the OpenAI API, with (hopefully) sensible defaults
    • Ability to pass base directives to the LLM
      • E.g., to make it adopt a persona, but you decide which directived to pass
    • Dynamically modifiable AI parameters in each chat separately
      • No need to restart the chat
  • Autosave & retrieve chat history
    • In the browser UI, you can even read the transcripts of your voice conversations with the AI
  • Chat context handling using embeddings
  • Estimated API token usage and associated costs
  • OpenAI API key is never stored on disk

System Requirements

  • Python >= 3.9
  • A valid OpenAI API key
    • Set in the Web UI or through the environment variable OPENAI_API_KEY
  • To enable voice chat, you also need:
    • PortAudio
      • Install on Ubuntu with sudo apt-get --assume-yes install portaudio19-dev python-all-dev
      • Install on CentOS/RHEL with sudo yum install portaudio portaudio-devel
    • ffmpeg
      • Install on Ubuntu with sudo apt-get --assume-yes install ffmpeg
      • Install on CentOS/RHEL with sudo yum install ffmpeg

Installation

This, naturally, assumes your system fulfills all requirements.

Using pip

pip install pyrobbot

From source

pip install git+https://github.com/paulovcmedeiros/pyRobBot.git

Basic Usage

Upon succesfull installation, you should be able to run

rob [opts] SUBCOMMAND [subcommand_opts]

where [opts] and [subcommand_opts] denote optional command line arguments that apply, respectively, to rob in general and to SUBCOMMAND specifically.

Please run rob -h for information about the supported subcommands and general rob options. For info about specific subcommands and the options that apply to them only, please run rob SUBCOMMAND -h (note that the -h goes after the subcommand in this case).

Chatting by Voice (default)

rob

Using the Web UI

rob ui

See also our demo Streamlit app!

Running on the Terminal

rob .

Disclaimers

This project's main purpose has been to serve as a learning exercise for me, as well as tool for experimenting with OpenAI API, GPT LLMs and text-to-speech/speech-to-text.

While it does not claim to be the best or more robust OpenAI-powered chatbot out there, it does aim to provide a friendly user interface that is easy to install, use and configure.

Feel free to open an issue or, even better, submit a pull request if you find a bug or have a suggestion.

Last but not least: This project is independently developed and not affiliated, endorsed, or sponsored by OpenAI in any way. It is separate and distinct from OpenAI’s own products and services.

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

pyrobbot-0.6.2.tar.gz (144.0 kB view details)

Uploaded Source

Built Distribution

pyrobbot-0.6.2-py3-none-any.whl (146.9 kB view details)

Uploaded Python 3

File details

Details for the file pyrobbot-0.6.2.tar.gz.

File metadata

  • Download URL: pyrobbot-0.6.2.tar.gz
  • Upload date:
  • Size: 144.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/5.14.0-362.18.1.el9_3.x86_64

File hashes

Hashes for pyrobbot-0.6.2.tar.gz
Algorithm Hash digest
SHA256 e5c57085e45975c66bb911c008be2e6204dcc8043e612e9b0554d579578b8480
MD5 192042c3df43191e2ca4c002e342f0de
BLAKE2b-256 32e808950834716a94d7b543609c4e221519a75c2dca4574f76c67302354e666

See more details on using hashes here.

File details

Details for the file pyrobbot-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: pyrobbot-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 146.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/5.14.0-362.18.1.el9_3.x86_64

File hashes

Hashes for pyrobbot-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6b4196d9d79a05603ff70b8ff10b8a9969adedd74c6366ea2ecb987e62fa2aa
MD5 1707abaaad0161cd39d6b641572ef1c6
BLAKE2b-256 25fb11321531f268fe6a6bb226be236560d7206207e2f9ed7314c9431d2d7758

See more details on using hashes here.

Supported by

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