oris-runtime 0.61.0

An agentic workflow runtime and programmable AI execution system in Rust: stateful graphs, agents, tools, and multi-step execution.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use async_trait::async_trait;

use super::Document;
use crate::error::RetrieverError;

#[async_trait]
pub trait Retriever: Sync + Send {
    async fn get_relevant_documents(&self, query: &str) -> Result<Vec<Document>, RetrieverError>;
}

impl<R> From<R> for Box<dyn Retriever>
where
    R: Retriever + 'static,
{
    fn from(retriever: R) -> Self {
        Box::new(retriever)
    }
}