Update README.md

This commit is contained in:
sashabaranov
2023-03-04 15:19:54 +04:00
committed by GitHub
parent 656f6b174c
commit f89133c6e0

View File

@@ -28,11 +28,9 @@ import (
) )
func main() { func main() {
c := gogpt.NewClient("your token") client := gogpt.NewClient("your token")
ctx := context.Background()
resp, err := c.CreateChatCompletion( resp, err := c.CreateChatCompletion(
ctx, context.Background(),
gogpt.ChatCompletionRequest{ gogpt.ChatCompletionRequest{
Model: gogpt.GPT3Dot5Turbo, Model: gogpt.GPT3Dot5Turbo,
Messages: []gogpt.ChatCompletionMessage{ Messages: []gogpt.ChatCompletionMessage{