Besprijekorna integracija s glavnim jezičnim modelima, poput OpenAI, Claude i Gemini, pruža opsežne mogućnosti obrade dokumenata temeljene na AI za Node.js aplikacije.
Izdvojite ključne informacije iz tekstova i dokumenata programski. Generirajte sažete, informativne sažetke koji hvataju značenje teksta pomoću velikih jezičnih modela (LLM) u JavaScript. Primjene softverskog sažimanja teksta su ogromne i raznolike. Sažetak teksta može se koristiti za pružanje ažuriranih informacija o aktualnim događajima. Integriranjem funkcije sažimanja teksta u vaš softver, ne samo da ćete povećati produktivnost, već i poboljšati donošenje odluka pristupanjem važnim podacima što je brže moguće.
Interakcija između Aspose.Words i velikih jezičnih modela izgrađena je na REST arhitekturi. Ovaj pristup pruža pouzdanu i sigurnu komunikaciju između vaše Node.js via .NET aplikacije i raznih AI usluga. Za postavljanje provjere autentičnosti morat ćete navesti svoj privatni API ključ i endpoint usluge AI koja pruža modele koji su vam potrebni (OpenAiModel, GoogleAiModel, AnthropicAiModel). Za potpuni popis podržanih vrsta LLM pogledajte API Reference.
Doživite budućnost inteligentne obrade teksta u JavaScript već danas!
npm install @aspose/words
Kopirati
const aw = require('@aspose/words');
const doc = new aw.Document("Document.docx");
const apiKey = process.env.API_KEY;
// Koristite OpenAI ili Google generativne jezične modele.
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.