텍스트와 문서에서 핵심 정보를 프로그래밍 방식으로 추출합니다. JavaScript 에서 대규모 언어 모델(LLM)을 사용하여 텍스트의 의미를 포착하는 간결하고 유익한 요약을 생성합니다. 소프트웨어 텍스트 요약의 응용 프로그램은 광범위하고 다양합니다. 텍스트 요약은 현재 이벤트에 대한 최신 정보를 제공하는 데 사용할 수 있습니다. 텍스트 요약 기능을 소프트웨어에 통합하면 생산성을 높일 뿐만 아니라 가능한 한 빨리 중요한 데이터에 액세스하여 의사 결정을 개선할 수 있습니다.
Aspose.Words와 대규모 언어 모델 간의 상호 작용은 REST 아키텍처에 기반합니다. 이 접근 방식은 Node.js via .NET 애플리케이션과 다양한 AI 서비스 간에 안정적이고 안전한 통신을 제공합니다. 인증을 설정하려면 개인 API 키와 필요한 모델을 제공하는 AI 서비스의 endpoint(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.