Class SummarizeText

The SummarizeText class provides methods to summarize text using the Deepgram and Edenai APIs.

Constructors

Methods

Constructors

  • Creates a new instance of SummarizeText.

    Parameters

    • components: SummarizeTextComponents

      Configuration options for the SummarizeText instance.

    Returns SummarizeText

Methods

  • Summarizes the provided text using the Deepgram API.

    Parameters

    • text: string

      The text to summarize.

    • languageCode: string

      The ISO language code of the text.

    Returns Promise<string>

    A Promise that resolves with the summarized text.

    Will throw an error if the API request fails.

  • Summarizes the provided text using the Edenai API.

    Parameters

    • components: EdenaiComponents

      An object containing the text to summarize and other parameters.

    Returns Promise<EdenaiResponse>

    A Promise that resolves with the summarized text object.

    Will throw an error if the API request fails.