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§
Sourcefn extract_batch(&self, queries: &[String]) -> Vec<Result<Goal, ExtractError>>
fn extract_batch(&self, queries: &[String]) -> Vec<Result<Goal, ExtractError>>
バッチ抽出(複数クエリを並列処理)
Sourcefn model_name(&self) -> &str
fn model_name(&self) -> &str
使用モデル名
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".