pub struct DecisionRequest {
pub state: Value,
pub questions: Map<String, Value>,
pub model: Option<String>,
pub lang: Option<Language>,
pub media: Option<Vec<MediaInput>>,
pub detail: Option<MediaDetail>,
pub extra: Map<String, Value>,
}Expand description
Native inference request. A missing model uses the server’s default; basal-rs accepts a model name.
Fields§
§state: ValueAny non-null JSON state; its rendering belongs to the server.
questions: Map<String, Value>Question IDs mapped to native questions, in insertion order.
model: Option<String>Exact model name advertised by /v1/models, or omitted for the server default.
lang: Option<Language>Explicit prompt language.
media: Option<Vec<MediaInput>>Inline media in processing order.
detail: Option<MediaDetail>Image detail budget.
extra: Map<String, Value>Optional native fields such as facts: "auto". Do not repeat the fields above.
Implementations§
Source§impl DecisionRequest
impl DecisionRequest
Sourcepub fn new(state: impl Into<Value>) -> Self
pub fn new(state: impl Into<Value>) -> Self
Create a request for the server’s default model. Insert questions with Self::insert_question.
Trait Implementations§
Source§impl Clone for DecisionRequest
impl Clone for DecisionRequest
Source§impl Debug for DecisionRequest
impl Debug for DecisionRequest
Source§impl<'de> Deserialize<'de> for DecisionRequest
impl<'de> Deserialize<'de> for DecisionRequest
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DecisionRequest
impl RefUnwindSafe for DecisionRequest
impl Send for DecisionRequest
impl Sync for DecisionRequest
impl Unpin for DecisionRequest
impl UnsafeUnpin for DecisionRequest
impl UnwindSafe for DecisionRequest
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