PyRobBot is a python package that uses OpenAI's GPT large language models (LLMs) to implement a fully configurable personal assistant that, on top of the traditional chatbot interface, can also speak and listen to you using AI-generated human-like voices.
Features
Features include, but are not limited to:
-
Voice Chat
- Continuous voice input and output
- No need to press a button: the assistant will keep listening until you stop talking
-
Internet access: The assistent will search the web to find the answers it doesn't have in its training data
- E.g. latest news, current events, weather forecasts, etc.
- Powered by DuckDuckGo Search
-
Web browser user interface
- See our demo app on Streamlit Community Cloud
- Voice chat with:
- Continuous voice input and output (using streamlit-webrtc)
- If you prefer, manual on/off toggling of the microphone (using streamlit_mic_recorder)
- A familiar text interface integrated with the voice chat, for those who prefer a traditional chatbot experience
- Your voice prompts and the assistant's voice replies are shown as text in the chat window
- You may also send promts as text even when voice detection is enabled
- Add/remove conversations dynamically
- Automatic/editable conversation summary title
- Autosave & retrieve chat history
- Resume even the text & voice conversations started outside the web interface
-
Chat via terminal
- For a more "Wake up, Neo" experience
-
Fully configurable
- Large number of supported languages (e.g.,
rob --lang pt-br) - Support for multiple LLMs through the OpenAI API
- Choose your preferred Text-to-Speech (TTS) and Speech-To-Text (STT) engines (google/openai)
- 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
- Large number of supported languages (e.g.,
-
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 it in the Web UI or through the environment variable
OPENAI_API_KEY
- Set it in the Web UI or through the environment variable
- To enable voice chat, you also need:
Installation
This, naturally, assumes your system fulfills all requirements.
Regular Installation
The recommended way for most users.
Using pip
pip install pyrobbot
From the GitHub repository
pip install git+https://github.com/paulovcmedeiros/pyRobBot.git
Developer-Mode Installation
The recommended way for those who want to contribute to the project. We use poetry with the poethepoet plugin. To get everything set up, run:
# Clean eventual previous install
curl -sSL https://install.python-poetry.org | python3 - --uninstall
rm -rf ${HOME}/.cache/pypoetry/ ${HOME}/.local/bin/poetry ${HOME}/.local/share/pypoetry
# Download and install poetry
curl -sSL https://install.python-poetry.org | python3 -
# Install needed poetry plugin(s)
poetry self add 'poethepoet[poetry_plugin]'
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).
Using the Web UI (defult, supports voice & text chat)
rob
See also our demo Streamlit app!
Chatting Only by Voice
rob voice
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.
Metadata
Release files for pyrobbot 0.7.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyrobbot-0.7.6.tar.gz | 377.7 kB | Without provenance | Details for pyrobbot-0.7.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyrobbot-0.7.6-py3-none-any.whl | Python 3 | none | any | Details for pyrobbot-0.7.6-py3-none-any.whl |
Total release size: 736.9 kB
Release files / pyrobbot-0.7.6.tar.gz
| Download URL | pyrobbot-0.7.6.tar.gz |
|---|---|
| Size | 377.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e465f4d37536e52f2f3ecb744ae754fbddd6a015f41da9e477aa1bb2baf6e6cc
|
|
BLAKE2b-256 checksum How to use checksums |
dcc14de41a03299148aae4b3db22f387a79f087f850340fd9fc397f157b3dca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.9.18 Linux/5.14.0-362.18.1.el9_3.x86_64
|
Release files / pyrobbot-0.7.6-py3-none-any.whl
| Download URL | pyrobbot-0.7.6-py3-none-any.whl |
|---|---|
| Size | 359.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ca290f981061b34a6e60727125c554dccc9134127eccb92947746733d0d515f
|
|
BLAKE2b-256 checksum How to use checksums |
c06d0e31a4292d6838f3ebb345e7d5f56e63e7e912082fc03b3a544333c95603
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.9.18 Linux/5.14.0-362.18.1.el9_3.x86_64
|
Security for pyrobbot 0.7.6
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.