OpenAI, Claude और Gemini जैसे प्रमुख भाषा मॉडलों के साथ सहज एकीकरण Node.js अनुप्रयोगों के लिए AI-आधारित दस्तावेज़ प्रोसेसिंग क्षमताएँ प्रदान करता है।
OpenAI, Google, और Claude AI मॉडलों का उपयोग करके Aspose.Words for Node.js via .NET के साथ दस्तावेज़ों में व्याकरण त्रुटियों का पता लगाएँ और उन्हें हाइलाइट करें। CheckGrammar मेथड DOC, DOCX, RTF, PDF, HTML, Markdown, ODT, TXT, और EPUB फ़ाइलों का विश्लेषण करता है और व्याकरण संबंधी समस्याओं को चिह्नित करता है — जिससे आप मैन्युअल प्रूफ़रीडिंग के बिना परिष्कृत, पेशेवर सामग्री प्रदान कर सकते हैं।
प्रमाणीकरण के लिए आपके चुने हुए AI प्रदाता से API कुंजी आवश्यक है। समर्थित मॉडलों की पूरी सूची के लिए, API रेफ़रेंस देखें।
JavaScript में आज ही व्याकरण जाँच शुरू करें — ऊपर दिया गया लाइव डेमो आज़माएँ।
npm install @aspose/words
प्रतिलिपि
const aw = require('@aspose/words');
const doc = new aw.Document("Document.docx");
const apiKey = process.env.API_KEY;
// OpenAI जेनरेटिव भाषा मॉडल का उपयोग करें।
const model = aw.AI.AiModel.createGpt4OMini();
model.setApiKey(apiKey);
const grammarOptions = new aw.AI.CheckGrammarOptions();
grammarOptions.improveStylistics = true;
const proofedDoc = model.checkGrammar(doc, grammarOptions);
proofedDoc.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 grammarOptions = new aw.AI.CheckGrammarOptions();
grammarOptions.improveStylistics = true;
const proofedDoc = model.checkGrammar(doc, grammarOptions);
proofedDoc.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.