#[non_exhaustive]pub enum LcelError {
Provider(String),
Chain(String),
Agent(String),
Graph(String),
Tool(String),
OutputParser(String),
Stream(String),
Pipeline(String),
TypeMismatch(String),
Other(String),
}Expand description
Unified error type for LCEL pipelines.
All Runnable components that participate in LCEL composition
must have an Error type that implements Into<LcelError>.
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.
Provider(String)
Error from an LLM provider (OpenAI, Anthropic, Gemini, Ollama, etc.).
Chain(String)
Error from a chain execution.
Agent(String)
Error from an agent execution.
Graph(String)
Error from a graph execution.
Tool(String)
Error from a tool execution.
OutputParser(String)
Error from an output parser.
Stream(String)
Error during streaming.
Pipeline(String)
Error in pipeline composition or execution.
TypeMismatch(String)
Type-erasure downcast failure.
Other(String)
Catch-all for errors that don’t fit other variants.
Trait Implementations§
Source§impl Error for LcelError
impl Error for LcelError
1.30.0 · 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()
Source§impl From<!> for LcelError
impl From<!> for LcelError
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<OutputParserError> for LcelError
impl From<OutputParserError> for LcelError
Source§fn from(e: OutputParserError) -> Self
fn from(e: OutputParserError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LcelError
impl RefUnwindSafe for LcelError
impl Send for LcelError
impl Sync for LcelError
impl Unpin for LcelError
impl UnsafeUnpin for LcelError
impl UnwindSafe for LcelError
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