Skip to content

Commit

Permalink
Merge pull request #21 from hanyuancheung/feature/csuzhang-remove-api…
Browse files Browse the repository at this point in the history
…-key

feat: remove api key
  • Loading branch information
hanyuancheung committed Mar 29, 2023
2 parents cd517af + da6090e commit d522caf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ make chatgpt-example

```golang
func main() {
client := gpt.NewClient("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")
client := gpt.NewClient("API_KEY")
err := client.ChatCompletionStream(context.Background(), &gpt.ChatCompletionRequest{
Model: gpt.GPT3Dot5Turbo,
Messages: []gpt.ChatCompletionRequestMessage{
Expand All @@ -83,7 +83,7 @@ func main() {

```golang
func main() {
client := gpt.NewClient("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")
client := gpt.NewClient("API_KEY")
rsp, err := client.CompletionWithEngine(context.Background(), &gpt.CompletionRequest{
Model: gpt.TextDavinci003Engine,
Prompt: []string{"Hello!"},
Expand All @@ -102,7 +102,7 @@ func main() {

```golang
func main() {
client := gpt.NewClient("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")
client := gpt.NewClient("API_KEY")
rsp, err := client.Image(context.Background(), &gpt.ImageRequest{
Prompt: "Chicken",
})
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Check out the go docs for more detailed documentation on the types and methods p

```golang
func main() {
client := gpt.NewClient("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")
client := gpt.NewClient("API_KEY")
err := client.ChatCompletionStream(context.Background(), &gpt.ChatCompletionRequest{
Model: gpt.GPT3Dot5Turbo,
Messages: []gpt.ChatCompletionRequestMessage{
Expand All @@ -87,7 +87,7 @@ func main() {

```golang
func main() {
client := gpt.NewClient("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")
client := gpt.NewClient("API_KEY")
rsp, err := client.CompletionWithEngine(context.Background(), &gpt.CompletionRequest{
Model: gpt.TextDavinci003Engine,
Prompt: []string{"Hello!"},
Expand All @@ -106,7 +106,7 @@ func main() {

```golang
func main() {
client := gpt.NewClient("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")
client := gpt.NewClient("API_KEY")
rsp, err := client.Image(context.Background(), &gpt.ImageRequest{
Prompt: "Chicken",
})
Expand Down

0 comments on commit d522caf

Please sign in to comment.