update code to use new json based system prompt for routing (#493)

This commit is contained in:
Adil Hafeez 2025-05-30 17:40:46 -07:00 committed by GitHub
parent 8d12a9a6e0
commit 0d190a6e5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 433 additions and 283 deletions

View file

@ -172,6 +172,25 @@ impl Display for LlmProviderType {
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct LlmRoute {
pub name: String,
pub description: String,
}
impl From<&LlmProvider> for LlmRoute {
fn from(provider: &LlmProvider) -> Self {
Self {
name: provider.name.to_string(),
description: provider
.usage
.as_ref()
.cloned()
.unwrap_or_else(|| "No description available".to_string()),
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
//TODO: use enum for model, but if there is a new model, we need to update the code
pub struct LlmProvider {