We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your issue may already be reported! Please search on the issue tracker before creating one.
Describe the bug
when my golang version is go1.19.2,i run the example code about CreateChatCompletion, report this error
../../../go/pkg/mod/github.com/sashabaranov/[email protected]/batch.go:205:16: undefined: errors.Join
To Reproduce my example code is
package main import ( "context" "fmt" openai "github.com/sashabaranov/go-openai" ) func main() { client := openai.NewClient("sk-xxxE") resp, err := client.CreateChatCompletion( context.Background(), openai.ChatCompletionRequest{ Model: openai.GPT4o, Messages: []openai.ChatCompletionMessage{ { Role: openai.ChatMessageRoleUser, Content: "hello!", }, }, }, ) if err != nil { fmt.Printf("ChatCompletion error: %v\n", err) return } fmt.Println(resp.Choices[0].Message.Content) }
and the result is
my project is run on mac apple kernal , the detail is Apple M2 Pro Mac OS Ventura 13.6.1
my go version is go version go1.19.2 darwin/arm64
Screenshots/Logs
Environment (please complete the following information):
Additional context there is no error when i run it on 1.18 or 1.20
The text was updated successfully, but these errors were encountered:
Thank you for reporting that!
errors.Join was indeed introduced in 1.20, and we either need to bump a minimal supported version to 1.20 or use something else there.
errors.Join
cc @eiixy
Sorry, something went wrong.
@hachi-zzq fixed in v1.26.1 https://github.com/sashabaranov/go-openai/releases/tag/v1.26.1
@sashabaranov thanks
No branches or pull requests
Your issue may already be reported!
Please search on the issue tracker before creating one.
Describe the bug
when my golang version is go1.19.2,i run the example code about CreateChatCompletion, report this error
To Reproduce
my example code is
and the result is
![image](https://private-user-images.githubusercontent.com/5241713/341711669-55f76fca-bc60-4afa-9f9f-8c0417a798aa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNDcwNDksIm5iZiI6MTcyMjE0Njc0OSwicGF0aCI6Ii81MjQxNzEzLzM0MTcxMTY2OS01NWY3NmZjYS1iYzYwLTRhZmEtOWY5Zi04YzA0MTdhNzk4YWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjhUMDYwNTQ5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGNkYzRiNjI0NDIwY2E2ZmJjMjkxNjMzZDAyNGU3OGFmZWIwNjJkNWQ2NDMwNmYyN2Q2ZDM4MjY3ZTVjYmQxMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.K5B7lHnYkcmNc2ZCdEUoGfBJbNpNn14z6AnqZdR4mnE)
my project is run on mac apple kernal , the detail is
Apple M2 Pro
Mac OS Ventura 13.6.1
my go version is
go version go1.19.2 darwin/arm64
Screenshots/Logs
![image](https://private-user-images.githubusercontent.com/5241713/341712374-c2f38848-73bd-46dc-9a62-c07b49bf34f8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxNDcwNDksIm5iZiI6MTcyMjE0Njc0OSwicGF0aCI6Ii81MjQxNzEzLzM0MTcxMjM3NC1jMmYzODg0OC03M2JkLTQ2ZGMtOWE2Mi1jMDdiNDliZjM0ZjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LU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XJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.RJltxVFEaM70cuBWGFD0qI_QCw3oGvL1whICVDac4AU)
Environment (please complete the following information):
Additional context
there is no error when i run it on 1.18 or 1.20
The text was updated successfully, but these errors were encountered: