pub struct Output {
pub choices: Vec<OutputChoicesItem>,
pub citations: Option<Vec<String>>,
pub created: Option<i64>,
pub detail: Vec<OutputDetailItem>,
pub id: Option<String>,
pub images: Option<Vec<OutputImagesItem>>,
pub model: Option<String>,
pub object: Option<String>,
pub related_questions: Option<Vec<String>>,
pub search_results: Option<Vec<OutputSearchResultsItem>>,
pub usage: Option<OutputUsage>,
}Expand description
Response structure for chat completion creation, including success and validation error shapes.
Fields§
§choices: Vec<OutputChoicesItem>Array of completion choices.
citations: Option<Vec<String>>Citations (if any).
created: Option<i64>Unix timestamp when the completion was created.
detail: Vec<OutputDetailItem>Validation error details for 422 Unprocessable Entity responses.
id: Option<String>Unique identifier for the completion.
images: Option<Vec<OutputImagesItem>>Images (if any).
model: Option<String>Model used for generation.
object: Option<String>Object type identifier. Default: chat.completion.
Related questions (if any).
search_results: Option<Vec<OutputSearchResultsItem>>Search results (if any).
usage: Option<OutputUsage>Usage object (token counts and cost).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Output
impl Freeze for Outputwhere
*const u8 is !null: Freeze,
PhantomData<OutputChoicesItem>: Freeze,
PhantomData<String>: Freeze,
PhantomData<OutputDetailItem>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<OutputImagesItem>: Freeze,
PhantomData<OutputSearchResultsItem>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Outputwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<OutputChoicesItem>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<OutputDetailItem>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<OutputImagesItem>: UnsafeUnpin,
PhantomData<OutputSearchResultsItem>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for Output
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