pub struct AlgorithmFactory { /* private fields */ }Expand description
Parsed deployment configuration for building algorithms with host-owned execution.
Implementations§
Source§impl AlgorithmFactory
impl AlgorithmFactory
Sourcepub fn from_toml(source: &str) -> Result<Self, RunnerError>
pub fn from_toml(source: &str) -> Result<Self, RunnerError>
Parses deployment TOML without resolving credentials or constructing provider clients. Invalid TOML returns a configuration error; routing settings are checked when building.
Sourcepub fn build(
&self,
) -> Result<BTreeMap<String, (Arc<dyn Algorithm>, RuntimeModels)>, RunnerError>
pub fn build( &self, ) -> Result<BTreeMap<String, (Arc<dyn Algorithm>, RuntimeModels)>, RunnerError>
Builds algorithms and their model groups, keyed by configured route id.
LLM calls and outcomes use target names; the host resolves their provider IDs and owns target prompts, provider settings and transport. Decision calls use provider IDs. Reuse the returned algorithms across requests to retain algorithm-owned state.
Sourcepub fn build_configured(
&self,
) -> Result<BTreeMap<String, ConfiguredAlgorithm>, RunnerError>
pub fn build_configured( &self, ) -> Result<BTreeMap<String, ConfiguredAlgorithm>, RunnerError>
Builds reusable algorithms keyed by route ID that check target requirements. Each Decision model ID must identify one client across a route’s alternatives. The host handles model/Decision calls, approved answer/fallback targets, prompts, provider settings, credentials and transport. No provider clients are built or credentials read.