pub struct RetrieverResult {
pub documents: Vec<Document>,
pub metadata: HashMap<String, Value>,
}
Expand description
A retriever result containing documents and metadata
Fields§
§documents: Vec<Document>
The retrieved documents
metadata: HashMap<String, Value>
Additional metadata about the retrieval
Implementations§
Source§impl RetrieverResult
impl RetrieverResult
Trait Implementations§
Source§impl Clone for RetrieverResult
impl Clone for RetrieverResult
Source§fn clone(&self) -> RetrieverResult
fn clone(&self) -> RetrieverResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RetrieverResult
impl Debug for RetrieverResult
Source§impl<'de> Deserialize<'de> for RetrieverResult
impl<'de> Deserialize<'de> for RetrieverResult
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 PartialEq for RetrieverResult
impl PartialEq for RetrieverResult
Source§impl<R> Runnable<String, RetrieverResult> for RunnableRetriever<R>where
R: BaseRetriever,
impl<R> Runnable<String, RetrieverResult> for RunnableRetriever<R>where
R: BaseRetriever,
Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
input: String,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<RetrieverResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
input: String,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<RetrieverResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoke the runnable with a single input
Source§fn invoke_simple<'life0, 'async_trait>(
&'life0 self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke_simple<'life0, 'async_trait>(
&'life0 self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Invoke the runnable with a single input (convenience method with default config)
Source§fn batch<'life0, 'async_trait>(
&'life0 self,
inputs: Vec<Input>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Output>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn batch<'life0, 'async_trait>(
&'life0 self,
inputs: Vec<Input>,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Output>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Batch invoke the runnable with multiple inputs
Source§fn stream<'life0, 'async_trait>(
&'life0 self,
input: Input,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Output>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream<'life0, 'async_trait>(
&'life0 self,
input: Input,
config: Option<RunnableConfig>,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Output>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream the output of the runnable
Source§fn input_schema(&self) -> Option<Value>
fn input_schema(&self) -> Option<Value>
Get the input schema for this runnable
Source§fn output_schema(&self) -> Option<Value>
fn output_schema(&self) -> Option<Value>
Get the output schema for this runnable
Source§fn config_schema(&self) -> Option<Value>
fn config_schema(&self) -> Option<Value>
Get the configuration schema for this runnable
Source§impl Serializable for RetrieverResult
impl Serializable for RetrieverResult
Source§fn is_serializable() -> bool
fn is_serializable() -> bool
Check if this object is serializable Read more
Source§fn to_json_pretty(&self) -> Result<String>
fn to_json_pretty(&self) -> Result<String>
Serialize this object to a pretty-printed JSON string
Source§fn to_dict(&self) -> Result<HashMap<String, Value>>
fn to_dict(&self) -> Result<HashMap<String, Value>>
Serialize this object to a dictionary (HashMap)
Source§impl Serialize for RetrieverResult
impl Serialize for RetrieverResult
impl StructuralPartialEq for RetrieverResult
Auto Trait Implementations§
impl Freeze for RetrieverResult
impl RefUnwindSafe for RetrieverResult
impl Send for RetrieverResult
impl Sync for RetrieverResult
impl Unpin for RetrieverResult
impl UnwindSafe for RetrieverResult
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