golang-examples/example-gpt-3/generated-by-chatgpt

16 lines
224 B
Plaintext
Raw Permalink Normal View History

2022-12-03 19:22:34 -06:00
package main
import (
"fmt"
"github.com/openai/gpt-3"
)
func main() {
client := gpt3.NewClient("API_KEY")
res, err := client.Evaluate("Hello, world!")
if err != nil {
panic(err)
}
fmt.Println(res.Text)
}