Represents the result of matching a user's intent to a tool. Contains the analysis results, matched tool, and parameter information.

interface IntentMatcherResponse<TParams> {
    analysis: any;
    matchedTool: null | AwTool<Record<string, any>, {
        type: string;
    }>;
    params: {
        foundParams: Partial<TParams>;
        missingParams: (keyof TParams)[];
        validationErrors?: {
            error: string;
            param: string;
        }[];
    };
}

Type Parameters

  • TParams extends Record<string, any>

    The type of parameters expected by the tool.

Properties

analysis: any

The raw analysis results from processing the user's intent.

matchedTool: null | AwTool<Record<string, any>, {
    type: string;
}>

The tool that was matched based on the intent, or null if no match was found.

params: {
    foundParams: Partial<TParams>;
    missingParams: (keyof TParams)[];
    validationErrors?: {
        error: string;
        param: string;
    }[];
}

Information about the parameters extracted from the intent.

Type declaration

  • foundParams: Partial<TParams>

    Parameters that were successfully extracted from the intent.

  • missingParams: (keyof TParams)[]

    Required parameters that were not found in the intent.

  • Optional validationErrors?: {
        error: string;
        param: string;
    }[]

    Any validation errors encountered while processing the parameters.