mirror of
https://github.com/katanemo/plano.git
synced 2026-05-08 07:12:42 +02:00
fix panic in brightstaff (#485)
make router section optional in arch_config
This commit is contained in:
parent
21faae605f
commit
99dd900a34
1 changed files with 5 additions and 1 deletions
|
|
@ -84,7 +84,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|||
info!("listening on http://{}", bind_address);
|
||||
let listener = TcpListener::bind(bind_address).await?;
|
||||
|
||||
let model = arch_config.routing.as_ref().unwrap().model.clone();
|
||||
let model = arch_config
|
||||
.routing
|
||||
.as_ref()
|
||||
.and_then(|r| Some(r.model.clone()))
|
||||
.unwrap_or_else(|| "none".to_string());
|
||||
|
||||
let router_service: Arc<RouterService> = Arc::new(RouterService::new(
|
||||
arch_config.llm_providers.clone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue