Registry / http-client / pullrequestinc-go-gpt3

pullrequestinc-go-gpt3

JSON →
library1.2.0gogounverified

Package go-gpt3 provides a Go client for OpenAI's GPT-3 API, enabling text generation and completions.

go get github.com/PullRequestInc/go-gpt3
INSTALL
IMPORT
SIG · PULLREQUESTINC-GO-
P
pullrequestinc-go-gpt3
http-clientgov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gpt3
github.com/PullRequestInc/go-gpt3

Generates text completion using OpenAI GPT-3 API.

package main import ( "context" "fmt" "github.com/PullRequestInc/go-gpt3" ) func main() { client := gpt3.NewClient("your-api-key") resp, err := client.Completion(context.Background(), gpt3.CompletionRequest{ Prompt: "Once upon a time", }) if err != nil { panic(err) } fmt.Println(resp.Choices[0].Text) }
Debug
Known issues
gotchaAPI key must be kept secret; avoid hardcoding in source code.
fix
Use environment variables or secure configuration management.
affects: all
Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
pullrequestinc-go-gpt3 — go get pullrequestinc-go-gpt3 · libregistry