pub struct Choice {
pub role: Option<String>,
pub content: String,
pub tool_calls: BTreeMap<usize, ToolCall>,
pub finish_reason: Option<String>,
}Expand description
The assembled state of a single choices[index].
Fields§
§role: Option<String>The role from the first delta that carried one.
content: StringThe concatenated text content.
tool_calls: BTreeMap<usize, ToolCall>Tool calls keyed by their tool_calls[i].index.
finish_reason: Option<String>The finish_reason, set when the final chunk for this choice arrives.
Trait Implementations§
impl Eq for Choice
impl StructuralPartialEq for Choice
Auto Trait Implementations§
impl Freeze for Choice
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnsafeUnpin for Choice
impl UnwindSafe for Choice
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