pub struct OpenAIPromptCacheSettings {
pub enabled: bool,
pub surface_metrics: bool,
pub prompt_cache_key_mode: OpenAIPromptCacheKeyMode,
pub prompt_cache_retention: Option<PromptCacheRetention>,
/* private fields */
}Expand description
OpenAI prompt caching controls (automatic with metrics)
Fields§
§enabled: bool§surface_metrics: bool§prompt_cache_key_mode: OpenAIPromptCacheKeyModeStrategy for generating OpenAI prompt_cache_key.
Session-scoped keys derive one stable key per VT Code conversation.
prompt_cache_retention: Option<PromptCacheRetention>Optional prompt cache retention policy to pass directly into OpenAI Responses API.
Supported values are “in_memory” and “24h”. If set, VT Code will include
prompt_cache_retention in the request body to extend the model-side prompt
caching window or request the explicit in-memory policy.
Trait Implementations§
Source§impl Clone for OpenAIPromptCacheSettings
impl Clone for OpenAIPromptCacheSettings
Source§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_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 inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being 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 UnsafeUnpin 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