pub struct RigCompletionModelAdapter { /* private fields */ }Implementations§
Source§impl RigCompletionModelAdapter
impl RigCompletionModelAdapter
pub fn new(inner: Arc<dyn CompletionModel>) -> Self
Trait Implementations§
Source§impl Clone for RigCompletionModelAdapter
impl Clone for RigCompletionModelAdapter
Source§fn clone(&self) -> RigCompletionModelAdapter
fn clone(&self) -> RigCompletionModelAdapter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CompletionModel for RigCompletionModelAdapter
impl CompletionModel for RigCompletionModelAdapter
Source§type StreamingResponse = FinalCompletionResponse
type StreamingResponse = FinalCompletionResponse
The raw response type returned by the underlying completion model when streaming.
type Client = Arc<dyn CompletionModel>
fn make(client: &Self::Client, _model: impl Into<String>) -> Self
Source§fn completion(
&self,
request: CompletionRequest,
) -> impl Future<Output = Result<CompletionResponse<Self::Response>, CompletionError>> + WasmCompatSend
fn completion( &self, request: CompletionRequest, ) -> impl Future<Output = Result<CompletionResponse<Self::Response>, CompletionError>> + WasmCompatSend
Generates a completion response for the given completion request.
fn stream( &self, _request: CompletionRequest, ) -> impl Future<Output = Result<StreamingCompletionResponse<Self::StreamingResponse>, CompletionError>> + WasmCompatSend
Source§fn completion_request(
&self,
prompt: impl Into<Message>,
) -> CompletionRequestBuilder<Self>
fn completion_request( &self, prompt: impl Into<Message>, ) -> CompletionRequestBuilder<Self>
Generates a completion request builder for the given
prompt.Source§impl From<Arc<dyn CompletionModel>> for RigCompletionModelAdapter
impl From<Arc<dyn CompletionModel>> for RigCompletionModelAdapter
Source§fn from(value: Arc<dyn CompletionModel>) -> Self
fn from(value: Arc<dyn CompletionModel>) -> Self
Converts to this type from the input type.
Source§impl From<Box<dyn CompletionModel>> for RigCompletionModelAdapter
impl From<Box<dyn CompletionModel>> for RigCompletionModelAdapter
Source§fn from(value: Box<dyn CompletionModel>) -> Self
fn from(value: Box<dyn CompletionModel>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RigCompletionModelAdapter
impl !RefUnwindSafe for RigCompletionModelAdapter
impl Send for RigCompletionModelAdapter
impl Sync for RigCompletionModelAdapter
impl Unpin for RigCompletionModelAdapter
impl UnsafeUnpin for RigCompletionModelAdapter
impl !UnwindSafe for RigCompletionModelAdapter
Blanket Implementations§
Source§impl<T, R> CompletionModelDyn for T
impl<T, R> CompletionModelDyn for T
Source§fn completion_request(
&self,
prompt: Message,
) -> CompletionRequestBuilder<CompletionModelHandle<'_>>
👎Deprecated since 0.25.0: DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use CompletionModel instead.
fn completion_request( &self, prompt: Message, ) -> CompletionRequestBuilder<CompletionModelHandle<'_>>
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use CompletionModel instead.
Generates a completion request builder for the given prompt.
Source§fn completion(
&self,
request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse<()>, CompletionError>> + Send + '_>>
fn completion( &self, request: CompletionRequest, ) -> Pin<Box<dyn Future<Output = Result<CompletionResponse<()>, CompletionError>> + Send + '_>>
👎Deprecated since 0.25.0:
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use CompletionModel instead.
Source§fn stream(
&self,
request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<StreamingCompletionResponse<FinalCompletionResponse>, CompletionError>> + Send + '_>>
fn stream( &self, request: CompletionRequest, ) -> Pin<Box<dyn Future<Output = Result<StreamingCompletionResponse<FinalCompletionResponse>, CompletionError>> + Send + '_>>
👎Deprecated since 0.25.0:
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use CompletionModel instead.
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