Function SetOptionsPrompt

  • Prompts the user to set options for different text processing engines.

    This function dynamically generates prompts based on the selected engine. It supports 'translate', 'split', 'findMatch', and 'replace' engines, each with its own set of required options.

    Parameters

    • engine: AioTextProcessorMethods

      The name of the text processing engine. It can be 'translate', 'split', 'findMatch', or 'replace'.

    Returns Promise<any>

    A Promise that resolves to the options object or string based on the selected engine.

    // For 'translate' engine
    const translateOptions = await SetOptionsPrompt('translate'); // Prompts for language selection
    // For 'split' engine
    const splitOptions = await SetOptionsPrompt('split'); // Prompts for chunk size