Skip to content

nsuite v2.2.1


nsuite / GenerateSummaryOptions

Interface: GenerateSummaryOptions

Defined in: UtilsText.ts:32

Generates a summary of the provided content using OpenAI's chat completions API.

Param

options

The options for generating the summary.

Param

options.apiKey

The API key for OpenAI.

Param

options.baseUrl

The base URL for the OpenAI API.

Param

options.model

The model to use for generating the summary.

Param

options.language

The language in which the summary should be written.

Param

options.maxWords

The maximum number of words the summary should contain.

Param

options.content

The content to be summarized.

Throws

  • Throws an error if there is a problem generating the summary.

Example

ts
import { generateSummary } from "nsuite";
const summary = generateSummary({
  apiKey: "",
  baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
  model: "qwen-turbo",
  language: "English",
  maxWords: 200,
  content: "",
});

Properties

apiKey

apiKey: string

Defined in: UtilsText.ts:33


baseUrl

baseUrl: string

Defined in: UtilsText.ts:34


content

content: string

Defined in: UtilsText.ts:38


language

language: string

Defined in: UtilsText.ts:36


maxWords

maxWords: number

Defined in: UtilsText.ts:37


model

model: string

Defined in: UtilsText.ts:35

Released under the Apache-2.0 License.