สารสกัดจากข้อมูลที่สำคัญจากข้อความและเอกสารทางโปรแกรม สร้างบทสรุปที่กระชับและให้ข้อมูลที่จับความหมายของข้อความโดยใช้แบบจำลองภาษาขนาดใหญ่(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.