pub struct OpenAIChatCompletionResponse {
pub id: String,
pub object: String,
pub created: u64,
pub model: String,
pub choices: Vec<OpenAIChatChoice>,
pub usage: Option<Usage>,
}Expand description
OpenAI-compatible chat completion response with tool-call aware messages.
Fields§
§id: StringA unique identifier for the chat completion.
object: StringThe type of object, which is always chat.completion.
created: u64The Unix timestamp (in seconds) of when the completion was created.
model: StringThe model that was used for the completion.
choices: Vec<OpenAIChatChoice>A list of chat completion choices.
usage: Option<Usage>Token usage information for this completion.
Trait Implementations§
Source§impl Clone for OpenAIChatCompletionResponse
impl Clone for OpenAIChatCompletionResponse
Source§fn clone(&self) -> OpenAIChatCompletionResponse
fn clone(&self) -> OpenAIChatCompletionResponse
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 Debug for OpenAIChatCompletionResponse
impl Debug for OpenAIChatCompletionResponse
Source§impl<'de> Deserialize<'de> for OpenAIChatCompletionResponse
impl<'de> Deserialize<'de> for OpenAIChatCompletionResponse
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 Freeze for OpenAIChatCompletionResponse
impl RefUnwindSafe for OpenAIChatCompletionResponse
impl Send for OpenAIChatCompletionResponse
impl Sync for OpenAIChatCompletionResponse
impl Unpin for OpenAIChatCompletionResponse
impl UnsafeUnpin for OpenAIChatCompletionResponse
impl UnwindSafe for OpenAIChatCompletionResponse
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