pub struct ProviderHttpComponentConfig {
pub id: String,
pub base_url: String,
pub api_key: Option<String>,
pub organization: Option<String>,
pub timeout_secs: Option<u64>,
pub connect_timeout_secs: Option<u64>,
pub max_retries: Option<usize>,
}Expand description
JSON-deserializable configuration for HTTP-backed providers like OpenAI
and Anthropic. Uses plain String for the API key (instead of
SecretString) so that it can be deserialised from JSON/YAML/TOML.
Fields§
§id: StringLogical provider identifier.
base_url: StringProvider API base URL.
api_key: Option<String>Optional API key or bearer token.
organization: Option<String>Optional organization or tenant identifier.
timeout_secs: Option<u64>End-to-end request timeout in seconds (default: 60).
connect_timeout_secs: Option<u64>TCP connection timeout in seconds (default: 10).
max_retries: Option<usize>Maximum retry attempts (default: 2).
Implementations§
Source§impl ProviderHttpComponentConfig
impl ProviderHttpComponentConfig
Sourcepub fn into_provider_http_config(self) -> ProviderHttpConfig
pub fn into_provider_http_config(self) -> ProviderHttpConfig
Converts this JSON config into a ProviderHttpConfig, wrapping
the plain-text API key in a SecretString.
Trait Implementations§
Source§impl Clone for ProviderHttpComponentConfig
impl Clone for ProviderHttpComponentConfig
Source§fn clone(&self) -> ProviderHttpComponentConfig
fn clone(&self) -> ProviderHttpComponentConfig
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 ProviderHttpComponentConfig
impl Debug for ProviderHttpComponentConfig
Source§impl<'de> Deserialize<'de> for ProviderHttpComponentConfig
impl<'de> Deserialize<'de> for ProviderHttpComponentConfig
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
Source§impl JsonSchema for ProviderHttpComponentConfig
impl JsonSchema for ProviderHttpComponentConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ProviderHttpComponentConfig
impl RefUnwindSafe for ProviderHttpComponentConfig
impl Send for ProviderHttpComponentConfig
impl Sync for ProviderHttpComponentConfig
impl Unpin for ProviderHttpComponentConfig
impl UnsafeUnpin for ProviderHttpComponentConfig
impl UnwindSafe for ProviderHttpComponentConfig
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