diff --git a/README.md b/README.md index 7a15e98..4f754cb 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Alternatively, add the following line to your `.csproj` file. ```text - + ``` @@ -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. diff --git a/VERSION b/VERSION index 359a5b9..10bf840 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.0.1 \ No newline at end of file diff --git a/src/Mscc.GenerativeAI.Google/CHANGELOG.md b/src/Mscc.GenerativeAI.Google/CHANGELOG.md index 9a60ebe..ae2d6e7 100644 --- a/src/Mscc.GenerativeAI.Google/CHANGELOG.md +++ b/src/Mscc.GenerativeAI.Google/CHANGELOG.md @@ -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 diff --git a/src/Mscc.GenerativeAI.Microsoft/CHANGELOG.md b/src/Mscc.GenerativeAI.Microsoft/CHANGELOG.md index 2026e99..f450bb3 100644 --- a/src/Mscc.GenerativeAI.Microsoft/CHANGELOG.md +++ b/src/Mscc.GenerativeAI.Microsoft/CHANGELOG.md @@ -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 diff --git a/src/Mscc.GenerativeAI.Web/CHANGELOG.md b/src/Mscc.GenerativeAI.Web/CHANGELOG.md index 3f4bf2b..85b43b1 100644 --- a/src/Mscc.GenerativeAI.Web/CHANGELOG.md +++ b/src/Mscc.GenerativeAI.Web/CHANGELOG.md @@ -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 diff --git a/src/Mscc.GenerativeAI/CHANGELOG.md b/src/Mscc.GenerativeAI/CHANGELOG.md index ebc300a..ab4d495 100644 --- a/src/Mscc.GenerativeAI/CHANGELOG.md +++ b/src/Mscc.GenerativeAI/CHANGELOG.md @@ -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