pub struct CreateChatCompletionResponseChoice {
pub finish_reason: CreateChatCompletionResponseChoiceFinishReason,
pub index: u64,
pub message: ChatCompletionResponseMessage,
pub logprobs: Option<CreateChatCompletionResponseChoiceLogprobs>,
}
Fields§
§finish_reason: CreateChatCompletionResponseChoiceFinishReason
The reason the model stopped generating tokens. This will be stop
if the model hit a natural stop point or a provided stop sequence,
length
if the maximum number of tokens specified in the request was reached,
content_filter
if content was omitted due to a flag from our content filters,
tool_calls
if the model called a tool, or function_call
(deprecated) if the model called a function.
index: u64
The index of the choice in the list of choices.
message: ChatCompletionResponseMessage
§logprobs: Option<CreateChatCompletionResponseChoiceLogprobs>
Log probability information for the choice.
Implementations§
Source§impl CreateChatCompletionResponseChoice
impl CreateChatCompletionResponseChoice
Sourcepub fn builder() -> CreateChatCompletionResponseChoiceBuilder<((), (), (), ())>
pub fn builder() -> CreateChatCompletionResponseChoiceBuilder<((), (), (), ())>
Create a builder for building CreateChatCompletionResponseChoice
.
On the builder, call .finish_reason(...)
, .index(...)
, .message(...)
(optional), .logprobs(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of CreateChatCompletionResponseChoice
.
Trait Implementations§
Source§impl Clone for CreateChatCompletionResponseChoice
impl Clone for CreateChatCompletionResponseChoice
Source§fn clone(&self) -> CreateChatCompletionResponseChoice
fn clone(&self) -> CreateChatCompletionResponseChoice
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'de> Deserialize<'de> for CreateChatCompletionResponseChoice
impl<'de> Deserialize<'de> for CreateChatCompletionResponseChoice
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>,
Source§impl PartialEq for CreateChatCompletionResponseChoice
impl PartialEq for CreateChatCompletionResponseChoice
Source§fn eq(&self, other: &CreateChatCompletionResponseChoice) -> bool
fn eq(&self, other: &CreateChatCompletionResponseChoice) -> bool
self
and other
values to be equal, and is used by ==
.