fn parse_modifier(s: String) -> Result<ModifierDef, ConfigError>Expand description
Parses a modifier specification string into a ModifierDef.
Currently this is a placeholder implementation that treats the entire input string as the name of an embeddable provider.
§Parameters
s: Modifier specification string.
§Returns
Ok(ModifierDef::Embeddable { provider }) where provider is the original
input string.
§Examples
ⓘ
let def = parse_modifier("openai".to_string()).unwrap();
match def {
ModifierDef::Embeddable { provider } => assert_eq!(provider, "openai"),
_ => panic!("unexpected modifier variant"),
}