استخراج المعلومات الأساسية من النصوص والوثائق برمجيا. قم بإنشاء ملخصات موجزة وغنية بالمعلومات تلتقط معنى النص باستخدام نماذج لغة كبيرة (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.