mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
use the consistent defautl_enabled
This commit is contained in:
@@ -509,7 +509,7 @@ pub struct DynamicToolSpec {
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub input_schema: JsonValue,
|
||||
#[serde(default = "default_dynamic_tool_inject_into_context")]
|
||||
#[serde(default = "default_enabled")]
|
||||
pub inject_into_context: bool,
|
||||
}
|
||||
|
||||
@@ -548,10 +548,6 @@ pub struct ToolProviderUnregisterParams {
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ToolProviderUnregisterResponse {}
|
||||
|
||||
fn default_dynamic_tool_inject_into_context() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, ExperimentalApi)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[ts(export_to = "v2/")]
|
||||
|
||||
@@ -10,7 +10,7 @@ pub struct DynamicToolSpec {
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub input_schema: JsonValue,
|
||||
#[serde(default = "default_inject_into_context")]
|
||||
#[serde(default = "default_enabled")]
|
||||
pub inject_into_context: bool,
|
||||
#[serde(default)]
|
||||
pub provider_owned: bool,
|
||||
@@ -45,6 +45,6 @@ pub enum DynamicToolCallOutputContentItem {
|
||||
InputImage { image_url: String },
|
||||
}
|
||||
|
||||
fn default_inject_into_context() -> bool {
|
||||
fn default_enabled() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user