חלץ מידע מפתח מטקסטים ומסמכים באופן תכנותי. צור סיכומים תמציתיים ואינפורמטיביים הלוכדים את משמעות הטקסט באמצעות דגמי שפה גדולים (LLM) ב JavaScript. היישומים של סיכום טקסט תוכנה הם עצומים ומגוונים. ניתן להשתמש בסיכום טקסט כדי לספק מידע עדכני על אירועים עכשוויים. על ידי שילוב פונקציית סיכום טקסט בתוכנה שלך, לא רק תגדיל את הפרודוקטיביות, אלא גם תשפר את קבלת ההחלטות על ידי גישה לנתונים חשובים במהירות האפשרית.
האינטראקציה בין Aspose.Words ומודלים של שפות גדולות בנויה על ארכיטקטורה REST. גישה זו מספקת תקשורת אמינה ומאובטחת בין יישום Node.js via .NET שלך לבין שירותים שונים AI. כדי להגדיר אימות, יהיה עליך לציין את המפתח הפרטי API ואת endpoint של השירות AI המספק את הדגמים הדרושים לך(OpenAiModel, GoogleAiModel, AnthropicAiModel). עבור רשימה מלאה של סוגי LLM נתמכים, ראה את API Reference.
לחוות את העתיד של עיבוד טקסט אינטליגנטי JavaScript היום!
npm install @aspose/words
עותק
const aw = require('@aspose/words');
const doc = new aw.Document("Document.docx");
const apiKey = process.env.API_KEY;
// השתמש במודלי שפה גנרטיביים של OpenAI או Google.
const model = aw.AI.AiModel.createGpt4OMini();
model.setApiKey(apiKey);
const options = new aw.AI.SummarizeOptions();
options.summaryLength = aw.AI.SummaryLength.Short;
const summary = model.summarize(doc, options);
summary.save("Output.docx");
const aw = require('@aspose/words');
const doc = new aw.Document("Document.docx");
// Pass an empty string if the self-hosted model does not require an API key.
const model = new CustomAiModel("my-model-24b", "https://your-server.com/v1");
model.setApiKey("");
const options = new aw.AI.SummarizeOptions();
options.summaryLength = aw.AI.SummaryLength.Short;
const summary = model.summarize(doc, options);
summary.save("Output.docx");
class CustomAiModel extends aw.AI.OpenAiModel {
constructor(name, url) {
super(name);
this._url = url;
}
get url() {
return this._url;
}
}
We host our Node.js via .Net packages in NPM repositories. Please follow the step-by-step instructions on how to install "Aspose.Words for Node.js via .NET" to your developer environment.
This package is compatible with Node.js 14.17.0 or higher.