StreamingEngine

Trait StreamingEngine 

Source
pub trait StreamingEngine: Send + Sync {
    // Required methods
    fn handle_completion<'life0, 'async_trait>(
        &'life0 self,
        req: SingleIn<NvCreateCompletionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<ManyOut<Annotated<NvCreateCompletionResponse>>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_chat<'life0, 'async_trait>(
        &'life0 self,
        req: SingleIn<NvCreateChatCompletionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<ManyOut<Annotated<NvCreateChatCompletionStreamResponse>>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait that allows handling both completion and chat completions requests

Required Methods§

Source

fn handle_completion<'life0, 'async_trait>( &'life0 self, req: SingleIn<NvCreateCompletionRequest>, ) -> Pin<Box<dyn Future<Output = Result<ManyOut<Annotated<NvCreateCompletionResponse>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn handle_chat<'life0, 'async_trait>( &'life0 self, req: SingleIn<NvCreateChatCompletionRequest>, ) -> Pin<Box<dyn Future<Output = Result<ManyOut<Annotated<NvCreateChatCompletionStreamResponse>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§