Skip to main content

classify_intent_with_llm

Function classify_intent_with_llm 

Source
pub fn classify_intent_with_llm<P: LlmProviderTrait + ?Sized>(
    provider: &P,
    prompt: &str,
) -> Result<SearchIntent>
Expand description

Classifies search intent using an LLM provider.

§Arguments

  • provider - The LLM provider to use for classification.
  • prompt - The user prompt to classify.

§Returns

A SearchIntent with LLM classification results.

§Errors

Returns an error if the LLM call fails or response parsing fails.