Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub enum FinishReason {
Complete,
Length,
ToolUse,
ContentFilter,
Unknown(String),
}
Normalized reason why the model stopped generating.
Maps from provider-specific stop reasons:
"stop", Anthropic "end_turn", Responses "completed""length", Anthropic "max_tokens", Responses incomplete+max_output_tokens"tool_calls", Anthropic "tool_use""content_filter", Responses incomplete+content_filterCompleteComplete
Model naturally completed its response.
LengthLength
Maximum token limit reached.
ToolUseToolUse
Model requested a tool call.
ContentFilterContentFilter
Content was filtered by safety systems.
Unknown(String)Unknown(String)
Unknown or forward-compatible reason.
impl FinishReasonimpl FinishReason
is_completepub fn is_complete(&self) -> bool
Returns true if the model naturally completed its response.
Only the FinishReason::Complete variant returns true.
impl Clone for FinishReasonimpl Clone for FinishReason
clonefn clone(&self) -> FinishReason
clone_fromfn clone_from(&mut self, source: &Self)
impl Debug for FinishReasonimpl Debug for FinishReason
fmtfn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for FinishReasonimpl<'de> Deserialize<'de> for FinishReason
deserializefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl PartialEq for FinishReasonimpl PartialEq for FinishReason
eqfn eq(&self, other: &FinishReason) -> bool
nefn ne(&self, other: &Rhs) -> bool
impl Serialize for FinishReasonimpl Serialize for FinishReason
serializefn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl Eq for FinishReasonimpl Eq for FinishReason
impl StructuralPartialEq for FinishReasonimpl StructuralPartialEq for FinishReason