pub struct Service { /* private fields */ }Implementations§
Source§impl Api
impl Api
pub fn new(services: LocalServices) -> Api
pub fn kmap(&self) -> &KwebManager
pub fn telegram(&self) -> &Service
pub fn create_history_session( &self, input: NewSession, ) -> Result<Session, Error>
pub fn history_session( &self, metadata: SessionMetadata, provider_model: &str, ) -> Result<Session, Error>
pub fn kmap_node(&self, node_id: &str) -> Result<Node, ApiError>
pub fn commit_kweb_session( &self, input: CommitRequest, ) -> Result<CommitReceipt, ApiError>
pub fn kmap_file(&self, object_id: &str) -> Result<StoredFile, ApiError>
pub fn save_generated_image( &self, bytes: Vec<u8>, file_name: &str, media_type: &str, model: &str, ) -> Result<String, ApiError>
pub fn agent_runtime(&self) -> AgentRuntime
pub async fn search( &self, user_id: &str, request: SearchRequest, ) -> Result<Accounted<SearchResponse>, ApiError>
pub async fn fetch( &self, user_id: &str, request: FetchRequest, ) -> Result<FetchResponse, ApiError>
pub async fn managed_source_execute( &self, session_id: &str, name: &str, arguments: Value, objects: Vec<Vec<u8>>, ) -> Result<ToolExecution, ApiError>
pub async fn execute_speech_classification_tool( &self, name: &str, arguments: Value, ) -> Result<String, ApiError>
pub async fn release_managed_sources(&self, session_id: &str)
pub async fn transcribe_audio( &self, user_id: &str, model: &str, prompt: &str, bytes: Vec<u8>, filename: String, mime: &str, temperature: Option<f32>, parent_operation_id: Uuid, ) -> Result<Accounted<TranscriptionResponse>, ApiError>
pub async fn extract_document( &self, bytes: Vec<u8>, filename: String, mime: &str, ) -> Result<DocumentExtraction, ApiError>
pub async fn annotate_media( &self, user_id: &str, model: &str, prompt: &str, bytes: Vec<u8>, filename: String, mime: &str, parent_operation_id: Uuid, ) -> Result<Accounted<AnnotationResponse>, ApiError>
pub async fn generate_image( &self, user_id: &str, model: &str, prompt: &str, references: Vec<(Vec<u8>, String, String)>, parent_operation_id: Uuid, ) -> Result<Accounted<ImageResponse>, ApiError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Api
impl !UnwindSafe for Api
impl Freeze for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl UnsafeUnpin for Api
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more