pub struct OpenAIPromptCacheSettings {
pub enabled: bool,
pub min_prefix_tokens: u32,
pub idle_expiration_seconds: u64,
pub surface_metrics: bool,
pub prompt_cache_retention: Option<String>,
}Expand description
OpenAI prompt caching controls (automatic with metrics)
Fields§
§enabled: bool§min_prefix_tokens: u32§idle_expiration_seconds: u64§surface_metrics: bool§prompt_cache_retention: Option<String>Optional prompt cache retention string to pass directly into OpenAI Responses API
Example: “24h” or “1d”. If set, VT Code will include prompt_cache_retention
in the request body to extend the model-side prompt caching window.
Implementations§
Trait Implementations§
Source§impl Clone for OpenAIPromptCacheSettings
impl Clone for OpenAIPromptCacheSettings
Source§fn clone(&self) -> OpenAIPromptCacheSettings
fn clone(&self) -> OpenAIPromptCacheSettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenAIPromptCacheSettings
impl Debug for OpenAIPromptCacheSettings
Source§impl Default for OpenAIPromptCacheSettings
impl Default for OpenAIPromptCacheSettings
Source§impl<'de> Deserialize<'de> for OpenAIPromptCacheSettings
impl<'de> Deserialize<'de> for OpenAIPromptCacheSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for OpenAIPromptCacheSettings
impl JsonSchema for OpenAIPromptCacheSettings
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for OpenAIPromptCacheSettings
impl RefUnwindSafe for OpenAIPromptCacheSettings
impl Send for OpenAIPromptCacheSettings
impl Sync for OpenAIPromptCacheSettings
impl Unpin for OpenAIPromptCacheSettings
impl UnwindSafe for OpenAIPromptCacheSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more