pub struct StructuredCompletionState<O: StructuredOutput> {
pub request_id: Option<String>,
pub model: String,
pub structured: Option<O>,
pub refusal: Option<String>,
pub finish_reason: Option<FinishReason>,
pub usage: Option<Usage>,
}Fields§
§request_id: Option<String>§model: String§structured: Option<O>§refusal: Option<String>§finish_reason: Option<FinishReason>§usage: Option<Usage>Implementations§
Source§impl<O> StructuredCompletionState<O>where
O: StructuredOutput,
impl<O> StructuredCompletionState<O>where
O: StructuredOutput,
pub fn apply( &mut self, event: &StructuredCompletionEvent<O>, ) -> Result<(), StructuredCompletionReductionError>
pub fn finish( self, ) -> Result<StructuredCompletionResult<O>, StructuredCompletionReductionError>
Trait Implementations§
Source§impl<O: Clone + StructuredOutput> Clone for StructuredCompletionState<O>
impl<O: Clone + StructuredOutput> Clone for StructuredCompletionState<O>
Source§fn clone(&self) -> StructuredCompletionState<O>
fn clone(&self) -> StructuredCompletionState<O>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<O: Debug + StructuredOutput> Debug for StructuredCompletionState<O>
impl<O: Debug + StructuredOutput> Debug for StructuredCompletionState<O>
Source§impl<O> Default for StructuredCompletionState<O>where
O: StructuredOutput,
impl<O> Default for StructuredCompletionState<O>where
O: StructuredOutput,
Auto Trait Implementations§
impl<O> Freeze for StructuredCompletionState<O>where
O: Freeze,
impl<O> RefUnwindSafe for StructuredCompletionState<O>where
O: RefUnwindSafe,
impl<O> Send for StructuredCompletionState<O>
impl<O> Sync for StructuredCompletionState<O>
impl<O> Unpin for StructuredCompletionState<O>where
O: Unpin,
impl<O> UnsafeUnpin for StructuredCompletionState<O>where
O: UnsafeUnpin,
impl<O> UnwindSafe for StructuredCompletionState<O>where
O: 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