package
1.2.4
Repository: https://github.com/wikylyu/gopenai.git
Documentation: pkg.go.dev

# README

GOpenAI Command line tool

This is a Command line tool built with GOpenAI, it allows you to call OpenAI api from terminal without any code.

It's very convenient for testing.

Build

make build

It will build executable file located in ./bin/gopenai.

Install

Run following command in tool directory.

make install

It will install gopenai to GOPATH/bin.

Usage

Create Completion

OPENAI_API_KEY=yourkey gopenai completion create --model=text-davinci-003 --prompt="Say this is a test" --max-tokens=200

List Models

OPENAI_API_KEY=yourkey gopenai model list

Chat

OPENAI_API_KEY=yourkey gopenai chat create -m 'gpt-3.5-turbo' --messages "[{\"role\":\"user\",\"content\":\"Who are you?\"}]"

More

use

gopenai --help

for more details

Features

  • Model
    • Create
    • Retrieve
    • Delete
  • Completion
    • Create
  • Chat
    • Create
  • Edit
    • Create
  • Images
    • Create
    • Edit
    • Variation
  • Embeddings
    • Create
  • Audio
    • Transcribe
    • Translate
  • Files
    • Create
    • Retrieve
    • Download
  • Fine-tunes
    • Create
    • Retrieve
    • List
    • Cancel
    • Events
  • Moderations
    • Create

# Packages

No description provided by the author