pub struct BarrierMockToolIndex { /* private fields */ }Available on crate feature
test-utils only.Expand description
A vector index that waits at a barrier before returning one tool ID.
Implementations§
Trait Implementations§
Source§impl VectorStoreIndex for BarrierMockToolIndex
impl VectorStoreIndex for BarrierMockToolIndex
Source§async fn top_n<T: for<'a> Deserialize<'a> + WasmCompatSend>(
&self,
_req: VectorSearchRequest,
) -> Result<Vec<(f64, String, T)>, VectorStoreError>
async fn top_n<T: for<'a> Deserialize<'a> + WasmCompatSend>( &self, _req: VectorSearchRequest, ) -> Result<Vec<(f64, String, T)>, VectorStoreError>
Returns the top N most similar documents as
(score, id, document) tuples.Source§async fn top_n_ids(
&self,
_req: VectorSearchRequest,
) -> Result<Vec<(f64, String)>, VectorStoreError>
async fn top_n_ids( &self, _req: VectorSearchRequest, ) -> Result<Vec<(f64, String)>, VectorStoreError>
Returns the top N most similar document IDs as
(score, id) tuples.Auto Trait Implementations§
impl Freeze for BarrierMockToolIndex
impl RefUnwindSafe for BarrierMockToolIndex
impl Send for BarrierMockToolIndex
impl Sync for BarrierMockToolIndex
impl Unpin for BarrierMockToolIndex
impl UnsafeUnpin for BarrierMockToolIndex
impl UnwindSafe for BarrierMockToolIndex
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T, F> PortableTool for Twhere
F: SearchFilter<Value = Value> + WasmCompatSend + WasmCompatSync + for<'de> Deserialize<'de>,
T: VectorStoreIndex<Filter = F>,
impl<T, F> PortableTool for Twhere
F: SearchFilter<Value = Value> + WasmCompatSend + WasmCompatSync + for<'de> Deserialize<'de>,
T: VectorStoreIndex<Filter = F>,
Source§const NAME: &'static str = "search_vector_store"
const NAME: &'static str = "search_vector_store"
Unique registration and provider-facing name.
Source§type Error = VectorStoreError
type Error = VectorStoreError
Concrete author-facing failure.
Source§type Args = VectorSearchRequest<F>
type Args = VectorSearchRequest<F>
Owned JSON arguments.
Source§type Output = Vec<VectorStoreOutput>
type Output = Vec<VectorStoreOutput>
Canonical model-visible output.
Source§fn description(&self) -> String
fn description(&self) -> String
Model-facing description.
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for arguments.
Source§async fn call(
&self,
args: <T as PortableTool>::Args,
) -> Result<<T as PortableTool>::Output, <T as PortableTool>::Error>
async fn call( &self, args: <T as PortableTool>::Args, ) -> Result<<T as PortableTool>::Output, <T as PortableTool>::Error>
Execute one owned invocation without runtime access.
Source§fn map_error(&self, error: Self::Error) -> ToolExecutionError
fn map_error(&self, error: Self::Error) -> ToolExecutionError
Normalize a concrete failure at the runtime effect boundary.
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tool for Twhere
T: PortableTool,
impl<T> Tool for Twhere
T: PortableTool,
Source§const NAME: &'static str = const NAME: &'static str = <T as rig_core::tool::PortableTool>::NAME;
const NAME: &'static str = const NAME: &'static str = <T as rig_core::tool::PortableTool>::NAME;
Unique registration and provider-facing name.
Source§type Args = <T as PortableTool>::Args
type Args = <T as PortableTool>::Args
Typed JSON arguments.
Source§type Output = <T as PortableTool>::Output
type Output = <T as PortableTool>::Output
Output convertible into Rig’s canonical model presentation. Read more
Source§type Error = <T as PortableTool>::Error
type Error = <T as PortableTool>::Error
Typed error returned by direct calls to this tool. Read more
Source§fn description(&self) -> String
fn description(&self) -> String
Model-facing description.
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for arguments.