pub struct DecisionResponse {
pub model: String,
pub answers: BTreeMap<String, Answer>,
pub usage: Usage,
pub id: Option<String>,
pub provider: Option<String>,
}Expand description
The reply: one answer per question, under the ids from the request.
Fields§
§model: StringThe model that answered, with its date, such as typesafe/jev-1.13-20260917.
answers: BTreeMap<String, Answer>§usage: Usage§id: Option<String>OpenRouter’s id for the call.
provider: Option<String>Implementations§
Source§impl DecisionResponse
impl DecisionResponse
Sourcepub fn choice(&self, id: &str) -> Result<&ChoiceAnswer>
pub fn choice(&self, id: &str) -> Result<&ChoiceAnswer>
The Choice answer to question id.
Sourcepub fn score(&self, id: &str) -> Result<&ScoreAnswer>
pub fn score(&self, id: &str) -> Result<&ScoreAnswer>
The Score answer to question id.
Trait Implementations§
Source§impl Clone for DecisionResponse
impl Clone for DecisionResponse
Source§impl Debug for DecisionResponse
impl Debug for DecisionResponse
Source§impl<'de> Deserialize<'de> for DecisionResponse
impl<'de> Deserialize<'de> for DecisionResponse
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 DecisionResponse
impl PartialEq for DecisionResponse
Source§impl Serialize for DecisionResponse
impl Serialize for DecisionResponse
impl StructuralPartialEq for DecisionResponse
Auto Trait Implementations§
impl Freeze for DecisionResponse
impl RefUnwindSafe for DecisionResponse
impl Send for DecisionResponse
impl Sync for DecisionResponse
impl Unpin for DecisionResponse
impl UnsafeUnpin for DecisionResponse
impl UnwindSafe for DecisionResponse
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