pub struct ProviderConfig {
pub profile: ProviderProfile,
pub runner: Symbol,
pub codec: Symbol,
pub endpoint: String,
pub model: String,
pub api_key_env: Option<String>,
pub locality: Symbol,
pub timeout: Duration,
pub stream: bool,
pub tools: bool,
pub max_output_bytes: usize,
}Expand description
Concrete HTTP runner configuration derived from a provider profile and an option map.
Fields§
§profile: ProviderProfileSource provider profile.
runner: SymbolRunner symbol after applying a name override.
codec: SymbolCodec symbol after applying a codec override.
endpoint: StringBase endpoint used by the HTTP runner.
model: StringModel name to send to the provider codec.
api_key_env: Option<String>Environment variable carrying the provider secret, when any.
locality: SymbolRunner locality after endpoint posture has been classified.
timeout: DurationHTTP timeout.
stream: boolWhether requests should use streaming.
tools: boolWhether request encoding should include tools.
max_output_bytes: usizeMaximum decoded provider response size.
Implementations§
Source§impl ProviderConfig
impl ProviderConfig
Sourcepub fn from_options(
profile: ProviderProfile,
cx: &mut Cx,
options: &HashMap<String, Value>,
) -> Result<Self>
pub fn from_options( profile: ProviderProfile, cx: &mut Cx, options: &HashMap<String, Value>, ) -> Result<Self>
Builds provider config from the same option map used by the existing agent runner constructors.
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
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 moreSource§impl Debug for ProviderConfig
impl Debug for ProviderConfig
impl Eq for ProviderConfig
Source§impl PartialEq for ProviderConfig
impl PartialEq for ProviderConfig
impl StructuralPartialEq for ProviderConfig
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnsafeUnpin for ProviderConfig
impl UnwindSafe for ProviderConfig
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