pub struct CreateCompletionResponseChoice {
pub finish_reason: CreateCompletionResponseChoiceFinishReason,
pub index: u64,
pub logprobs: Option<CreateCompletionResponseChoiceLogprobs>,
pub text: String,
}
Fields§
§finish_reason: CreateCompletionResponseChoiceFinishReason
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,
or content_filter
if content was omitted due to a flag from our content filters.
index: u64
§logprobs: Option<CreateCompletionResponseChoiceLogprobs>
§text: String
Implementations§
Source§impl CreateCompletionResponseChoice
impl CreateCompletionResponseChoice
Sourcepub fn builder() -> CreateCompletionResponseChoiceBuilder<((), (), (), ())>
pub fn builder() -> CreateCompletionResponseChoiceBuilder<((), (), (), ())>
Create a builder for building CreateCompletionResponseChoice
.
On the builder, call .finish_reason(...)
, .index(...)
, .logprobs(...)
(optional), .text(...)
to set the values of the fields.
Finally, call .build()
to create the instance of CreateCompletionResponseChoice
.
Trait Implementations§
Source§impl Clone for CreateCompletionResponseChoice
impl Clone for CreateCompletionResponseChoice
Source§fn clone(&self) -> CreateCompletionResponseChoice
fn clone(&self) -> CreateCompletionResponseChoice
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<'de> Deserialize<'de> for CreateCompletionResponseChoice
impl<'de> Deserialize<'de> for CreateCompletionResponseChoice
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
Source§impl PartialEq for CreateCompletionResponseChoice
impl PartialEq for CreateCompletionResponseChoice
Source§fn eq(&self, other: &CreateCompletionResponseChoice) -> bool
fn eq(&self, other: &CreateCompletionResponseChoice) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for CreateCompletionResponseChoice
Auto Trait Implementations§
impl Freeze for CreateCompletionResponseChoice
impl RefUnwindSafe for CreateCompletionResponseChoice
impl Send for CreateCompletionResponseChoice
impl Sync for CreateCompletionResponseChoice
impl Unpin for CreateCompletionResponseChoice
impl UnwindSafe for CreateCompletionResponseChoice
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