pub struct CompactResponseRequest {
pub model: String,
pub input: Option<InputParam>,
pub previous_response_id: Option<String>,
pub instructions: Option<String>,
pub prompt_cache_key: Option<String>,
pub prompt_cache_retention: Option<PromptCacheRetention>,
}response-types only.Expand description
Request to compact a conversation.
Fields§
§model: StringModel ID used to generate the response, like gpt-5 or o3. OpenAI offers a wide range of models
with different capabilities, performance characteristics, and price points. Refer to the
model guide to browse and compare available models.
input: Option<InputParam>Text, image, or file inputs to the model, used to generate a response
previous_response_id: Option<String>The unique ID of the previous response to the model. Use this to create multi-turn
conversations. Learn more about conversation state.
Cannot be used in conjunction with conversation.
instructions: Option<String>A system (or developer) message inserted into the model’s context.
When used along with previous_response_id, the instructions from a previous response will
not be carried over to the next response. This makes it simple to swap out system (or
developer) messages in new responses.
prompt_cache_key: Option<String>A key to use when reading from or writing to the prompt cache.
prompt_cache_retention: Option<PromptCacheRetention>How long to retain a prompt cache entry created by this request.
Trait Implementations§
Source§impl Clone for CompactResponseRequest
impl Clone for CompactResponseRequest
Source§fn clone(&self) -> CompactResponseRequest
fn clone(&self) -> CompactResponseRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompactResponseRequest
impl Debug for CompactResponseRequest
Source§impl Default for CompactResponseRequest
impl Default for CompactResponseRequest
Source§fn default() -> CompactResponseRequest
fn default() -> CompactResponseRequest
Source§impl<'de> Deserialize<'de> for CompactResponseRequest
impl<'de> Deserialize<'de> for CompactResponseRequest
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>,
Source§impl PartialEq for CompactResponseRequest
impl PartialEq for CompactResponseRequest
Source§fn eq(&self, other: &CompactResponseRequest) -> bool
fn eq(&self, other: &CompactResponseRequest) -> bool
self and other values to be equal, and is used by ==.