pub struct IntentFeatures {
pub has_question_mark: bool,
pub starts_with_imperative: bool,
pub contains_code_keywords: bool,
pub contains_creative_keywords: bool,
pub sentence_count: usize,
pub avg_word_length: f64,
}Expand description
Lightweight surface-level features extracted from a prompt.
Fields§
§has_question_mark: boolWhether the text contains at least one ? character.
starts_with_imperative: boolWhether the first meaningful word is an imperative verb.
contains_code_keywords: boolWhether any recognised code-domain keyword appears in the text.
contains_creative_keywords: boolWhether any recognised creative-domain keyword appears in the text.
sentence_count: usizeApproximate number of sentences (split on ., !, ?).
avg_word_length: f64Average word length in characters.
Trait Implementations§
Source§impl Clone for IntentFeatures
impl Clone for IntentFeatures
Source§fn clone(&self) -> IntentFeatures
fn clone(&self) -> IntentFeatures
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 moreAuto Trait Implementations§
impl Freeze for IntentFeatures
impl RefUnwindSafe for IntentFeatures
impl Send for IntentFeatures
impl Sync for IntentFeatures
impl Unpin for IntentFeatures
impl UnsafeUnpin for IntentFeatures
impl UnwindSafe for IntentFeatures
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request