Trait Relay Host Runtime

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub trait RelayHostRuntime:
    Send
    + Sync
    + 'static {
    type LlmStreamNextStream: Stream<Item = Result<StreamChunk, Status>> + Send + 'static;
​
    // Required methods
    fn emit_mark<'life0, 'async_trait>(
        &'life0 self,
        request: Request<EmitMarkRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<HostAck>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn push_scope<'life0, 'async_trait>(
        &'life0 self,
        request: Request<PushScopeRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<PushScopeResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn pop_scope<'life0, 'async_trait>(
        &'life0 self,
        request: Request<PopScopeRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<HostAck>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_scope_stack<'life0, 'async_trait>(
        &'life0 self,
        request: Request<CreateScopeStackRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<CreateScopeStackResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn drop_scope_stack<'life0, 'async_trait>(
        &'life0 self,
        request: Request<DropScopeStackRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<HostAck>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn tool_next<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ToolNextRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<JsonResult>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn llm_next<'life0, 'async_trait>(
        &'life0 self,
        request: Request<LlmNextRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<JsonResult>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn llm_stream_next<'life0, 'async_trait>(
        &'life0 self,
        request: Request<LlmStreamNextRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::LlmStreamNextStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Generated trait containing gRPC methods that should be implemented for use with RelayHostRuntimeServer.

Required Associated Types

LlmStreamNextStream

type LlmStreamNextStream: Stream<Item = Result<StreamChunk, Status>> + Send + 'static

Server streaming response type for the LlmStreamNext method.

Required Methods

emit_mark

fn emit_mark<'life0, 'async_trait>(
    &'life0 self,
    request: Request<EmitMarkRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HostAck>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

push_scope

fn push_scope<'life0, 'async_trait>(
    &'life0 self,
    request: Request<PushScopeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PushScopeResponse>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

pop_scope

fn pop_scope<'life0, 'async_trait>(
    &'life0 self,
    request: Request<PopScopeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HostAck>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

create_scope_stack

fn create_scope_stack<'life0, 'async_trait>(
    &'life0 self,
    request: Request<CreateScopeStackRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateScopeStackResponse>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

drop_scope_stack

fn drop_scope_stack<'life0, 'async_trait>(
    &'life0 self,
    request: Request<DropScopeStackRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HostAck>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

tool_next

fn tool_next<'life0, 'async_trait>(
    &'life0 self,
    request: Request<ToolNextRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<JsonResult>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

llm_next

fn llm_next<'life0, 'async_trait>(
    &'life0 self,
    request: Request<LlmNextRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<JsonResult>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

llm_stream_next

fn llm_stream_next<'life0, 'async_trait>(
    &'life0 self,
    request: Request<LlmStreamNextRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::LlmStreamNextStream>, Status>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

Implementors