Giter Club home page Giter Club logo

chatgptui's Introduction

ChatGPT ๐Ÿค– with Textual User Interface (TUI) mode written in Go.

ChatGPTUI is an interactive tool that allows users to interact with OpenAI's GPT (Generative Pre-trained Transformer) language model in real-time, using a text-based user interface (TUI). This tool provides a convenient and intuitive way to communicate with the language model and generate human-like text responses, making it an ideal tool for anyone looking to explore the capabilities of language models or create conversational applications.

ChatGPTUI is designed to be easy to use and highly customizable. The tool supports a range of configuration options, allowing users to select the language model they want to use, set the length of generated responses, and more. Additionally, ChatGPTUI provides a range of keyboard shortcuts for quick and easy navigation through the available options, making the tool more user-friendly and efficient.

Install

  1. Grab the pre-built binary from the releases page, unpack & run! Or
  2. If you have Go1.19+ compiler installed & configured:
go install github.com/dwisiswant0/chatgptui@latest

Usage

Here are all the options it supports.

$ chatgptui -h

  ChatGPTUI ๐Ÿค– v1.0.0
  --
  ChatGPT with Textual User Interface
  made with ๐Ÿ’– by dw1

Usage: chatgptui [options]

Options:
  -e, --edit         Edit configuration
  -l, --list         List all supported OpenAI model
      --rm           Remove configuration
  -V, --version      Show current version

Examples:
  chatgptui
  chatgptui --edit

Interactive

The TUI mode of the ChatGPT tool can be accessed by running the chatgptui command without any additional flags. Upon executing the command, you will be prompted to provide the necessary configuration inputs that are required to use the language model.

The configuration inputs may include parameters such as the OpenAI API key, model, maximum length of the generated text, etc. These settings can be adjusted to tailor the output generated by the model according to your requirements.

Once you have provided the required configuration inputs, the system will direct you to the chat view model. Here, you can start generating responses by entering your prompts into the interface. The chat view model displays the conversation history, making it easier to keep track of the ongoing conversation.

Shortcuts

To improve the user experience and make ChatGPTUI more user-friendly, the tool offers a range of keyboard shortcuts that can be used in both the configuration and chat view models. These shortcuts allow you to perform various actions quickly, and make it easier to use the tool and interact with the language model.

  • โ†‘/โ†“: Use the up and down arrow keys to navigate through the options in the view model.
  • ctrl+c/esc: Use these keyboard combinations to quit the ChatGPTUI.
  • tab: Use this key to fill in the default value for a field in the configuration view model.

In addition to those shortcuts, ChatGPTUI also provides a convenient way to clear the chat history. Simply type /clear or /c in the text area of the chat view model to clear the chat history and start a new conversation.

Those keyboard shortcuts can help you streamline your workflow & increase your productivity, and save your time & make the ChatGPTUI tool more convenient to use. They allow you to navigate through the available options quickly, fill in default values easily, and clear the chat history with just a few keystrokes, improving your overall experience with the tool!

Configurations

When you run the chatgptui command, it will immediately direct you to the chat view model, where you can start chatting with the language model. The chat view model will display the conversation history, and you can type in your prompt to generate a response from the model.

If you want to change any of the configuration settings, such as the model or temperature, you can use the -e/--edit flag. This will redirect you to the configuration view model, where you can modify the necessary fields according to your needs. Once you've updated the configuration, you can return to the chat view model to continue chatting with the updated settings.

chatgptui --edit

In case you want to remove the configuration entirely, you can use the --rm flag. This will delete the configuration and all associated data, allowing you to start fresh with a new configuration.

chatgptui --rm

Models

ChatGPTUI provides support for multiple OpenAI language models, each with its own unique set of features and capabilities. To view a list of all the available models that you can choose from when configuring the language model, you can use the -l/--list flag.

Using the -l flag will display a list of all the OpenAI models that are currently supported by ChatGPTUI.

$ chatgptui --list
gpt-4-32k-0314
gpt-4-32k
gpt-4-0314
gpt-4
gpt-3.5-turbo-0301
gpt-3.5-turbo
text-davinci-003
text-davinci-002
text-curie-001
text-babbage-001
text-ada-001
text-davinci-001
davinci-instruct-beta
davinci
curie-instruct-beta
curie
ada
babbage
code-davinci-002
code-cushman-001
code-davinci-001

By viewing this list, you can easily select the model that best fits your needs, based on its capabilities and performance. Once you have selected the model you want to use, you can configure it according to your requirements using the configuration view model.

Acknowledments

ChatGPTUI built with sashabaranov/go-openai, and bubbles, bubbletea & lipgloss by charmbracelet.

License

Contributions are welcome!

ChatGPTUI released under MIT. See LICENSE file.

chatgptui's People

Contributors

dwisiswant0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chatgptui's Issues

example usage doesn't work as expected, "this model is not supported with this method"

> gpt-3.5-turbo-0301
> 0.700000
> 256
> 1.000000

when I launch the binary from the releases page (./blah) i can edit the connection above with my own API key.

but anything i type into the interface says:

 this model is not supported with this method, please use CreateChatCompletion client method instead

i originally tried gpt-3.5-turbo with the same results, i really was just trying to do the demo hello-world-esque questions ("president of indonesia") in the animated image in the README.

i did go install github<โ€ฆ>chatgptui@latest prior to this and i'm not very comfortable with go and i don't know where it installed anything. there doesn't seem to be a binary named chatgptui installed when i did go install <โ€ฆ>?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.