use oris_runtime::language_models::{init_chat_model, ConfigurableModel, InvocationConfig};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let base_model = init_chat_model(
"gpt-4o-mini",
Some(0.7),
Some(1000),
None,
None,
None,
None,
None,
)
.await?;
let _configurable = ConfigurableModel::new(base_model)
.with_configurable_fields(vec![
"model".to_string(),
"temperature".to_string(),
"max_tokens".to_string(),
])
.with_config_prefix("first".to_string());
println!("Created configurable model with prefix 'first'");
println!("Configurable fields: model, temperature, max_tokens\n");
let config = InvocationConfig::new()
.with_run_name("my_experiment".to_string())
.with_tags(vec!["test".to_string(), "demo".to_string()])
.add_metadata("user_id".to_string(), json!("123"))
.add_metadata("experiment_id".to_string(), json!("exp_001"));
println!("Invocation config created:");
println!(" Run name: {:?}", config.run_name);
println!(" Tags: {:?}", config.tags);
println!(" Metadata: {:?}", config.metadata);
Ok(())
}