#[non_exhaustive]pub enum FailureKind {
Show 16 variants
RateLimited,
Overloaded,
ModelUnavailable,
ContextTooLong,
ModelRejected,
Auth,
NoCredentials,
Billing,
EgressDenied,
ModelError,
SessionClosed,
EngineStopped,
EngineUnreachable,
PersistFailed,
Internal,
ProvidersUnavailable,
}Expand description
How a turn failed, in the terms a host decides on: whether to send it again, when, and whether doing so repeats something.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RateLimited
Overloaded
The provider could not be reached or failed on its side; the request itself was fine.
ContextTooLong
ModelRejected
The provider refused the request as malformed, or for a model or a feature it does not serve.
Auth
NoCredentials
The provider has no credential configured; the request was not sent.
Billing
EgressDenied
ModelError
The provider failed in a way sending again will not fix.
SessionClosed
EngineStopped
EngineUnreachable
The engine did not take or answer a request.
PersistFailed
Internal
No provider in the order could take the call.
Implementations§
Trait Implementations§
Source§impl Clone for FailureKind
impl Clone for FailureKind
impl Copy for FailureKind
Source§impl Debug for FailureKind
impl Debug for FailureKind
Source§impl<'de> Deserialize<'de> for FailureKind
impl<'de> Deserialize<'de> for FailureKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FailureKind
impl Display for FailureKind
impl Eq for FailureKind
Source§impl From<ModelErrorKind> for FailureKind
impl From<ModelErrorKind> for FailureKind
Source§fn from(kind: ModelErrorKind) -> Self
fn from(kind: ModelErrorKind) -> Self
Converts to this type from the input type.
Source§impl Hash for FailureKind
impl Hash for FailureKind
Source§impl JsonSchema for FailureKind
impl JsonSchema for FailureKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for FailureKind
impl PartialEq for FailureKind
Source§impl Serialize for FailureKind
impl Serialize for FailureKind
impl StructuralPartialEq for FailureKind
Auto Trait Implementations§
impl Forget for FailureKind
impl Freeze for FailureKind
impl Move for FailureKind
impl RefUnwindSafe for FailureKind
impl Send for FailureKind
impl Sync for FailureKind
impl Unpin for FailureKind
impl UnsafeUnpin for FailureKind
impl UnwindSafe for FailureKind
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