Set tool schema format for zed.dev language model (#27788)
Release Notes: - N/A
This commit is contained in:
parent
fc269dfaf9
commit
01a2c8eb01
2 changed files with 14 additions and 3 deletions
|
@ -14,7 +14,7 @@ use smol::lock::{RwLock, RwLockUpgradableReadGuard, RwLockWriteGuard};
|
|||
use strum::EnumIter;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::LanguageModelAvailability;
|
||||
use crate::{LanguageModelAvailability, LanguageModelToolSchemaFormat};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(tag = "provider", rename_all = "lowercase")]
|
||||
|
@ -113,6 +113,13 @@ impl CloudModel {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn tool_input_format(&self) -> LanguageModelToolSchemaFormat {
|
||||
match self {
|
||||
Self::Anthropic(_) | Self::OpenAi(_) => LanguageModelToolSchemaFormat::JsonSchema,
|
||||
Self::Google(_) => LanguageModelToolSchemaFormat::JsonSchemaSubset,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue