assistant: Add display_name for OpenAI and Gemini (#17508)

This commit is contained in:
Peter Tripp 2024-09-10 13:41:06 -04:00 committed by GitHub
parent 85f4c96fef
commit fb9d01b0d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 34 additions and 16 deletions

View file

@ -37,6 +37,7 @@ pub struct GoogleSettings {
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
pub struct AvailableModel {
name: String,
display_name: Option<String>,
max_tokens: usize,
}
@ -170,6 +171,7 @@ impl LanguageModelProvider for GoogleLanguageModelProvider {
model.name.clone(),
google_ai::Model::Custom {
name: model.name.clone(),
display_name: model.display_name.clone(),
max_tokens: model.max_tokens,
},
);