#[non_exhaustive]pub enum RetrievalError {
Show 17 variants
EmptyDocumentId,
EmptyDocumentText {
id: DocumentId,
},
EmptyQuery,
ZeroLimit,
EmptyEmbedding,
NonFiniteEmbedding {
index: usize,
},
EmbeddingCoordinateOutOfRange {
index: usize,
},
ZeroNormEmbedding,
DimensionMismatch {
expected: usize,
actual: usize,
},
EmbeddingCountMismatch {
expected: usize,
actual: usize,
},
EmptyEmbeddingInput {
index: usize,
},
DuplicateDocument(DocumentId),
CapabilityDenied {
name: String,
},
Cancelled,
DeadlineExceeded,
Provider {
message: String,
},
UsageOverflow,
}Expand description
Failure at a provider-neutral embedding or retrieval boundary.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyDocumentId
A document identity was empty.
EmptyDocumentText
A document contained no usable text.
Fields
id: DocumentIdInvalid document identity.
EmptyQuery
A query contained no usable text.
ZeroLimit
A query requested no results.
EmptyEmbedding
An embedding contained no dimensions.
NonFiniteEmbedding
An embedding contained a non-finite coordinate.
EmbeddingCoordinateOutOfRange
An embedding coordinate exceeded a backend numeric representation.
ZeroNormEmbedding
Cosine similarity is undefined for a zero vector.
DimensionMismatch
Embeddings with different dimensions cannot share an index.
EmbeddingCountMismatch
A provider returned a different number of vectors than inputs.
EmptyEmbeddingInput
One item in an embedding request was blank.
DuplicateDocument(DocumentId)
A document identity appeared more than once.
CapabilityDenied
A run did not grant the retriever capability.
Cancelled
The owning run was cancelled.
DeadlineExceeded
The owning run deadline elapsed.
Provider
An embedding provider or retrieval backend failed.
UsageOverflow
Retrieval usage counters could not be combined without overflow.
Implementations§
Trait Implementations§
Source§impl Clone for RetrievalError
impl Clone for RetrievalError
Source§fn clone(&self) -> RetrievalError
fn clone(&self) -> RetrievalError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RetrievalError
impl Debug for RetrievalError
Source§impl Display for RetrievalError
impl Display for RetrievalError
impl Eq for RetrievalError
Source§impl Error for RetrievalError
impl Error for RetrievalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()