pub struct CreateResponse {
pub input: Value,
pub model: Option<String>,
pub metadata: Option<Map<String, Value>>,
pub stream: bool,
pub background: bool,
pub previous_response_id: Option<String>,
pub instructions: Option<String>,
pub rest: Map<String, Value>,
}Expand description
What a client sends to run a task.
Fields§
§input: ValueA bare string is shorthand for one user message.
model: Option<String>Canonical model id; absent means the harness default.
metadata: Option<Map<String, Value>>Client metadata. harness_id selects the harness.
stream: boolWhether to stream the result as server-sent events.
background: boolReturn immediately with an in_progress task and keep running it.
previous_response_id: Option<String>Continue the session this response belongs to.
instructions: Option<String>System instructions for the turn.
rest: Map<String, Value>Everything the client sent that this struct does not name, kept so reserved fields can be reported rather than silently dropped.
Implementations§
Source§impl CreateResponse
impl CreateResponse
Sourcepub fn prompt(&self) -> String
pub fn prompt(&self) -> String
The prompt text, whether the client sent a string or an item array.
Sourcepub fn ignored_fields(&self) -> Vec<String>
pub fn ignored_fields(&self) -> Vec<String>
Which reserved fields this request actually carried, in spec order.
Reports what was sent and dropped — not what the server would drop, and not what it happens to know about. A hardcoded list tells a client its request was altered when it was not.
Sourcepub fn harness_id(&self) -> Option<&str>
pub fn harness_id(&self) -> Option<&str>
The harness the client asked for, if any.