pub struct CreateChatCompletionStreamResponseChoice {
pub delta: ChatCompletionStreamResponseDelta,
pub logprobs: Option<CreateChatCompletionStreamResponseChoiceLogprobs>,
pub finish_reason: Option<CreateChatCompletionStreamResponseChoiceFinishReason>,
pub index: u64,
}
Fields§
§delta: ChatCompletionStreamResponseDelta
§logprobs: Option<CreateChatCompletionStreamResponseChoiceLogprobs>
Log probability information for the choice.
finish_reason: Option<CreateChatCompletionStreamResponseChoiceFinishReason>
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.
Implementations§
Source§impl CreateChatCompletionStreamResponseChoice
impl CreateChatCompletionStreamResponseChoice
Sourcepub fn builder() -> CreateChatCompletionStreamResponseChoiceBuilder<((), (), (), ())>
pub fn builder() -> CreateChatCompletionStreamResponseChoiceBuilder<((), (), (), ())>
Create a builder for building CreateChatCompletionStreamResponseChoice
.
On the builder, call .delta(...)
(optional), .logprobs(...)
(optional), .finish_reason(...)
(optional), .index(...)
to set the values of the fields.
Finally, call .build()
to create the instance of CreateChatCompletionStreamResponseChoice
.
Trait Implementations§
Source§impl Clone for CreateChatCompletionStreamResponseChoice
impl Clone for CreateChatCompletionStreamResponseChoice
Source§fn clone(&self) -> CreateChatCompletionStreamResponseChoice
fn clone(&self) -> CreateChatCompletionStreamResponseChoice
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 CreateChatCompletionStreamResponseChoice
impl<'de> Deserialize<'de> for CreateChatCompletionStreamResponseChoice
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 CreateChatCompletionStreamResponseChoice
impl PartialEq for CreateChatCompletionStreamResponseChoice
Source§fn eq(&self, other: &CreateChatCompletionStreamResponseChoice) -> bool
fn eq(&self, other: &CreateChatCompletionStreamResponseChoice) -> bool
self
and other
values to be equal, and is used by ==
.