pub struct ExtendedChoice {
pub index: usize,
pub message: ChatMessage,
pub finish_reason: String,
pub logprobs: Option<ChoiceLogprobs>,
pub tool_calls: Option<Vec<ToolCall>>,
}Expand description
A single completion choice that may include logprobs and tool calls.
Fields§
§index: usizeZero-based index of this choice among all returned completions.
message: ChatMessageThe generated assistant message.
finish_reason: StringWhy generation stopped ("stop", "length", "tool_calls", etc.).
logprobs: Option<ChoiceLogprobs>Log probability information (present only when logprobs was requested).
tool_calls: Option<Vec<ToolCall>>Tool calls made by the model, if any.
Trait Implementations§
Source§impl Debug for ExtendedChoice
impl Debug for ExtendedChoice
Auto Trait Implementations§
impl Freeze for ExtendedChoice
impl RefUnwindSafe for ExtendedChoice
impl Send for ExtendedChoice
impl Sync for ExtendedChoice
impl Unpin for ExtendedChoice
impl UnsafeUnpin for ExtendedChoice
impl UnwindSafe for ExtendedChoice
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more