Skip to content

MUN1Z/generative-ai-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google AI DotNet SDK

License: MIT Discord GitHub stars

For example, with just a few lines of code, you can access Gemini's multimodal capabilities to generate text from text input:

using GoogleGenerativeAI;

var gen = new GenerativeAIService("YOUR_API_KEY");
var response = await gen.GenerateContentAsync("");
var firstPart =  response.Candidates.FirstOrDefault().Content.Parts.FirstOrDefault();

Console.WriteLine(firstPart.Text);

Try out the sample Dotnet console app

This repository contains a sample app demonstrating how the SDK can access and utilize the Gemini model for various use cases.

  1. Check out this repository.
    git clone https://github.com/muniz/generative-ai-dotnet

  2. Obtain an API key to use with the Google AI SDKs.

  3. Open and build the solution(.sln) file of this repo.

  4. Paste your API key into the YOUR_API_KEY property in the Program file.

  5. Run the app, put a your text input in console and click enter.

5ac78a46d0fd371fe98656b13d22c083.mp4

Documentation

Find complete documentation for the Google AI SDKs and the Gemini model in the Google documentation:
https://ai.google.dev/docs

About

About DotNet client library for Google's large language model PaLM API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages