Utilities functions for text
- Description:
Utilities functions for text
- Source:
Methods
(static) generateSummary(options) → {Promise.<string>}
- Description:
Generates a summary of the provided content using OpenAI's chat completions API.
- Source:
Example
import { generateSummary } from "nsuite";
const summary = generateSummary({
apiKey: "",
baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1",
model: "qwen-turbo",
language: "English",
maxWords: 200,
content: "",
});
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | The options for generating the summary. Properties
|
Throws:
-
- Throws an error if there is a problem generating the summary.
- Type
- Error
Returns:
- A promise that resolves to the generated summary.
- Type
- Promise.<string>