Skip to main content

IntentExtractor

Trait IntentExtractor 

Source
pub trait IntentExtractor: Send + Sync {
    // Required methods
    fn extract(&self, query: &str) -> Result<Goal, ExtractError>;
    fn extract_batch(
        &self,
        queries: &[String],
    ) -> Vec<Result<Goal, ExtractError>>;
    fn model_name(&self) -> &str;
}
Expand description

IntentExtractor: NLクエリ → Goal

責務:ゴール設定のみ。検索・変換は一切行わない。

Required Methods§

Source

fn extract(&self, query: &str) -> Result<Goal, ExtractError>

クエリからGoalを抽出

Source

fn extract_batch(&self, queries: &[String]) -> Vec<Result<Goal, ExtractError>>

バッチ抽出(複数クエリを並列処理)

Source

fn model_name(&self) -> &str

使用モデル名

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§