From 490b09b864080a121f2647ec874fba7039455f1b Mon Sep 17 00:00:00 2001 From: Guilherme Martin Date: Sat, 16 Mar 2024 23:21:41 -0300 Subject: [PATCH] Update README.md --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b3bdf9..148fc92 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ Welcome to DotnetGeminiSDK, a .NET SDK for interacting with the Google Gemini AP - [Text Prompt](#text-prompt) - [Stream Text Prompt](#stream-text-prompt) - [Multiple Text Prompt](#multiple-text-prompt) + - [Get Model](#get-model) + - [Get All Models](#get-models) - [Image Prompt](#image-prompt) - [Exception Handling](#exception-handling) - [Contributing](#contributing) @@ -86,10 +88,10 @@ public class YourClass - [x] Multiple Text Prompt - [x] Image Prompt - [x] Counting Tokens +- [x] Get Model +- [x] List Models - [ ] Embedding - [ ] Batch Embedding -- [ ] Get Model -- [ ] List Models ## Usage 🚀 ### Text Prompt 📝 @@ -137,6 +139,22 @@ var messages = new List var response = await geminiClient.TextPrompt(messages); ``` +### Get Model 📒 +Get the specific model details of Gemini using `GetModel` method: + +```csharp +var geminiClient = serviceProvider.GetRequiredService(); +var response = await geminiClient.GetModel("gemini-model-v1"); +``` + +### List all models 🔖 +Get all models using `GetModels` method: + +```csharp +var geminiClient = serviceProvider.GetRequiredService(); +var response = await geminiClient.GetModels(); +``` + ### Count Tokens 1️⃣ Prompt the Gemini API with a text message using the `CountTokens` method: