Skip to main content

ProviderRequestExt

Trait ProviderRequestExt 

Source
pub trait ProviderRequestExt {
    type InputMessage: Serialize;

    // Required methods
    fn get_input_messages(&self) -> Vec<Self::InputMessage>;
    fn get_system_prompt(&self) -> Option<String>;
    fn get_model_name(&self) -> String;
    fn get_prompt(&self) -> Option<String>;
}
Expand description

Provider request metadata used to populate GenAI telemetry spans.

Required Associated Types§

Source

type InputMessage: Serialize

Provider-native message type used for serialized input messages.

Required Methods§

Source

fn get_input_messages(&self) -> Vec<Self::InputMessage>

Returns serialized input messages sent to the provider.

Source

fn get_system_prompt(&self) -> Option<String>

Returns the system prompt, if represented separately by the provider.

Source

fn get_model_name(&self) -> String

Returns the model name requested from the provider.

Source

fn get_prompt(&self) -> Option<String>

Returns the primary prompt text, when available.

Implementors§