Reuse OpenAI low_speed_timeout setting for zed.dev provider (#18144)
Release Notes: - N/A
This commit is contained in:
parent
d97427f69e
commit
9f6ff29a54
4 changed files with 31 additions and 2 deletions
|
@ -231,6 +231,7 @@ pub struct GoogleSettingsContent {
|
|||
#[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
|
||||
pub struct ZedDotDevSettingsContent {
|
||||
available_models: Option<Vec<cloud::AvailableModel>>,
|
||||
pub low_speed_timeout_in_seconds: Option<u64>,
|
||||
}
|
||||
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]
|
||||
|
@ -333,6 +334,14 @@ impl settings::Settings for AllLanguageModelSettings {
|
|||
.as_ref()
|
||||
.and_then(|s| s.available_models.clone()),
|
||||
);
|
||||
if let Some(low_speed_timeout_in_seconds) = value
|
||||
.zed_dot_dev
|
||||
.as_ref()
|
||||
.and_then(|s| s.low_speed_timeout_in_seconds)
|
||||
{
|
||||
settings.zed_dot_dev.low_speed_timeout =
|
||||
Some(Duration::from_secs(low_speed_timeout_in_seconds));
|
||||
}
|
||||
|
||||
merge(
|
||||
&mut settings.google.api_url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue