pub struct OxiosEngineBuilder { /* private fields */ }Expand description
Builder for creating an OxiosEngine with advanced configuration.
Implementations§
Source§impl OxiosEngineBuilder
impl OxiosEngineBuilder
Sourcepub fn default_model(self, model_id: impl Into<String>) -> Self
pub fn default_model(self, model_id: impl Into<String>) -> Self
Set the default model ID.
Sourcepub fn api_key(self, provider: &str, key: impl Into<String>) -> Self
pub fn api_key(self, provider: &str, key: impl Into<String>) -> Self
Register an API key for a specific provider.
Sourcepub fn credential(
self,
provider: &str,
api_key: impl Into<String>,
base_url: Option<&str>,
) -> Self
pub fn credential( self, provider: &str, api_key: impl Into<String>, base_url: Option<&str>, ) -> Self
Register a full credential (API key + optional base URL).
Sourcepub fn provider(self, name: &str, p: impl Provider + 'static) -> Self
pub fn provider(self, name: &str, p: impl Provider + 'static) -> Self
Register a custom provider.
Sourcepub fn build(self) -> OxiosEngine
pub fn build(self) -> OxiosEngine
Build the engine.
Sourcepub fn build_with_routing(self) -> (OxiosEngine, RoutingControl)
pub fn build_with_routing(self) -> (OxiosEngine, RoutingControl)
Build the engine with routing enabled.
Returns (OxiosEngine, RoutingControl) for runtime routing control.
Attach an Authorizer to the engine. Agents built via Oxi::agent()
will receive this authorizer through the new AgentBuilder::authorizer() API.
Sourcepub fn with_tracer(self, tracer: Arc<Tracer>) -> Self
pub fn with_tracer(self, tracer: Arc<Tracer>) -> Self
Attach a Tracer to the engine. Agents built via Oxi::agent()
will receive this tracer through the new AgentBuilder::tracer() API.
Sourcepub fn with_cost_tracker(self, cost_tracker: Arc<CostTracker>) -> Self
pub fn with_cost_tracker(self, cost_tracker: Arc<CostTracker>) -> Self
Attach a CostTracker to the engine. Agents built via Oxi::agent()
will receive this cost tracker through the new AgentBuilder::cost_tracker() API.