Skip to content

Commit 724454a

Browse files
authored
Merge pull request #157 from aspose-words/main
Added Api Refs for Aspose.Words for Python via .Net 25.8.0
2 parents 0972564 + bee9db4 commit 724454a

File tree

465 files changed

+4328
-9959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

465 files changed

+4328
-9959
lines changed

english/cpp/aspose.words.ai/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The **Aspose.Words.AI** namespace enables seamless integration with large langua
1414

1515
| Class | Description |
1616
| --- | --- |
17-
| [AiModel](./aimodel/) | Represents information about a Generative Language Model. |
17+
| [AiModel](./aimodel/) | An abstract class representing the integration with various [AI](./) models within the [Aspose.Words](../aspose.words/). |
1818
| [AnthropicAiModel](./anthropicaimodel/) | An abstract class representing the integration with Anthropic’s [AI](./) models within the [Aspose.Words](../aspose.words/). |
1919
| [CheckGrammarOptions](./checkgrammaroptions/) | Allows to specify various options while checking grammar of a document using [AI](./). |
2020
| [GoogleAiModel](./googleaimodel/) | An abstract class representing the integration with Google’s [AI](./) models within the [Aspose.Words](../aspose.words/). |

english/cpp/aspose.words.ai/aimodel/_index.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: Aspose::Words::AI::AiModel class
33
linktitle: AiModel
44
second_title: Aspose.Words for C++ API Reference
5-
description: 'Aspose::Words::AI::AiModel class. Represents information about a Generative Language Model in C++.'
5+
description: 'Aspose::Words::AI::AiModel class. An abstract class representing the integration with various AI models within the Aspose.Words in C++.'
66
type: docs
77
weight: 1000
88
url: /cpp/aspose.words.ai/aimodel/
99
---
1010
## AiModel class
1111

1212

13-
Represents information about a Generative Language Model.
13+
An abstract class representing the integration with various [AI](../) models within the [Aspose.Words](../../aspose.words/).
1414

