Git Product home page Git Product logo

chatgpt-shell-cli's Introduction

chatGPT-shell-cli

Just simplifed the original script, and make it can remember our conversation. original repo 0xacx / chatGPT-shell-cli.

Installation

  • Download chatgpt_m.sh
  • $export OPENAI_KEY=your_key_here
  • If you are using iTerm and want to view images in terminal, install imgcat

usage,

  • ./chatgpt_m.sh
  • set alias 'chatgpt' for './chatgpt_m.sh'
# init
$ chatgpt
$ chatgpt -f <your file>
# Interactive input start
mass of sun
image: cat
history
models / model:
command: convert .avi to .mp4
# one liner
$ echo "How to view running processes on Ubuntu?" | chatgpt
$ chatgpt -p "What is the regex to match an email address?"
  • -i, you can customize initial chat prompt to use in chat context mode.
  • -f / -ip, You can also set an initial chat prompt from a file with --init-prompt-from-file i.e. chatgpt --init-prompt-from-file myprompt.txt
  • Interactive commands:
    • image: To generate images, start a prompt with image: If you are using iTerm, you can view the image directly in the terminal. Otherwise the script will ask to open the image in your browser.
    • history To view your chat history, type history
    • models To get a list of the models available at OpenAI API, type models
    • model: To view all the information on a specific model, start a prompt with model: and the model id as it appears in the list of models. For example: model:text-babbage:001 will get you all the fields for text-babbage:001 model
    • command: To get a command with the specified functionality and run it, just type command: and explain what you want to achieve. The script will always ask you if you want to execute the command. i.e. command: show me all files in this directory that have more than 150 lines of code If a command modifies your file system or dowloads external files the script will show a warning before executing.

GPT4

  • If you have access to the GPT4 model you can use it by setting the model to gpt-4, i.e. chatgpt --model gpt-4

Set request parameters

  • To set request parameters you can start the script like this: chatgpt --temperature 0.9 --model text-babbage:001 --max-tokens 100 --size 1024x1024 The available parameters are:
    • temperature, -t or --temperature
    • model, -m or --model
    • max number of tokens, --max-tokens
    • image size, -s or --size (The sizes that are accepted by the OpenAI API are 256x256, 512x512, 1024x1024)
    • one line prompt, -p or --prompt
    • one line prompt from a file in your file system, -pf or --prompt-from-file

Defaults

  • TEMPERATURE = 0.5
  • MAX_TOKENS = 1024
  • SIZE = 512x512
  • CONTEXT = true

chatgpt-shell-cli's People

Contributors

0xacx avatar axilleasx avatar biaocy avatar camatgithub avatar dmd avatar emirkmo avatar keyboardsage avatar martleth avatar np avatar nre-ableton avatar oligeo avatar rexackermann avatar rxaviers avatar tobiaslaving avatar tomas223 avatar

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.