Declarative providers (#5084)
Co-authored-by: Douwe Osinga <douwe@squareup.com> Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
@@ -81,6 +81,14 @@ impl ModelInfo {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, ToSchema)]
|
||||
pub enum ProviderType {
|
||||
Preferred,
|
||||
Builtin,
|
||||
Declarative,
|
||||
Custom,
|
||||
}
|
||||
|
||||
/// Metadata about a provider's configuration requirements and capabilities
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct ProviderMetadata {
|
||||
@@ -93,7 +101,6 @@ pub struct ProviderMetadata {
|
||||
/// The default/recommended model for this provider
|
||||
pub default_model: String,
|
||||
/// A list of currently known models with their capabilities
|
||||
/// TODO: eventually query the apis directly
|
||||
pub known_models: Vec<ModelInfo>,
|
||||
/// Link to the docs where models can be found
|
||||
pub model_doc_link: String,
|
||||
@@ -132,7 +139,6 @@ impl ProviderMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a new ProviderMetadata with ModelInfo objects that include cost data
|
||||
pub fn with_models(
|
||||
name: &str,
|
||||
display_name: &str,
|
||||
|
||||
Reference in New Issue
Block a user