aichat

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2023 License: MIT Imports: 10 Imported by: 0

README

aichat

Maintainability

This is a program to use OpenAI's ChatAPI from the command line.

You need to set the API Key in the OPENAI_API_KEY environment variable.

When executed, you can interact with it on the terminal. To exit, type Ctl-D.

$ aichat
user: Hello!
assistant:

Hello there! How may I assist you today?
user: How will AI change the world in the future?
assistant:

As an AI language model, I can say that AI has the potential to transform virtually every aspect of our lives, from healthcare to education,
(omitted)

Also, you can use aichat foo command by putting the prompt template as $HOME/.aichat/prompts/foo.yml. You can replace the foo part with any name you like. The contents of foo.yml should look like this

messages:
  - role: system
    content: A brief description of the program, using only lowercase letters and hyphens, appropriate for the program. You may use up to three hyphens.
  - role: user
    content: $INPUT

Command line input is embedded in $INPUT and sent to the API.

To use the prompt above, do the following

$ aichat foo Command line program to utilize AI
ai-utilization-cli

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL