This repository has been archived by the owner. It is now read-only.

openai-code-editor

Small commands using OpenAI's API

OpenAI code-editor

Command-line tools to perform code/text editing using the OpenAI API. (text-davinci-edit-001, code-davinci-edit-001)

To use this tool, an OpenAI Access Token is required.

Please Set ENV["OPENAI_API_KEY"]

Install

make
sudo make install

Usage

code-editor -i "Add documenations" foo.rb

This tool overwrites files. It is recommended to use it in a Git-controlled directory.

Options

Usage: code-editor [options]
    -m STR, --model STR              ID of the model to use
    -T, --text                       Use text model
    -C, --code                       Use code model
    -i STR, --instruction STR        The instruction that tells the model how to edit the prompt.
    -n INT                           How many edits to generate for the input and instruction.
    -t Float, --temperature Float    Sampling temperature between 0 and 2 affects randomness of output.
    -p Float, --top_p Float          Nucleus sampling considers top_p probability mass for token selection.
    -o [FILE], --output [FILE]       Output file name
    -d, --debug                      Print request data
    -v, --version                    Show version
    -h, --help                       Show help

ChatGPT

This repository contains scripts that allow ChatGPT to be run interactively.

crystal build chatgpt.cr
chatgpt

This tool allows you to load files using placeholders.

> Please read the code #{chatgpt.cr}

Contributing

Bug reports and pull requests are welcome on GitHub.

License

The gem is available as open source under the terms of the MIT License.

Repository

openai-code-editor

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 1
  • almost 2 years ago
  • March 8, 2023
License

MIT License

Links
Synced at

Sun, 22 Dec 2024 19:52:53 GMT

Languages