Skip to main content

GPT chatbot using OpenAI API

Project description

Streamlit App

GitHub

Contributors Welcome Linting Tests codecov

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 and try the demo app on Streamlit!

Features

  • Web UI
    • Add/remove conversations dynamically
    • Automatic/editable conversation summary title
  • 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
  • Chat context handling using embeddings
  • Estimated API token usage and associated costs
  • Terminal UI (for a more "Wake up, Neo" experience")
  • 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

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


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.1.6.tar.gz (124.4 kB view details)

Uploaded Source

Built Distribution

pyrobbot-0.1.6-py3-none-any.whl (125.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrobbot-0.1.6.tar.gz
  • Upload date:
  • Size: 124.4 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

Hashes for pyrobbot-0.1.6.tar.gz
Algorithm Hash digest
SHA256 3c1f019e521be37a81b2b8a042ddac362918fe0206b1a01f3b2b2bf58c409317
MD5 a70ad30ecbf5327dfda010bd9a0545b7
BLAKE2b-256 c2911c379257f88a5d4f32ca0a0bbbedf1c3c3f7634a59938661919ff62e8f7e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrobbot-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 125.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

Hashes for pyrobbot-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ba95b210ec1806a8aea0dfcc8f8a4026ac0bcd0172bcc3f294f0cfe5fb89eb76
MD5 cd3ca5896f4f890878d673b55c57705c
BLAKE2b-256 c8a0daf7f59574e8bfc86ac94f83a652f082c5f98ae79d64627334f0a6b6d75f

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