pub struct SystemOneResponse {
pub model: String,
pub usage: Usage,
pub answers: BTreeMap<String, Answer>,
pub raw_http_response: RawResponse,
}Expand description
Answers keyed by question name, together with model and token usage metadata.
Fields§
§model: String§usage: Usage§answers: BTreeMap<String, Answer>§raw_http_response: RawResponseImplementations§
Source§impl SystemOneResponse
impl SystemOneResponse
Sourcepub fn from_raw(raw: RawResponse) -> Result<Self, Error>
pub fn from_raw(raw: RawResponse) -> Result<Self, Error>
Parse an HTTP response, skipping future answer types while retaining the raw body. Non-2xx statuses produce an API error before response validation.
pub fn request_id(&self) -> Option<&str>
Sourcepub fn nouls(&self) -> BTreeMap<&str, &NoulAnswer>
pub fn nouls(&self) -> BTreeMap<&str, &NoulAnswer>
Borrow all yes/no answers without cloning their contents.
pub fn choices(&self) -> BTreeMap<&str, &ChoiceAnswer>
pub fn scores(&self) -> BTreeMap<&str, &ScoreAnswer>
Trait Implementations§
Source§impl Clone for SystemOneResponse
impl Clone for SystemOneResponse
Source§fn clone(&self) -> SystemOneResponse
fn clone(&self) -> SystemOneResponse
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 SystemOneResponse
impl Debug for SystemOneResponse
Auto Trait Implementations§
impl !Freeze for SystemOneResponse
impl RefUnwindSafe for SystemOneResponse
impl Send for SystemOneResponse
impl Sync for SystemOneResponse
impl Unpin for SystemOneResponse
impl UnsafeUnpin for SystemOneResponse
impl UnwindSafe for SystemOneResponse
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