Skip to content

Intent Analysis

openaivec.task.customer_support.intent_analysis

Customer inquiry intent-analysis task definition.

Classes

IntentAnalysis

Bases: BaseModel

Intent analysis output.

Functions

intent_analysis

intent_analysis(
    business_context: str = "general customer support",
) -> PreparedTask[IntentAnalysis]

Create a customer intent analysis task.

Source code in src/openaivec/task/customer_support/intent_analysis.py
def intent_analysis(business_context: str = "general customer support") -> PreparedTask[IntentAnalysis]:
    """Create a customer intent analysis task."""
    return PreparedTask(
        instructions=_build_instructions(business_context=business_context),
        response_format=IntentAnalysis,
    )