Go OpenAI API Library
go get github.com/seemywingz/goai
// main.go
package main
import (
"os"
"github.com/seemywingz/goai"
)
func main() {
oai := goai.NewClient(os.Getenv("OPENAI_API_KEY"), false)
oaiRes, err := oai.TextCompletion("This is a test.")
if err != nil {
panic(err)
}
println(oaiRes.Choices[0].Text)
}