pub struct LanguageModelGenerateResult {
pub content: LanguageModelContent,
pub finish_reason: LanguageModelFinishReason,
pub usage: LanguageModelUsage,
pub provider_metadata: Option<ProviderMetadata>,
pub request: Option<LanguageModelRawRequest>,
pub response_metadata: Option<LanguageModelRawResponse>,
pub warnings: Option<Vec<Warning>>,
}Expand description
Represents the result of a Language Model generation.
Fields§
§content: LanguageModelContentThe generated content
finish_reason: LanguageModelFinishReasonThe finish reason, if the generation is complete
usage: LanguageModelUsageThe usage information for this generation
provider_metadata: Option<ProviderMetadata>Provider-specific metadata for this generation result
request: Option<LanguageModelRawRequest>The original request that led to this generation result, if available
response_metadata: Option<LanguageModelRawResponse>The original response from the provider, if available
warnings: Option<Vec<Warning>>Any warnings related to this generation result
Trait Implementations§
Source§impl Clone for LanguageModelGenerateResult
impl Clone for LanguageModelGenerateResult
Source§fn clone(&self) -> LanguageModelGenerateResult
fn clone(&self) -> LanguageModelGenerateResult
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 moreAuto Trait Implementations§
impl Freeze for LanguageModelGenerateResult
impl RefUnwindSafe for LanguageModelGenerateResult
impl Send for LanguageModelGenerateResult
impl Sync for LanguageModelGenerateResult
impl Unpin for LanguageModelGenerateResult
impl UnsafeUnpin for LanguageModelGenerateResult
impl UnwindSafe for LanguageModelGenerateResult
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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