Simple GPT chatbot using OpenAI API
Project description
pyRobBot
A simple chatbot that uses the OpenAI API to get responses from GPT LLMs via OpenAI API. Written in Python with a Web UI made with Streamlit. Can also be used directly from the terminal.
See also the demo app on Streamlit.
Features
- Web UI
- Add/remove conversations dynamically
- Fully configurable
- Support for multiple GPT LLMs
- Control over the parameters passed to the OpenAI API, with (hopefully) sensible defaults
- Ability o modify the chat parameters in the same conversation
- Each conversation has its own parameters
- Autosave and retrieve chat history
- Chat context handling using embeddings
- Kepp track of estimated token usage and associated API call costs
- Terminal UI
System Requirements
- Python >= 3.9
- A valid OpenAI API key
- Set in the Web UI or through the environment variable
OPENAI_API_KEY
- Set in the Web UI or through the environment variable
Installation
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).
Using the Web UI
rob
Running on the Terminal
rob .
Disclaimers
This project's main purpose is to serve as a learning exercise for me (the author) and to serve as tool for and experimenting with OpenAI API and GPT LLMs. It does not aim to be the best or more robust OpenAI-powered chatbot out there.
Having said this, this project does aim to have a friendly user interface and to be easy to use and configure. So, please feel free to open an issue or submit a pull request if you find a bug or have a suggestion.
Last but not least: this project is not affiliated with OpenAI in any way.
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
File details
Details for the file pyrobbot-0.1.4.tar.gz
.
File metadata
- Download URL: pyrobbot-0.1.4.tar.gz
- Upload date:
- Size: 123.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.16 Linux/5.14.0-284.30.1.el9_2.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2749c200be1e7d44e9d3d9da152b8019cefcd0bd20ed4851227670de9bca1386 |
|
MD5 | 0453315540a47f4ca1a97fed927c2649 |
|
BLAKE2b-256 | 4ec8970397f356c5802ea333248c761062bcf962b4ffc6abe851f3b059dffda2 |
File details
Details for the file pyrobbot-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: pyrobbot-0.1.4-py3-none-any.whl
- Upload date:
- Size: 124.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.16 Linux/5.14.0-284.30.1.el9_2.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42b06eabaad87e6aef78afeb9db6f33f62272817895bd211475a6c2b69fe4320 |
|
MD5 | 90f50de70865544cae101b780ab99ff1 |
|
BLAKE2b-256 | ec55653de91afd45979de4e03705f9f65d9b26d46297e174c78833f1dad340f4 |