fix format

This commit is contained in:
Adil Hafeez 2025-05-15 22:57:39 -07:00
parent 42225a7b54
commit 908b1f4627
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
3 changed files with 5 additions and 8 deletions

View file

@ -50,7 +50,7 @@ impl RouterService {
.iter()
.map(|provider| {
format!(
"- name: {}()\n description: {}",
"- name: {}\n description: {}",
provider.name,
provider.usage.as_ref().unwrap_or(&"".to_string())
)

View file

@ -89,16 +89,13 @@ impl RouterModel for RouterModelV1 {
);
let router_response: LlmRouterResponse = serde_json::from_str(router_resp_fixed.as_str())?;
let selecter_llm = router_response
.route
.map(|route| route.strip_suffix("()").unwrap_or_default().to_string())
.unwrap();
let selected_llm = router_response.route.unwrap_or_default().to_string();
if selecter_llm.is_empty() {
if selected_llm.is_empty() {
return Ok(None);
}
Ok(Some(selecter_llm))
Ok(Some(selected_llm))
}
}

View file

@ -1,7 +1,7 @@
version: "0.1-beta"
routing:
model: archgw-v1-router-model
model: gpt-4o
listeners:
egress_traffic: