#[non_exhaustive]pub struct CompactResponseRequest {
pub model: String,
pub input: Option<ResponseInput>,
pub instructions: Option<String>,
pub previous_response_id: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
EN: Request body for POST /v1/responses/compact.
中文:POST /v1/responses/compact 的请求体。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: StringEN: Model id used for compaction. 中文:用于压缩上下文的模型 ID。
input: Option<ResponseInput>EN: Optional input to compact. 中文:要压缩的可选输入。
instructions: Option<String>EN: Optional system or developer instructions. 中文:可选的系统或开发者指令。
previous_response_id: Option<String>EN: Optional previous response id for conversation state. 中文:用于会话状态的可选上一条响应 ID。
extra: BTreeMap<String, Value>EN: Forward-compatible optional fields not yet covered by handwritten types. 中文:手写类型尚未覆盖的前向兼容可选字段。
Implementations§
Source§impl CompactResponseRequest
impl CompactResponseRequest
Sourcepub fn builder() -> CompactResponseRequestBuilder
pub fn builder() -> CompactResponseRequestBuilder
EN: Starts building a response compaction request. 中文:开始构建响应压缩请求。
Trait Implementations§
Source§impl Clone for CompactResponseRequest
impl Clone for CompactResponseRequest
Source§fn clone(&self) -> CompactResponseRequest
fn clone(&self) -> CompactResponseRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompactResponseRequest
impl Debug for CompactResponseRequest
Source§impl PartialEq for CompactResponseRequest
impl PartialEq for CompactResponseRequest
Source§fn eq(&self, other: &CompactResponseRequest) -> bool
fn eq(&self, other: &CompactResponseRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CompactResponseRequest
impl Serialize for CompactResponseRequest
impl StructuralPartialEq for CompactResponseRequest
Auto Trait Implementations§
impl Freeze for CompactResponseRequest
impl RefUnwindSafe for CompactResponseRequest
impl Send for CompactResponseRequest
impl Sync for CompactResponseRequest
impl Unpin for CompactResponseRequest
impl UnsafeUnpin for CompactResponseRequest
impl UnwindSafe for CompactResponseRequest
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