pub struct SystemOneRequest {
pub state: Value,
pub questions: Questions,
pub model: Option<String>,
pub extra_body: Map<String, Value>,
}Expand description
State and named questions to evaluate with System One.
Fields§
§state: ValueText or structured JSON to evaluate.
questions: QuestionsNonempty questions keyed by answer name.
model: Option<String>Optional model override; omitted values use the client’s configured model.
extra_body: Map<String, Value>Additional JSON fields, merged after the standard fields as in the Python SDK.
Implementations§
Source§impl SystemOneRequest
impl SystemOneRequest
Sourcepub fn new<K, Q>(
state: impl Into<Value>,
questions: impl IntoIterator<Item = (K, Q)>,
) -> Self
pub fn new<K, Q>( state: impl Into<Value>, questions: impl IntoIterator<Item = (K, Q)>, ) -> Self
Create a request from state and named questions.
Arrays of pairs and maps are accepted. Convert mixed question types to
Question using .into() or Question::from(...).
Sourcepub fn model(self, model: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
Override the client’s model for this request.
Sourcepub fn extra_body<K, V>(self, fields: impl IntoIterator<Item = (K, V)>) -> Self
pub fn extra_body<K, V>(self, fields: impl IntoIterator<Item = (K, V)>) -> Self
Add fields that are merged last, including explicit nulls and overrides.
Trait Implementations§
Source§impl Clone for SystemOneRequest
impl Clone for SystemOneRequest
Source§fn clone(&self) -> SystemOneRequest
fn clone(&self) -> SystemOneRequest
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 SystemOneRequest
impl Debug for SystemOneRequest
Auto Trait Implementations§
impl Freeze for SystemOneRequest
impl RefUnwindSafe for SystemOneRequest
impl Send for SystemOneRequest
impl Sync for SystemOneRequest
impl Unpin for SystemOneRequest
impl UnsafeUnpin for SystemOneRequest
impl UnwindSafe for SystemOneRequest
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