This commit is contained in:
Jeff Carr 2022-12-03 20:53:43 -06:00
parent 3f78edfb6c
commit 7b41f30a0a
1 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package main
// https://chat.openai.com/chat
import (
"context"
"fmt"
@ -27,6 +29,12 @@ func main() {
log.Println("engines =", eng)
spew.Dump(eng)
// shows how much things cost so far:
// https://beta.openai.com/account/usage
// shows the options you can pass in CompletionRequest:
// https://pkg.go.dev/github.com/PullRequestInc/go-gpt3#CompletionRequest
// resp, err := client.Completion(ctx, gpt3.CompletionRequest{
resp, err := client.CompletionWithEngine(ctx, "text-davinci-003", gpt3.CompletionRequest{
Prompt: []string{"Write a 3000 word essay about DiVinci"},