pub enum ArtificialError {
BackendNotConfigured {
provider: &'static str,
},
ModelNotSupported {
provider: &'static str,
model: &'static str,
},
Serialization(Error),
Backend(Box<dyn Error + Send + Sync + 'static>),
InvalidRequest(String),
Invalid(String),
}
Variants§
BackendNotConfigured
A prompt targeted a provider (provider_id
) for which no backend has
been registered in the [ArtificialClient
].
ModelNotSupported
The selected backend is present but does not recognise or support the
requested model
.
Serialization(Error)
Failure while serialising or deserialising JSON payloads sent to / received from the LLM provider.
Backend(Box<dyn Error + Send + Sync + 'static>)
Generic forwarding of any backend-specific error that doesn’t fit another category.
InvalidRequest(String)
Invalid(String)
Trait Implementations§
Source§impl Debug for ArtificialError
impl Debug for ArtificialError
Source§impl Display for ArtificialError
impl Display for ArtificialError
Source§impl Error for ArtificialError
impl Error for ArtificialError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ArtificialError
impl !RefUnwindSafe for ArtificialError
impl Send for ArtificialError
impl Sync for ArtificialError
impl Unpin for ArtificialError
impl !UnwindSafe for ArtificialError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more