Extract key information from texts and documents programmatically. Generate concise, informative summaries that capture the meaning of text using large language models (LLM) in C++. The applications of software text summarization are vast and varied. Text summarization can be used to provide up-to-date information on current events. By integrating text summarization function into your software, you will not only increase productivity, but also improve decision making by accessing important data as quickly as possible.
The interaction between Aspose.Words and Large Language Models is built on a REST architecture. This approach provides reliable and secure communication between your C++ application and various AI services. To set up authentication, you will need to specify your private API key and the `endpoint` of the AI service that provides the models you need (GoogleAiModel, OpenAiModel). For a full list of supported LLM types, see the API Reference.
Experience the future of intelligent text processing in C++ today!
dotnet add package Aspose.Words.Cpp
Copy
auto doc = System::MakeObject<Aspose::Words::Document>(u"Document.docx");
auto apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
// Use OpenAI or Google generative language models.
const auto modelType = Aspose::Words::AI::AiModelType::Gpt4OMini;
auto model = System::ExplicitCast<Aspose::Words::AI::IAiModelText>(Aspose::Words::AI::AiModel::Create(modelType)->WithApiKey(apiKey));
auto summarizeOptions = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
summarizeOptions->set_SummaryLength(Aspose::Words::AI::SummaryLength::Short);
auto summary = model->Summarize(doc, summarizeOptions);
summary->Save(u"Output.pdf");
There are three options to install Aspose.Words for C++ to your developer environment. Please choose one that resembles your needs and follow the step-by-step instructions:
You can use this C++ library to develop software on Microsoft Windows, Linux and macOS operating systems:
If you develop software for Linux or macOS, please check information on additional library dependencies (fontconfig and mesa-glu open-source packages) in Product Documentation.