ReferenceSdkRustTypes
DecisionResponse
Rust struct goodmem::models::DecisionResponse: declaration, fields or variants, and implementations.
Struct DecisionResponse
goodmem::models::DecisionResponse
Structured provider answers with reported usage.
pub struct DecisionResponse {
pub model: String,
pub answers: BTreeMap<String, DecisionAnswer>,
pub usage: Box<DecisionUsage>,
}Referenced types: DecisionAnswer, DecisionUsage.
Fields
model
pub model: String
Provider-reported model identifier.
Wire name: model.
answers
pub answers: BTreeMap<String, DecisionAnswer>
Answers keyed by the original question identifiers.
Wire name: answers.
usage
pub usage: Box<DecisionUsage>
Token counts reported by the provider. An omitted count is unknown; a count of 0 means the provider reported zero.
Wire name: usage.
Implementations
validate
pub fn validate(&self) -> crate::Result<()>
Validate the request before sending, without making an HTTP call.
Trait implementations
Clone(derived)Default(derived)PartialEq(derived)Serialize(derived)impl<'de> Deserialize<'de> for DecisionResponseimpl std::fmt::Debug for DecisionResponse