Skip to content

Conversation

@moldhouse
Copy link
Contributor

References #448

In the issue, the idea of exposing a serde_json::Value was discussed. In some internal server error cases, even OpenAI does return error messages that are not json. This made me wonder if representing the error as String might give users more flexibility. Would be eager to get some feedback if this matches what you had in mind @64bit

I'm uncertain if the second commit (offering a helper method to parse the raw string into a type) provides value / goes beyond the scope of this library, happy to remove it.

…ormat

the error format of different providers sometimes diverges from OpenAI.
the string-error feature does not try to parse errors into the OpenAI
format, but leaves it up to the user. when enabled, the  is
a wrapper around the original error message. This also enables cases
where the error message is not even valid json
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 this pull request may close these issues.

1 participant