IntentRecognizer classifies caller utterances into your predefined intents and returns matching actions for the dialog engine to handle.
IntentRecognizer
- Python
- TypeScript
IntentRecognizer classifies a free-text caller utterance against your predefined intent labels and returns all plausible matches as SuggestedAction objects. Use it inside on_action_request() to map caller language to routing decisions — return the full list and let the dialog engine handle disambiguation automatically.signature
classify(intent: str) -> list[SuggestedAction] | None — Returns all choices from intent_choices that plausibly match intent, ordered by likelihood. Returns None if no choice matches. It is recommended to return the full list from on_action_request to let the dialog engine handle disambiguation automatically.support_agent.py
IntentRecognizer (openai — deprecated)
- Python
- TypeScript
IntentRecognizer classifies a free-text caller utterance into one of your predefined intent labels. Use it inside on_action_request() to map vague caller language to clean routing decisions.signature
classify(intent: str) -> str | None — Returns the single choice string from intent_choices that best matches intent, or None if the model cannot match any choice. When intent_choices is a dict, the keys are the valid return values; values are used only as descriptions to guide the model.support_agent.py
IntentClarifier (deprecated)
- Python
- TypeScript
IntentClarifier analyzes a caller’s intent and returns the subset of choices that could plausibly match, ordered by likelihood. Use this when an intent may be ambiguous and you need to surface options for the caller to confirm.signature
propose_choices(intent: str) -> list[str] — Returns a list of choices that could match intent, ordered by likelihood:- One element if the intent clearly maps to a single choice.
- Multiple elements if the intent is ambiguous.
- Empty list if the intent matches none of the provided choices.
intent_choices is a dict, only the keys appear in the returned list.scheduler_agent.py