pub trait ProviderResponseExt {
type OutputMessage: Serialize;
type Usage: Serialize;
// Required methods
fn get_response_id(&self) -> Option<String>;
fn get_response_model_name(&self) -> Option<String>;
fn get_output_messages(&self) -> Vec<Self::OutputMessage>;
fn get_text_response(&self) -> Option<String>;
fn get_usage(&self) -> Option<Self::Usage>;
}Expand description
Provider response metadata used to populate GenAI telemetry spans.
Required Associated Types§
Sourcetype OutputMessage: Serialize
type OutputMessage: Serialize
Provider-native output message type.
Required Methods§
Sourcefn get_response_id(&self) -> Option<String>
fn get_response_id(&self) -> Option<String>
Returns the provider response ID, if supplied.
Sourcefn get_response_model_name(&self) -> Option<String>
fn get_response_model_name(&self) -> Option<String>
Returns the provider response model name, if supplied.
Sourcefn get_output_messages(&self) -> Vec<Self::OutputMessage>
fn get_output_messages(&self) -> Vec<Self::OutputMessage>
Returns serialized output messages produced by the provider.
Sourcefn get_text_response(&self) -> Option<String>
fn get_text_response(&self) -> Option<String>
Returns the primary text response, when available.