GeminiDotnet.Extensions.AI
0.1.2-preview
This is a prerelease version of GeminiDotnet.Extensions.AI.
dotnet add package GeminiDotnet.Extensions.AI --version 0.1.2-preview
NuGet\Install-Package GeminiDotnet.Extensions.AI -Version 0.1.2-preview
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GeminiDotnet.Extensions.AI" Version="0.1.2-preview" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GeminiDotnet.Extensions.AI --version 0.1.2-preview
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GeminiDotnet.Extensions.AI, 0.1.2-preview"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GeminiDotnet.Extensions.AI as a Cake Addin #addin nuget:?package=GeminiDotnet.Extensions.AI&version=0.1.2-preview&prerelease // Install GeminiDotnet.Extensions.AI as a Cake Tool #tool nuget:?package=GeminiDotnet.Extensions.AI&version=0.1.2-preview&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GeminiDotnet.Extensions.AI
This package provides an implementation of Microsoft.Extensions.AI.IChatClient
for interacting with Google Gemini models.
For more information on why you may want to use the IChatClient
abstraction, you can read the announcement blog post.
Getting Started
First, install the NuGet package into your project.
dotnet add package GeminiDotnet.Extensions.AI
Then, you can create and use the IChatClient
abstraction to interact with Gemini as follows.
using GeminiDotnet;
using GeminiDotnet.Extensions.AI;
var options = new GeminiClientOptions
{
ApiKey = "<your-api-key>"
};
var client = new GeminiClient(options);
IChatClient chatClient = new GeminiChatClient(client);
var response = await chatClient.CompleteAsync("What is AI?");
Console.WriteLine(response.Message);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- GeminiDotnet (>= 0.1.2)
- Microsoft.Extensions.AI.Abstractions (>= 9.1.0-preview.1.25064.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.1.2-preview | 30 | 1/23/2025 |
0.1.1-preview | 28 | 1/23/2025 |
0.1.0-preview | 33 | 1/23/2025 |