Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 1011 Bytes

README.MD

File metadata and controls

34 lines (27 loc) · 1011 Bytes

Nuget NuGet

Installlation

> dotnet add package GeminiChat.DotNet

Package Manager:

PM > Install-Package GeminiChat.DotNet

Getting Started

  1. Your API Key for Gemini. You can get it from here.
  2. Install this package on your project with CLI or Nuget Package Manager.

Sample Code:

var service = new GeminiService("INPUT YOUR API KEY");
gemini.AppendMessage("Hi!");
var answer = await gemini.GetResponseAsync();
gemini.AppendMessage("Write a story about magic pack.");
var story = string.Empty;
await gemini.StreamResponseAsync((dataLine) =>
{
    story += dataLine;
});

Pull requests are welcome to improve this library.