Skip to content

Commit 498444e

Browse files
committed
Merge branch 'aw_26_1'
2 parents 4458350 + 07b6221 commit 498444e

265 files changed

Lines changed: 2727 additions & 2355 deletions

File tree

Some content is hidden

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The **Aspose.Words.AI** namespace enables seamless integration with large langua
1717
| [AiModel](./aimodel/) | An abstract class representing the integration with various AI models within the Aspose.Words. |
1818
| [AnthropicAiModel](./anthropicaimodel/) | An abstract class representing the integration with Anthropic’s AI models within the Aspose.Words. |
1919
| [CheckGrammarOptions](./checkgrammaroptions/) | Allows to specify various options while checking grammar of a document using AI. |
20-
| [GoogleAiModel](./googleaimodel/) | An abstract class representing the integration with Google’s AI models within the Aspose.Words. |
20+
| [GoogleAiModel](./googleaimodel/) | Class representing Google AI Models (Gemini) integration within Aspose.Words. |
2121
| [OpenAiModel](./openaimodel/) | An abstract class representing the integration with OpenAI's large language models within the Aspose.Words. |
2222
| [SummarizeOptions](./summarizeoptions/) | Allows to specify various options for summarizing document content. |
2323
## Enumeration

english/net/aspose.words.ai/aimodel/translate/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Document doc = new Document(MyDir + "Document.docx");
3434

3535
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
3636
// Use Google generative language models.
37-
AiModel model = AiModel.Create(AiModelType.Gemini15Flash).WithApiKey(apiKey);
37+
AiModel model = AiModel.Create(AiModelType.GeminiFlashLatest).WithApiKey(apiKey);
3838

3939
Document translatedDoc = model.Translate(doc, Language.Arabic);
4040
translatedDoc.Save(ArtifactsDir + "AI.AiTranslate.docx");

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ public enum AiModelType
2424
| Gpt4OMini | `1` | GPT-4o mini generative model type. |
2525
| Gpt4Turbo | `2` | GPT-4 Turbo generative model type. |
2626
| Gpt35Turbo | `3` | GPT-3.5 Turbo generative model type. |
27-
| Gemini15Flash | `4` | Gemini 1.5 Flash generative model type. |
28-
| Gemini15Flash8B | `5` | Gemini 1.5 Flash-8B generative model type. |
29-
| Gemini15Pro | `6` | Gemini 1.5 Pro generative model type. |
27+
| GeminiFlashLatest | `4` | Gemini Flash latest release generative model type. |
28+
| GeminiProLatest | `6` | Gemini Pro latest release generative model type. |
3029
| Claude35Sonnet | `7` | Claude 3.5 Sonnet generative model type. |
3130
| Claude35Haiku | `8` | Claude 3.5 Haiku generative model type. |
3231
| Claude3Opus | `9` | Claude 3 Opus generative model type. |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ url: /net/aspose.words.ai/anthropicaimodel/
1313
An abstract class representing the integration with Anthropic’s AI models within the Aspose.Words.
1414

1515
```csharp
16-
public abstract class AnthropicAiModel : AiModel, IAiModelText
16+
public abstract class AnthropicAiModel : AiModel
1717
```
1818

1919
## Properties

english/net/aspose.words.ai/checkgrammaroptions/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class CheckGrammarOptions
2828
| --- | --- |
2929
| [ImproveStylistics](../../aspose.words.ai/checkgrammaroptions/improvestylistics/) { get; set; } | Allows to specify either AI will try to improve stylistics of the text being proofed. Default value is `false`. |
3030
| [MakeRevisions](../../aspose.words.ai/checkgrammaroptions/makerevisions/) { getset; } | Allows to specify either final or revised document to be returned with proofed text. Default value is `false`. |
31-
| [PreserveFormatting](../../aspose.words.ai/checkgrammaroptions/preserveformatting/) { getset; } | Allows to specify either CheckGrammarOptions) will try to preserve layout and formatting of the original document, or not. Default value is `true`. |
31+
| [PreserveFormatting](../../aspose.words.ai/checkgrammaroptions/preserveformatting/) { getset; } | Allows to specify either [`CheckGrammar`](../aimodel/checkgrammar/) will try to preserve layout and formatting of the original document, or not. Default value is `true`. |
3232

3333
## Examples
3434

english/net/aspose.words.ai/checkgrammaroptions/preserveformatting/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ url: /net/aspose.words.ai/checkgrammaroptions/preserveformatting/
1010
---
1111
## CheckGrammarOptions.PreserveFormatting property
1212

13-
Allows to specify either CheckGrammarOptions) will try to preserve layout and formatting of the original document, or not. Default value is `true`.
13+
Allows to specify either [`CheckGrammar`](../../aimodel/checkgrammar/) will try to preserve layout and formatting of the original document, or not. Default value is `true`.
1414

