Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenkirstaetter committed Dec 11, 2024
1 parent c3edffd commit e74f0dc
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 2 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Alternatively, add the following line to your `.csproj` file.

```text
<ItemGroup>
<PackageReference Include="Mscc.GenerativeAI" Version="2.0.0" />
<PackageReference Include="Mscc.GenerativeAI" Version="2.0.1" />
</ItemGroup>
```

Expand Down Expand Up @@ -200,6 +200,26 @@ Shimmer me timbers, it's good to see a friendly face!
What brings ye to these here waters?
```

### Use Google Search

To activate Google Search as a tool, set the boolean property `UseGoogleSearch` to true, like the following example.

```csharp
var apiKey = "your_api_key";
var prompt = "When is the next total solar eclipse in Mauritius?";
var genAi = new GoogleAI(apiKey);
var model = genAi.GenerativeModel(Model.Gemini20FlashExperimental);
model.UseGoogleSearch = true;

var response = await model.GenerateContent(prompt);
Console.WriteLine(string.Join(Environment.NewLine,
response.Candidates![0].Content!.Parts
.Select(x => x.Text)
.ToArray()));
```

More details are described in the API documentation on [Search as a tool](https://ai.google.dev/gemini-api/docs/models/gemini-v2#search-tool).

### Grounding with Google Search

The simplest version is to toggle the boolean property `UseGrounding`, like so.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1
6 changes: 6 additions & 0 deletions src/Mscc.GenerativeAI.Google/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
### Fixed

## 2.0.1

### Changed

- bump version

## 2.0.0

### Changed
Expand Down
6 changes: 6 additions & 0 deletions src/Mscc.GenerativeAI.Microsoft/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
### Fixed

## 2.0.1

### Changed

- bump version

## 2.0.0

### Changed
Expand Down
6 changes: 6 additions & 0 deletions src/Mscc.GenerativeAI.Web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
### Fixed

## 2.0.1

### Changed

- bump version

## 2.0.0

### Changed
Expand Down
6 changes: 6 additions & 0 deletions src/Mscc.GenerativeAI/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## 2.0.1

### Added

- add types, enums, and properties for Multimodal Live API
- add Google Search as a tool

### Changed

- extend README to show "Search as a tool"

## 2.0.0

### Added
Expand Down

0 comments on commit e74f0dc

Please sign in to comment.