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.
Trait Implementations§
Source§impl Clone for CreateResponse
impl Clone for CreateResponse
Source§fn clone(&self) -> CreateResponse
fn clone(&self) -> CreateResponse
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 CreateResponse
impl Debug for CreateResponse
Source§impl<'de> Deserialize<'de> for CreateResponse
impl<'de> Deserialize<'de> for CreateResponse
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>,
Auto Trait Implementations§
impl Freeze for CreateResponse
impl RefUnwindSafe for CreateResponse
impl Send for CreateResponse
impl Sync for CreateResponse
impl Unpin for CreateResponse
impl UnsafeUnpin for CreateResponse
impl UnwindSafe for CreateResponse
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more