1515
```csharp
1616
public bool PreserveFormatting { get; set; }

english/net/aspose.words.ai/googleaimodel/_index.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ url: /net/aspose.words.ai/googleaimodel/
1010
---
1111
## GoogleAiModel class
1212

13-
An abstract class representing the integration with Google’s AI models within the Aspose.Words.
13+
Class representing Google AI Models (Gemini) integration within Aspose.Words.
1414

1515
```csharp
16-
public abstract class GoogleAiModel : AiModel, IAiModelText
16+
public class GoogleAiModel : AiModel
1717
```
1818

19+
## Constructors
20+
21+
| Name | Description |
22+
| --- | --- |
23+
| [GoogleAiModel](googleaimodel/#constructor)(*string*) | Initializes a new instance of `GoogleAiModel` class. |
24+
| [GoogleAiModel](googleaimodel/#constructor_1)(*stringstring*) | Initializes a new instance of `GoogleAiModel` class. |
25+
1926
## Properties
2027

2128
| Name | Description |
@@ -33,8 +40,23 @@ public abstract class GoogleAiModel : AiModel, IAiModelText
3340
| override [Translate](../../aspose.words.ai/googleaimodel/translate/)(*[Document](../../aspose.words/document/), [Language](../language/)*) | Translates a specified document. |
3441
| [WithApiKey](../../aspose.words.ai/aimodel/withapikey/)(*string*) | Sets a specified API key to the model. |
3542

43+
## Remarks
44+
45+
Please refer to https://ai.google.dev/gemini-api/docs/models for Gemini models details.
46+
3647
## Examples
3748

49+
Shows how to use google AI model.
50+
51+
```csharp
52+
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
53+
GoogleAiModel model = new GoogleAiModel("gemini-flash-latest", apiKey);
54+
55+
Document doc = new Document(MyDir + "Big document.docx");
56+
SummarizeOptions summarizeOptions = new SummarizeOptions() { SummaryLength = SummaryLength.VeryShort };
57+
Document summary = model.Summarize(doc, summarizeOptions);
58+
```
59+
3860
Shows how to summarize text using OpenAI and Google models.
3961

4062
```csharp
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: GoogleAiModel
3+
linktitle: GoogleAiModel
4+
articleTitle: GoogleAiModel
5+
second_title: Aspose.Words for .NET
6+
description: Create a GoogleAiModel instance to integrate Google AI capabilities into document processing with Aspose.Words AI.
7+
type: docs
8+
weight: 10
9+
url: /net/aspose.words.ai/googleaimodel/googleaimodel/
10+
---
11+
## GoogleAiModel(*string*) {#constructor}
12+
13+
Initializes a new instance of [`GoogleAiModel`](../) class.
14+
15+
```csharp
16+
public GoogleAiModel(string name)
17+
```
18+
19+
| Parameter | Type | Description |
20+
| --- | --- | --- |
21+
| name | String | The name of the model. For example, gemini-2.5-flash. |
22+
23+
## Examples
24+
25+
Shows how to use google AI model.
26+
27+
```csharp
28+
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
29+
GoogleAiModel model = new GoogleAiModel("gemini-flash-latest", apiKey);
30+
31+
Document doc = new Document(MyDir + "Big document.docx");
32+
SummarizeOptions summarizeOptions = new SummarizeOptions() { SummaryLength = SummaryLength.VeryShort };
33+
Document summary = model.Summarize(doc, summarizeOptions);
34+
```
35+
36+
### See Also
37+
38+
* class [GoogleAiModel](../)
39+
* namespace [Aspose.Words.AI](../../../aspose.words.ai/)
40+
* assembly [Aspose.Words](../../../)
41+
42+
---
43+
44+
## GoogleAiModel(*string, string*) {#constructor_1}
45+
46+
Initializes a new instance of [`GoogleAiModel`](../) class.
47+
48+
```csharp
49+
public GoogleAiModel(string name, string apiKey)
50+
```
51+
52+
| Parameter | Type | Description |
53+
| --- | --- | --- |
54+
| name | String | The name of the model. For example, gemini-2.5-flash. |
55+
| apiKey | String | The API key to use the Gemini API. Please refer to https://ai.google.dev/gemini-api/docs/api-key for details. |
56+
57+
## Examples
58+
59+
Shows how to use google AI model.
60+
61+
```csharp
62+
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
63+
GoogleAiModel model = new GoogleAiModel("gemini-flash-latest", apiKey);
64+
65+
Document doc = new Document(MyDir + "Big document.docx");
66+
SummarizeOptions summarizeOptions = new SummarizeOptions() { SummaryLength = SummaryLength.VeryShort };
67+
Document summary = model.Summarize(doc, summarizeOptions);
68+
```
69+
70+
### See Also
71+
72+
* class [GoogleAiModel](../)
73+
* namespace [Aspose.Words.AI](../../../aspose.words.ai/)
74+
* assembly [Aspose.Words](../../../)

english/net/aspose.words.ai/googleaimodel/summarize/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ articleTitle: Summarize
55
second_title: Aspose.Words for .NET
66
description: Google AI document summarization tool. Extract key insights and create concise summaries from Word documents automatically.
77
type: docs
8-
weight: 20
8+
weight: 30
99
url: /net/aspose.words.ai/googleaimodel/summarize/
1010
---
1111
## Summarize(*[Document](../../../aspose.words/document/)[SummarizeOptions](../../summarizeoptions/)*) {#summarize}

english/net/aspose.words.ai/googleaimodel/translate/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ articleTitle: Translate
55
second_title: Aspose.Words for .NET
66
description: Google AI document translator for multilingual content. Convert Word documents to different languages with high accuracy and speed.
77
type: docs
8-
weight: 30
8+
weight: 40
99
url: /net/aspose.words.ai/googleaimodel/translate/
1010
---
1111
## GoogleAiModel.Translate method

0 commit comments

Comments
 (0)