1515
```cpp
1616
class AiModel : public virtual System::Object
@@ -20,9 +20,13 @@ class AiModel : public virtual System::Object
2020
2121
| Method | Description |
2222
| --- | --- |
23+
| virtual [CheckGrammar](./checkgrammar/)(System::SharedPtr\<Aspose::Words::Document\>, System::SharedPtr\<Aspose::Words::AI::CheckGrammarOptions\>) | Checks grammar of the provided document. This operation leverages the connected [AI](../) model for checking grammar of document. |
2324
| static [Create](./create/)(Aspose::Words::AI::AiModelType) | Creates a new instance of [AiModel](./) class. |
2425
| [GetType](./gettype/)() const override | |
2526
| [Is](./is/)(const System::TypeInfo\&) const override | |
27+
| virtual [Summarize](./summarize/)(System::SharedPtr\<Aspose::Words::Document\>, System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\>) | Generates a summary of the specified document, with options to adjust the length of the summary. This operation leverages the connected [AI](../) model for content processing. |
28+
| virtual [Summarize](./summarize/)(System::ArrayPtr\<System::SharedPtr\<Aspose::Words::Document\>\>, System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\>) | Generates summaries for an array of documents, with options to control the summary length and other settings. This method utilizes the connected [AI](../) model for processing each document in the array. |
29+
| virtual [Translate](./translate/)(System::SharedPtr\<Aspose::Words::Document\>, Aspose::Words::AI::Language) | Translates the provided document into the specified target language. This operation leverages the connected [AI](../) model for content translating. |
2630
| static [Type](./type/)() | |
2731
| [WithApiKey](./withapikey/)(const System::String\&) | Sets a specified API key to the model. |
2832
@@ -37,7 +41,7 @@ auto secondDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Doc
3741
3842
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
3943
// Use OpenAI or Google generative language models.
40-
System::SharedPtr<Aspose::Words::AI::IAiModelText> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
44+
System::SharedPtr<Aspose::Words::AI::AiModel> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
4145
4246
auto options = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
4347

english/cpp/aspose.words.ai/iaimodeltext/checkgrammar/_index.md renamed to english/cpp/aspose.words.ai/aimodel/checkgrammar/_index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: Aspose::Words::AI::IAiModelText::CheckGrammar method
2+
title: Aspose::Words::AI::AiModel::CheckGrammar method
33
linktitle: CheckGrammar
44
second_title: Aspose.Words for C++ API Reference
5-
description: 'Aspose::Words::AI::IAiModelText::CheckGrammar method. Checks grammar of the provided document. This operation leverages the connected AI model for checking grammar of document in C++.'
5+
description: 'Aspose::Words::AI::AiModel::CheckGrammar method. Checks grammar of the provided document. This operation leverages the connected AI model for checking grammar of document in C++.'
66
type: docs
7-
weight: 1500
8-
url: /cpp/aspose.words.ai/iaimodeltext/checkgrammar/
7+
weight: 2500
8+
url: /cpp/aspose.words.ai/aimodel/checkgrammar/
99
---
10-
## IAiModelText::CheckGrammar method
10+
## AiModel::CheckGrammar method
1111

1212

1313
Checks grammar of the provided document. This operation leverages the connected [AI](../../) model for checking grammar of document.
1414

1515
```cpp
16-
virtual System::SharedPtr<Aspose::Words::Document> Aspose::Words::AI::IAiModelText::CheckGrammar(System::SharedPtr<Aspose::Words::Document> sourceDocument, System::SharedPtr<Aspose::Words::AI::CheckGrammarOptions> options)=0
16+
virtual System::SharedPtr<Aspose::Words::Document> Aspose::Words::AI::AiModel::CheckGrammar(System::SharedPtr<Aspose::Words::Document> sourceDocument, System::SharedPtr<Aspose::Words::AI::CheckGrammarOptions> options=nullptr)
1717
```
1818
1919
@@ -36,7 +36,7 @@ auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Big docum
3636
3737
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
3838
// Use OpenAI generative language models.
39-
System::SharedPtr<Aspose::Words::AI::IAiModelText> model = System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey));
39+
System::SharedPtr<Aspose::Words::AI::AiModel> model = Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey);
4040
4141
auto grammarOptions = System::MakeObject<Aspose::Words::AI::CheckGrammarOptions>();
4242
grammarOptions->set_ImproveStylistics(true);
@@ -49,6 +49,6 @@ proofedDoc->Save(get_ArtifactsDir() + u"AI.AiGrammar.docx");
4949

5050
* Class [Document](../../../aspose.words/document/)
5151
* Class [CheckGrammarOptions](../../checkgrammaroptions/)
52-
* Interface [IAiModelText](../)
52+
* Class [AiModel](../)
5353
* Namespace [Aspose::Words::AI](../../)
5454
* Library [Aspose.Words for C++](../../../)

english/cpp/aspose.words.ai/aimodel/create/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ auto secondDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Doc
2828
2929
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
3030
// Use OpenAI or Google generative language models.
31-
System::SharedPtr<Aspose::Words::AI::IAiModelText> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
31+
System::SharedPtr<Aspose::Words::AI::AiModel> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
3232
3333
auto options = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
3434
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Aspose::Words::AI::AiModel::Summarize method
3+
linktitle: Summarize
4+
second_title: Aspose.Words for C++ API Reference
5+
description: 'Aspose::Words::AI::AiModel::Summarize method. Generates summaries for an array of documents, with options to control the summary length and other settings. This method utilizes the connected AI model for processing each document in the array in C++.'
6+
type: docs
7+
weight: 4334
8+
url: /cpp/aspose.words.ai/aimodel/summarize/
9+
---
10+
## AiModel::Summarize(System::ArrayPtr\<System::SharedPtr\<Aspose::Words::Document\>\>, System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\>) method
11+
12+
13+
Generates summaries for an array of documents, with options to control the summary length and other settings. This method utilizes the connected [AI](../../) model for processing each document in the array.
14+
15+
```cpp
16+
virtual System::SharedPtr<Aspose::Words::Document> Aspose::Words::AI::AiModel::Summarize(System::ArrayPtr<System::SharedPtr<Aspose::Words::Document>> sourceDocuments, System::SharedPtr<Aspose::Words::AI::SummarizeOptions> options=nullptr)=0
17+
```
18+
19+
20+
| Parameter | Type | Description |
21+
| --- | --- | --- |
22+
| sourceDocuments | System::ArrayPtr\<System::SharedPtr\<Aspose::Words::Document\>\> | An array of documents to be summarized. |
23+
| options | System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\> | Optional settings to control the summary length and other parameters |
24+
25+
### ReturnValue
26+
27+
A summarized version of the document's content.
28+
29+
## Examples
30+
31+
32+
33+
Shows how to summarize text using OpenAI and [Google](../../../aspose.words.ai.google/) models.
34+
```cpp
35+
auto firstDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Big document.docx");
36+
auto secondDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Document.docx");
37+
38+
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
39+
// Use OpenAI or Google generative language models.
40+
System::SharedPtr<Aspose::Words::AI::AiModel> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
41+
42+
auto options = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
43+
44+
options->set_SummaryLength(Aspose::Words::AI::SummaryLength::Short);
45+
System::SharedPtr<Aspose::Words::Document> oneDocumentSummary = model->Summarize(firstDoc, options);
46+
oneDocumentSummary->Save(get_ArtifactsDir() + u"AI.AiSummarize.One.docx");
47+
48+
options->set_SummaryLength(Aspose::Words::AI::SummaryLength::Long);
49+
System::SharedPtr<Aspose::Words::Document> multiDocumentSummary = model->Summarize(System::MakeArray<System::SharedPtr<Aspose::Words::Document>>({firstDoc, secondDoc}), options);
50+
multiDocumentSummary->Save(get_ArtifactsDir() + u"AI.AiSummarize.Multi.docx");
51+
```
52+
53+
## See Also
54+
55+
* Class [Document](../../../aspose.words/document/)
56+
* Class [SummarizeOptions](../../summarizeoptions/)
57+
* Class [AiModel](../)
58+
* Namespace [Aspose::Words::AI](../../)
59+
* Library [Aspose.Words for C++](../../../)
60+
## AiModel::Summarize(System::SharedPtr\<Aspose::Words::Document\>, System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\>) method
61+
62+
63+
Generates a summary of the specified document, with options to adjust the length of the summary. This operation leverages the connected [AI](../../) model for content processing.
64+
65+
```cpp
66+
virtual System::SharedPtr<Aspose::Words::Document> Aspose::Words::AI::AiModel::Summarize(System::SharedPtr<Aspose::Words::Document> sourceDocument, System::SharedPtr<Aspose::Words::AI::SummarizeOptions> options=nullptr)=0
67+
```
68+
69+
70+
| Parameter | Type | Description |
71+
| --- | --- | --- |
72+
| sourceDocument | System::SharedPtr\<Aspose::Words::Document\> | The document to be summarized. |
73+
| options | System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\> | Optional settings to control the summary length and other parameters. |
74+
75+
### ReturnValue
76+
77+
A summarized version of the document's content.
78+
79+
## Examples
80+
81+
82+
83+
Shows how to summarize text using OpenAI and [Google](../../../aspose.words.ai.google/) models.
84+
```cpp
85+
auto firstDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Big document.docx");
86+
auto secondDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Document.docx");
87+
88+
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
89+
// Use OpenAI or Google generative language models.
90+
System::SharedPtr<Aspose::Words::AI::AiModel> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
91+
92+
auto options = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
93+
94+
options->set_SummaryLength(Aspose::Words::AI::SummaryLength::Short);
95+
System::SharedPtr<Aspose::Words::Document> oneDocumentSummary = model->Summarize(firstDoc, options);
96+
oneDocumentSummary->Save(get_ArtifactsDir() + u"AI.AiSummarize.One.docx");
97+
98+
options->set_SummaryLength(Aspose::Words::AI::SummaryLength::Long);
99+
System::SharedPtr<Aspose::Words::Document> multiDocumentSummary = model->Summarize(System::MakeArray<System::SharedPtr<Aspose::Words::Document>>({firstDoc, secondDoc}), options);
100+
multiDocumentSummary->Save(get_ArtifactsDir() + u"AI.AiSummarize.Multi.docx");
101+
```
102+
103+
## See Also
104+
105+
* Class [Document](../../../aspose.words/document/)
106+
* Class [SummarizeOptions](../../summarizeoptions/)
107+
* Class [AiModel](../)
108+
* Namespace [Aspose::Words::AI](../../)
109+
* Library [Aspose.Words for C++](../../../)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Aspose::Words::AI::AiModel::Translate method
3+
linktitle: Translate
4+
second_title: Aspose.Words for C++ API Reference
5+
description: 'Aspose::Words::AI::AiModel::Translate method. Translates the provided document into the specified target language. This operation leverages the connected AI model for content translating in C++.'
6+
type: docs
7+
weight: 4667
8+
url: /cpp/aspose.words.ai/aimodel/translate/
9+
---
10+
## AiModel::Translate method
11+
12+
13+
Translates the provided document into the specified target language. This operation leverages the connected [AI](../../) model for content translating.
14+
15+
```cpp
16+
virtual System::SharedPtr<Aspose::Words::Document> Aspose::Words::AI::AiModel::Translate(System::SharedPtr<Aspose::Words::Document> sourceDocument, Aspose::Words::AI::Language targetLanguage)=0
17+
```
18+
19+
20+
| Parameter | Type | Description |
21+
| --- | --- | --- |
22+
| sourceDocument | System::SharedPtr\<Aspose::Words::Document\> | The document to be translated. |
23+
| targetLanguage | Aspose::Words::AI::Language | The language into which the document will be translated. |
24+
25+
### ReturnValue
26+
27+
A new [Document](../../../aspose.words/document/) object containing the translated document.
28+
29+
## Examples
30+
31+
32+
33+
Shows how to translate text using [Google](../../../aspose.words.ai.google/) models.
34+
```cpp
35+
auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Document.docx");
36+
37+
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
38+
// Use Google generative language models.
39+
System::SharedPtr<Aspose::Words::AI::AiModel> model = Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gemini15Flash)->WithApiKey(apiKey);
40+
41+
System::SharedPtr<Aspose::Words::Document> translatedDoc = model->Translate(doc, Aspose::Words::AI::Language::Arabic);
42+
translatedDoc->Save(get_ArtifactsDir() + u"AI.AiTranslate.docx");
43+
```
44+
45+
## See Also
46+
47+
* Class [Document](../../../aspose.words/document/)
48+
* Enum [Language](../../language/)
49+
* Class [AiModel](../)
50+
* Namespace [Aspose::Words::AI](../../)
51+
* Library [Aspose.Words for C++](../../../)

english/cpp/aspose.words.ai/aimodel/withapikey/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ auto secondDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Doc
2828
2929
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
3030
// Use OpenAI or Google generative language models.
31-
System::SharedPtr<Aspose::Words::AI::IAiModelText> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
31+
System::SharedPtr<Aspose::Words::AI::AiModel> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
3232
3333
auto options = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
3434

english/cpp/aspose.words.ai/aimodeltype/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ auto secondDoc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Doc
4545
4646
System::String apiKey = System::Environment::GetEnvironmentVariable(u"API_KEY");
4747
// Use OpenAI or Google generative language models.
48-
System::SharedPtr<Aspose::Words::AI::IAiModelText> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
48+
System::SharedPtr<Aspose::Words::AI::AiModel> model = (System::ExplicitCast<Aspose::Words::AI::OpenAiModel>(Aspose::Words::AI::AiModel::Create(Aspose::Words::AI::AiModelType::Gpt4OMini)->WithApiKey(apiKey)))->WithOrganization(u"Organization")->WithProject(u"Project");
4949
5050
auto options = System::MakeObject<Aspose::Words::AI::SummarizeOptions>();
5151

english/cpp/aspose.words.ai/anthropicaimodel/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ class AnthropicAiModel : public Aspose::Words::AI::AiModel,
2121
2222
| Method | Description |
2323
| --- | --- |
24+
| virtual [CheckGrammar](../aimodel/checkgrammar/)(System::SharedPtr\<Aspose::Words::Document\>, System::SharedPtr\<Aspose::Words::AI::CheckGrammarOptions\>) | Checks grammar of the provided document. This operation leverages the connected [AI](../) model for checking grammar of document. |
2425
| static [Create](../aimodel/create/)(Aspose::Words::AI::AiModelType) | Creates a new instance of [AiModel](../aimodel/) class. |
2526
| [GetType](./gettype/)() const override | |
2627
| [Is](./is/)(const System::TypeInfo\&) const override | |
28+
| [Summarize](./summarize/)(System::SharedPtr\<Aspose::Words::Document\>, System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\>) override | Generates a summary of the specified document, with options to adjust the length of the summary. This operation leverages the connected [AI](../) model for content processing. |
29+
| [Summarize](./summarize/)(System::ArrayPtr\<System::SharedPtr\<Aspose::Words::Document\>\>, System::SharedPtr\<Aspose::Words::AI::SummarizeOptions\>) override | Generates summaries for an array of documents, with options to control the summary length and other settings. This method utilizes the connected [AI](../) model for processing each document in the array. |
30+
| [Translate](./translate/)(System::SharedPtr\<Aspose::Words::Document\>, Aspose::Words::AI::Language) override | Translates the provided document into the specified target language. This operation leverages the connected [AI](../) model for content translating. |
2731
| static [Type](./type/)() | |
2832
| [WithApiKey](../aimodel/withapikey/)(const System::String\&) | Sets a specified API key to the model. |
2933
## See Also

0 commit comments

Comments
 (0)