Latency vs Price vs Throughput
use orpheus::prelude::*;
fn main() {
let client = Orpheus::new("Your-API-Key");
let prompt = "What is 23 + 47?";
let model = "moonshotai/kimi-k2";
for priority in [Sort::Latency, Sort::Price, Sort::Throughput] {
let res = client
.chat(prompt)
.model(model)
.with_preferences(|pref| pref.sort(priority))
.send()
.unwrap();
println!(
"Provider picked with priority '{:?}': {}",
priority, res.provider
);
}
}Last updated
Was this helpful?