Skip to content
New issue

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

syntax error: unexpected |, expecting semicolon or newline or } #273

Closed
Winston1011 opened this issue Apr 20, 2023 · 2 comments
Closed

syntax error: unexpected |, expecting semicolon or newline or } #273

Winston1011 opened this issue Apr 20, 2023 · 2 comments
Labels
question Further information is requested stale

Comments

@Winston1011
Copy link

../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/chat_stream.go:30:15: syntax error: unexpected [, expecting semicolon or newline or }
../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/stream.go:15:15: syntax error: unexpected [, expecting semicolon or newline or }
../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/stream_reader.go:12:31: syntax error: unexpected |, expecting semicolon or newline or }
../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/stream_reader.go:15:21: syntax error: unexpected streamable, expecting ]
../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/stream_reader.go:25:27: syntax error: unexpected [, expecting comma or )
../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/stream_reader.go:33:1: syntax error: non-declaration statement outside function body
../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/stream_reader.go:44:2: syntax error: non-declaration statement outside function body
../localGoPath/pkg/mod/github.com/sashabaranov/go-openai@v1.9.0/stream_reader.go:70:27: syntax error: unexpected [, expecting comma or )

@vvatanabe
Copy link
Collaborator

@Winston1011 Perhaps your locally installed version of Go is less than 1.18. go-openai uses generics internally, so Go 1.18 or higher is required.

@vvatanabe vvatanabe added question Further information is requested stale labels Jun 30, 2023
@vvatanabe
Copy link
Collaborator

Closing this due to lack of comments for an extended period.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

2 participants