Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sashabaranov authored Mar 4, 2023
1 parent f89133c commit 90bb5e4
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ package main
import (
"context"
"fmt"
gogpt "github.com/sashabaranov/go-openai"
openai "github.com/sashabaranov/go-openai"
)

func main() {
client := gogpt.NewClient("your token")
client := openai.NewClient("your token")
resp, err := c.CreateChatCompletion(
context.Background(),
gogpt.ChatCompletionRequest{
Model: gogpt.GPT3Dot5Turbo,
Messages: []gogpt.ChatCompletionMessage{
openai.ChatCompletionRequest{
Model: openai.GPT3Dot5Turbo,
Messages: []openai.ChatCompletionMessage{
{
Role: "user",
Role: openai.ChatMessageRoleUser,
Content: "Hello!",
},
},
Expand Down Expand Up @@ -64,15 +64,15 @@ package main
import (
"context"
"fmt"
gogpt "github.com/sashabaranov/go-openai"
openai "github.com/sashabaranov/go-openai"
)

func main() {
c := gogpt.NewClient("your token")
c := openai.NewClient("your token")
ctx := context.Background()

req := gogpt.CompletionRequest{
Model: gogpt.GPT3Ada,
req := openai.CompletionRequest{
Model: openai.GPT3Ada,
MaxTokens: 5,
Prompt: "Lorem ipsum",
}
Expand All @@ -96,15 +96,15 @@ import (
"context"
"fmt"
"io"
gogpt "github.com/sashabaranov/go-openai"
openai "github.com/sashabaranov/go-openai"
)

func main() {
c := gogpt.NewClient("your token")
c := openai.NewClient("your token")
ctx := context.Background()

req := gogpt.CompletionRequest{
Model: gogpt.GPT3Ada,
req := openai.CompletionRequest{
Model: openai.GPT3Ada,
MaxTokens: 5,
Prompt: "Lorem ipsum",
Stream: true,
Expand Down Expand Up @@ -146,15 +146,15 @@ import (
"context"
"fmt"
"io"
gogpt "github.com/sashabaranov/go-openai"
openai "github.com/sashabaranov/go-openai"
)

func main() {
c := gogpt.NewClient("your token")
c := openai.NewClient("your token")
ctx := context.Background()

req := gogpt.CompletionRequest{
Model: gogpt.GPT3Ada,
req := openai.CompletionRequest{
Model: openai.GPT3Ada,
MaxTokens: 5,
Prompt: "Lorem ipsum",
Stream: true,
Expand Down

0 comments on commit 90bb5e4

Please sign in to comment.