You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An unofficial community-maintained Go client package and CLI for [OpenAI](https://openai.com/).
3
+
An unofficial community-maintained CLI application for [OpenAI](https://openai.com/).
4
4
5
5
## Installation
6
6
7
-
To use this package in your own Go project:
8
-
9
-
```console
10
-
$ go get github.com/picatz/openai@latest
11
-
```
12
-
13
-
To use the `openai` CLI:
14
-
15
7
```console
16
8
$ go install github.com/picatz/openai/cmd/openai@latest
17
9
```
18
10
19
-
<center>
20
-
<imgsrc="./vhs/demo.gif"></img>
21
-
</center>
22
-
23
11
> [!IMPORTANT]
24
12
> To use the CLI you must have a valid `OPENAI_API_KEY` environment variable set. You can get one [here](https://platform.openai.com/).
25
13
26
14
> [!TIP]
27
-
> You can customize which model is used by setting the `OPENAI_MODEL` environment variable. The default is `gpt-4-turbo-preview` today, but it may change in the future.
// Update history, summarize, forget, etc. Then repeat.
105
-
history = appened(history, resp.Choices[0].Message)
106
-
```
107
-
108
-
### `openai` CLI
109
-
110
-
Use OpenAI's chat or edit and completion features on the command-line.
111
-
112
-
```console
113
-
$ go install github.com/picatz/openai/cmd/openai@latest
114
-
```
15
+
> You can customize which model is used by setting the `OPENAI_MODEL` environment variable. The default is `gpt-4o` today, but it may change in the future.
115
16
116
17
#### Usage
117
18
@@ -137,30 +38,40 @@ Use "openai [command] --help" for more information about a command.
137
38
```
138
39
139
40
```console
140
-
$ openai assistant
41
+
$ openai assistant --help
42
+
Interact with the OpenAI API using the assistant API.
141
43
142
-
Welcome to the OpenAI API CLI assistant mode!
143
-
144
-
WARNING: Messages and files disappear after exiting.
44
+
This can be used to create a temporary assistant, or interact with an existing assistant.
145
45
146
-
> Hello!
46
+
Usage:
47
+
openai assistant [flags]
48
+
openai assistant [command]
49
+
50
+
Examples:
51
+
$ openai assistant # create a temporary assistant and start chatting
0 commit comments