pub enum LlmErrorKind {
ContextLengthExceeded,
MalformedToolCall,
RateLimited,
StreamError,
ContentFiltered,
InvalidRequest,
Configuration,
Other,
}Expand description
Semantic category for an LlmError.
Variants§
ContextLengthExceeded
The prompt exceeds the model’s context window.
MalformedToolCall
The model produced a tool call that could not be parsed (malformed JSON, etc.).
RateLimited
The provider returned a rate-limit response that was not resolved by retries.
StreamError
The response stream failed or ended before the provider confirmed completion.
ContentFiltered
The provider refused to answer or filtered the response. Retrying the same request is pointless, so this error is never retried.
InvalidRequest
The provider rejected the request’s content, such as an attachment it cannot read (HTTP 400 or 422). Retrying needs different content.
Configuration
The credentials, credits, or model setting are wrong (HTTP 401, 402, 403 or 404). Retrying cannot help.
Other
Any other provider error that does not fit a specific category.
Implementations§
Trait Implementations§
Source§impl Clone for LlmErrorKind
impl Clone for LlmErrorKind
impl Copy for LlmErrorKind
Source§impl Debug for LlmErrorKind
impl Debug for LlmErrorKind
impl Eq for LlmErrorKind
Source§impl PartialEq for LlmErrorKind
impl PartialEq for LlmErrorKind
impl StructuralPartialEq for LlmErrorKind
Auto Trait Implementations§
impl Forget for LlmErrorKind
impl Freeze for LlmErrorKind
impl Move for LlmErrorKind
impl RefUnwindSafe for LlmErrorKind
impl Send for LlmErrorKind
impl Sync for LlmErrorKind
impl Unpin for LlmErrorKind
impl UnsafeUnpin for LlmErrorKind
impl UnwindSafe for LlmErrorKind
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