Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deifyed/eeyore
A small CLI wrapper around OpenAI's GPT API
https://github.com/deifyed/eeyore
cli golang gpt-3 openai
Last synced: about 1 month ago
JSON representation
A small CLI wrapper around OpenAI's GPT API
- Host: GitHub
- URL: https://github.com/deifyed/eeyore
- Owner: deifyed
- License: mit
- Created: 2022-12-22T16:07:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T13:27:29.000Z (about 2 years ago)
- Last Synced: 2024-06-21T19:53:35.948Z (7 months ago)
- Topics: cli, golang, gpt-3, openai
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Eeyore
## Motivation
I wanted to access ChatGPT through my terminal
## Usage
```shell
# Ask a single question
echo "What is the meaning of life?" | eeyore single
eeyore single "What is the meaning of life?"# Start a conversation
eeyore thread
```## Installation
### Prerequisites
- [Go 1.19](https://golang.org/doc/install)
### Build
```shell
# Build the application
make build
```### Install
```shell
# Install the application
make install
```This will install the application to `~/.local/bin/eeyore`. Remember to add this to your `PATH`.
To change install location, set the `PREFIX` environment variable.
```shell
PREFIX=/usr/local make install
```## Configuration
The application can be configured either using environment variables:
| Variable | Description | Default |
| --------------------- | ---------------------------------------------- | --------------------- |
| `EEYORE_OPENAI_TOKEN` | The API token to use | `""` |
| `EEYORE_MAX_TOKENS` | The maximum amount of tokens GPT should return | `1024` |
| `EEYORE_MODEL` | The model to use | `text-davinci-003ada` |
| `EEYORE_TEMPERATURE` | Configure how creative the output is | `0.5` |Or using a configuration file located at `~/.config/eeyore/config.yaml`:
```yaml
openai-token: "YOUR_TOKEN"
max-tokens: 1024
model: text-davinci-003
temperature: 0.5
```## FAQ
- How do I acquire an API token? Log into [OpenAI](https://openai.com/api/login), click "Personal" up in the upper right corner and then "View API keys"