pub struct AudioGenerationResponse {
pub audio: Vec<u8>,
pub usage: Usage,
pub provider: String,
pub model: Option<String>,
pub response_id: Option<String>,
pub provider_request_id: Option<String>,
pub raw: Value,
}Available on crate feature
audio only.Expand description
Generated audio and normalized provider metadata.
Fields§
§audio: Vec<u8>The generated audio bytes.
usage: UsageUsage as the provider reported it; every counter is None when the
provider reported none (see Usage).
provider: StringStable descriptor name of the provider that produced this response,
for example "openai". Always populated.
model: Option<String>Provider-reported model identifier, when the wire response named one.
response_id: Option<String>Provider-assigned response-scoped identifier, when reported.
provider_request_id: Option<String>Transport request ID from HTTP headers, or None when unreported.
raw: ValueProvider response metadata. May be null for byte-only responses or
responses constructed without metadata; audio bytes remain in Self::audio.
Implementations§
Trait Implementations§
Source§impl Clone for AudioGenerationResponse
impl Clone for AudioGenerationResponse
Source§impl Debug for AudioGenerationResponse
impl Debug for AudioGenerationResponse
Source§impl<'de> Deserialize<'de> for AudioGenerationResponse
impl<'de> Deserialize<'de> for AudioGenerationResponse
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
Auto Trait Implementations§
impl Freeze for AudioGenerationResponse
impl RefUnwindSafe for AudioGenerationResponse
impl Send for AudioGenerationResponse
impl Sync for AudioGenerationResponse
impl Unpin for AudioGenerationResponse
impl UnsafeUnpin for AudioGenerationResponse
impl UnwindSafe for AudioGenerationResponse
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.