You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: english/java/com.aspose.words/_index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The **MailMerge** object which provides access to the reporting functionality is
35
35
|[Adjustment](../com.aspose.words/adjustment/)| Represents adjustment values that are applied to the specified shape. |
36
36
|[AdjustmentCollection](../com.aspose.words/adjustmentcollection/)| Represents a read-only collection of [Adjustment](../com.aspose.words/adjustment/) adjust values that are applied to the specified shape. |
37
37
|[AdvancedCompareOptions](../com.aspose.words/advancedcompareoptions/)| Allows to set advanced compare options. |
38
-
|[AiModel](../com.aspose.words/aimodel/)|Represents information about a Generative Language Model. |
38
+
|[AiModel](../com.aspose.words/aimodel/)|An abstract class representing the integration with various AI models within the Aspose.Words. |
39
39
|[AiModelType](../com.aspose.words/aimodeltype/)| Represents the types of [AiModel](../com.aspose.words/aimodel/) that can be integrated into the document processing workflow. |
40
40
|[AnthropicAiModel](../com.aspose.words/anthropicaimodel/)| An abstract class representing the integration with Anthropic\\u2019s AI models within the Aspose.Words. |
41
41
|[ArrowLength](../com.aspose.words/arrowlength/)| Length of the arrow at the end of a line. |
@@ -714,8 +714,8 @@ The **MailMerge** object which provides access to the reporting functionality is
714
714
|[UnsupportedFileFormatException](../com.aspose.words/unsupportedfileformatexception/)| Thrown during document load, when the document format is not recognized or not supported by Aspose.Words. |
715
715
|[UserInformation](../com.aspose.words/userinformation/)| Specifies information about the user. |
716
716
|[VariableCollection](../com.aspose.words/variablecollection/)| A collection of document variables. |
Copy file name to clipboardExpand all lines: english/java/com.aspose.words/aimodel/_index.md
+144-6Lines changed: 144 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: AiModel
3
3
linktitle: AiModel
4
4
second_title: Aspose.Words for Java
5
-
description: Represents information about a Generative Language Model in Java.
5
+
description: An abstract class representing the integration with various AI models within the Aspose.Words in Java.
6
6
type: docs
7
7
weight: 14
8
8
url: /java/com.aspose.words/aimodel/
@@ -14,7 +14,7 @@ java.lang.Object
14
14
public abstract class AiModel
15
15
```
16
16
17
-
Represents information about a Generative Language Model.
17
+
An abstract class representing the integration with various AI models within the Aspose.Words.
18
18
19
19
**Examples:**
20
20
@@ -27,14 +27,14 @@ Shows how to summarize text using OpenAI and Google models.
27
27
28
28
String apiKey = System.getenv("API_KEY");
29
29
// Use OpenAI or Google generative language models.
30
-
IAiModelText model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
30
+
AiModel model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
31
31
32
32
SummarizeOptions options = new SummarizeOptions();
@@ -49,14 +49,54 @@ Shows how to summarize text using OpenAI and Google models.
49
49
50
50
| Method | Description |
51
51
| --- | --- |
52
+
|[checkGrammar(Document sourceDocument, CheckGrammarOptions options)](#checkGrammar-com.aspose.words.Document-com.aspose.words.CheckGrammarOptions)| Checks grammar of the provided document. |
52
53
|[create(int modelType)](#create-int)||
54
+
|[summarize(Document sourceDocument, SummarizeOptions options)](#summarize-com.aspose.words.Document-com.aspose.words.SummarizeOptions)| Generates a summary of the specified document, with options to adjust the length of the summary. |
55
+
|[summarize(Document[] sourceDocuments, SummarizeOptions options)](#summarize-com.aspose.words.Document---com.aspose.words.SummarizeOptions)| Generates summaries for an array of documents, with options to control the summary length and other settings. |
56
+
|[translate(Document sourceDocument, int targetLanguage)](#translate-com.aspose.words.Document-int)||
53
57
|[withApiKey(String apiKey)](#withApiKey-java.lang.String)| Sets a specified API key to the model. |
public abstract Document summarize(Document sourceDocument, SummarizeOptions options)
118
+
```
119
+
120
+
121
+
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.
122
+
123
+
**Examples:**
124
+
125
+
Shows how to summarize text using OpenAI and Google models.
126
+
127
+
```
128
+
129
+
Document firstDoc = new Document(getMyDir() + "Big document.docx");
130
+
Document secondDoc = new Document(getMyDir() + "Document.docx");
131
+
132
+
String apiKey = System.getenv("API_KEY");
133
+
// Use OpenAI or Google generative language models.
134
+
AiModel model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
135
+
136
+
SummarizeOptions options = new SummarizeOptions();
public abstract Document summarize(Document[] sourceDocuments, SummarizeOptions options)
159
+
```
160
+
161
+
162
+
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.
163
+
164
+
**Examples:**
165
+
166
+
Shows how to summarize text using OpenAI and Google models.
167
+
168
+
```
169
+
170
+
Document firstDoc = new Document(getMyDir() + "Big document.docx");
171
+
Document secondDoc = new Document(getMyDir() + "Document.docx");
172
+
173
+
String apiKey = System.getenv("API_KEY");
174
+
// Use OpenAI or Google generative language models.
175
+
AiModel model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
176
+
177
+
SummarizeOptions options = new SummarizeOptions();
@@ -91,14 +229,14 @@ Shows how to summarize text using OpenAI and Google models.
91
229
92
230
String apiKey = System.getenv("API_KEY");
93
231
// Use OpenAI or Google generative language models.
94
-
IAiModelText model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
232
+
AiModel model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
95
233
96
234
SummarizeOptions options = new SummarizeOptions();
Copy file name to clipboardExpand all lines: english/java/com.aspose.words/aimodeltype/_index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,14 +31,14 @@ Shows how to summarize text using OpenAI and Google models.
31
31
32
32
String apiKey = System.getenv("API_KEY");
33
33
// Use OpenAI or Google generative language models.
34
-
IAiModelText model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
34
+
AiModel model = ((OpenAiModel)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey)).withOrganization("Organization").withProject("Project");
35
35
36
36
SummarizeOptions options = new SummarizeOptions();
0 commit comments