pub struct GenerateResponse {
pub content: Vec<ContentPart>,
pub stop_reason: Option<String>,
pub usage: Option<Usage>,
}Fields§
§content: Vec<ContentPart>§stop_reason: Option<String>§usage: Option<Usage>Implementations§
Source§impl GenerateResponse
impl GenerateResponse
pub fn text(&self) -> Option<String>
pub fn tool_calls(&self) -> Vec<&ContentPart>
pub fn stop_reason(&self) -> Option<&str>
Sourcepub fn parse<T: DeserializeOwned>(&self) -> Result<T, Error>
pub fn parse<T: DeserializeOwned>(&self) -> Result<T, Error>
Arguments of the first tool call; use GenerateResponse::tool_calls for the rest.
Trait Implementations§
Source§impl Clone for GenerateResponse
impl Clone for GenerateResponse
Source§fn clone(&self) -> GenerateResponse
fn clone(&self) -> GenerateResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GenerateResponse
impl RefUnwindSafe for GenerateResponse
impl Send for GenerateResponse
impl Sync for GenerateResponse
impl Unpin for GenerateResponse
impl UnsafeUnpin for GenerateResponse
impl UnwindSafe for GenerateResponse
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