Skip to content

Commit

Permalink
Merge pull request #18 from gsilvamartin/main
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
gsilvamartin authored Mar 17, 2024
2 parents 99496b6 + 490b09b commit 5a4e094
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 📝
Expand Down Expand Up @@ -137,6 +139,22 @@ var messages = new List<Content>
var response = await geminiClient.TextPrompt(messages);
```

### Get Model 📒
Get the specific model details of Gemini using `GetModel` method:

```csharp
var geminiClient = serviceProvider.GetRequiredService<IGeminiClient>();
var response = await geminiClient.GetModel("gemini-model-v1");
```

### List all models 🔖
Get all models using `GetModels` method:

```csharp
var geminiClient = serviceProvider.GetRequiredService<IGeminiClient>();
var response = await geminiClient.GetModels();
```

### Count Tokens 1️⃣
Prompt the Gemini API with a text message using the `CountTokens` method:

Expand Down

0 comments on commit 5a4e094

Please sign in to comment.