#[non_exhaustive]pub struct ClassifyRequest {
pub batch_id: String,
pub model: String,
pub questions: IndexMap<String, Question>,
pub items: Vec<Item>,
pub max_cost_usd: Option<Number>,
}Expand description
The classify.run request.
Non-exhaustive so later optional members are additive: use
ClassifyRequest::new and the with_* setters, or decode one.
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.batch_id: StringThe idempotency key: 1 to BATCH_ID_MAX_LEN printable ASCII
characters.
model: StringThe catalog id, <provider>/<model>. Never substituted.
questions: IndexMap<String, Question>The questions, by caller-chosen id, in the order the caller wrote them.
items: Vec<Item>The items, answered in this order.
max_cost_usd: Option<Number>The batch’s spend ceiling. Not part of the body identity; a lower
value on a re-send becomes the batch’s recorded ceiling (see
effective_ceiling).
Implementations§
Trait Implementations§
Source§impl Clone for ClassifyRequest
impl Clone for ClassifyRequest
Source§impl Debug for ClassifyRequest
impl Debug for ClassifyRequest
Source§impl<'de> Deserialize<'de> for ClassifyRequest
impl<'de> Deserialize<'de> for ClassifyRequest
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
Source§impl PartialEq for ClassifyRequest
impl PartialEq for ClassifyRequest
Source§impl Serialize for ClassifyRequest
impl Serialize for ClassifyRequest
impl StructuralPartialEq for ClassifyRequest
Auto Trait Implementations§
impl Freeze for ClassifyRequest
impl RefUnwindSafe for ClassifyRequest
impl Send for ClassifyRequest
impl Sync for ClassifyRequest
impl Unpin for ClassifyRequest
impl UnsafeUnpin for ClassifyRequest
impl UnwindSafe for ClassifyRequest
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