We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Using the snippet below:
chunk = openai.ChatCompletionChunk{} err := json.Unmarshal([]byte(`[]`), &chunk) fmt.Printf("%+v\n", err)
The err is nil and the chunk is successfully unmarshalled, though it will have empty value except that the raw field is [].
raw
[]
The text was updated successfully, but these errors were encountered:
Sometimes, errors are ignored during decoding: https://github.com/openai/openai-[go/blob/c0414f15a9f4065adee2ed96a4dcd4d4cb9708aa/internal/apijson/decoder.go#L408-L411](https://www.golinks.io/blob/c0414f15a9f4065adee2ed96a4dcd4d4cb9708aa/internal/apijson/decoder.go#L408-L411?trackSource=github)
https://github.com/openai/openai-[go/blob/c0414f15a9f4065adee2ed96a4dcd4d4cb9708aa/internal/apijson/decoder.go#L430-L435](https://www.golinks.io/blob/c0414f15a9f4065adee2ed96a4dcd4d4cb9708aa/internal/apijson/decoder.go#L430-L435?trackSource=github)
https://github.com/openai/openai-[go/blob/c0414f15a9f4065adee2ed96a4dcd4d4cb9708aa/internal/apijson/decoder.go#L482-L486](https://www.golinks.io/blob/c0414f15a9f4065adee2ed96a4dcd4d4cb9708aa/internal/apijson/decoder.go#L482-L486?trackSource=github)
What is the reason behind them?
Sorry, something went wrong.
No branches or pull requests
Using the snippet below:
The err is nil and the chunk is successfully unmarshalled, though it will have empty value except that the
raw
field is[]
.The text was updated successfully, but these errors were encountered: