16 lines
224 B
Plaintext
16 lines
224 B
Plaintext
|
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)
|
||
|
}
|