update code to use new system prompt for routing

This commit is contained in:
Adil Hafeez 2025-05-30 01:01:33 -07:00
parent 470cdf9843
commit 9d4b9c9104
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
4 changed files with 222 additions and 261 deletions

View file

@ -169,6 +169,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 {