You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
ozaner
changed the title
Add #[from] to ApiError and JSONDeserialize variants in OpenAIError enum.
Implement From<serde_json::Error> on OpenAIError enum
Jan 24, 2025
The
OpenAIError
type is implemented using thethiserror
crate. It implementsFrom<reqwest::Error>
via the#[from]
present in the Reqwest variant.async-openai/async-openai/src/error.rs
Lines 4 to 28 in c48e62e
I think that the
#[from]
attribute should also be present for theJSONDeserialize
variant as well.Having
From<serde_json::Error>
implemented would allow me to use it as a trait bound for the error type of my own custom Llm trait.This is addressed by PR #325
The text was updated successfully, but these errors were encountered: