Struct rig::completion::CompletionResponse
source · pub struct CompletionResponse<T> {
pub choice: ModelChoice,
pub raw_response: T,
}
Expand description
General completion response struct that contains the high-level completion choice and the raw response.
Fields§
§choice: ModelChoice
The completion choice returned by the completion model provider
raw_response: T
The raw response returned by the completion model provider
Trait Implementations§
source§impl<T: Debug> Debug for CompletionResponse<T>
impl<T: Debug> Debug for CompletionResponse<T>
source§impl From<CompletionResponse> for CompletionResponse<CompletionResponse>
impl From<CompletionResponse> for CompletionResponse<CompletionResponse>
source§fn from(response: CompletionResponse) -> Self
fn from(response: CompletionResponse) -> Self
Converts to this type from the input type.
source§impl TryFrom<CompletionResponse> for CompletionResponse<CompletionResponse>
impl TryFrom<CompletionResponse> for CompletionResponse<CompletionResponse>
source§type Error = CompletionError
type Error = CompletionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl<T> Freeze for CompletionResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for CompletionResponse<T>where
T: RefUnwindSafe,
impl<T> Send for CompletionResponse<T>where
T: Send,
impl<T> Sync for CompletionResponse<T>where
T: Sync,
impl<T> Unpin for CompletionResponse<T>where
T: Unpin,
impl<T> UnwindSafe for CompletionResponse<T>where
T: UnwindSafe,
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