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

APIError.error.code type error!!! #244

Closed
crazyworld opened this issue Apr 10, 2023 · 3 comments
Closed

APIError.error.code type error!!! #244

crazyworld opened this issue Apr 10, 2023 · 3 comments

Comments

@crazyworld
Copy link

error, json: cannot unmarshal number into Go struct field APIError.error.code of type string

@crazyworld
Copy link
Author

The error occurred in this client.CreateChatCompletion()

@sashabaranov
Copy link
Owner

cc @liushuangls

@liushuangls
Copy link
Contributor

cc @liushuangls

Change the code type to any?

young-steveo added a commit to young-steveo/go-openai that referenced this issue Apr 13, 2023
This resolves issue sashabaranov#244 by delaying unmarshalling the Code until it is needed.
young-steveo added a commit to young-steveo/go-openai that referenced this issue Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants