You are here: Building with agents › The kits › Models.Gemini
Summary#
Osysharp.Models.Gemini is the class that talks to Google's Gemini API. Name it on the models it serves and every call to those models goes through it.
Like the other two providers it is plain Osy# over HTTP, so it can be read whole and copied for a provider nobody has written yet.
| Package | Osysharp.Models.Gemini, version 1.0.0 |
| You add it with | use Osysharp.Models.Gemini; in the app's manifest. |
| It sits on | [[agent-kit-llm|Llm]] |
| It also uses | Http — parts of the platform's own library |
| Its own test app | A plant nursery that answers growers — kits/gemini/tests |
Description#
What do you get without writing anything?#
- Complete and stream, tools included.
- Token counts reported to the meter.
When do you need it?#
When your models are Google's.
What does it expose?#
The tables below are generated from the kit itself, not written by hand: osy kits Osysharp.Models.Gemini --surface lists each of
them with the code of the kit's own test app that uses it, and the tests that show it working.
Types you use
| Type | What it is |
|---|---|
GeminiClient | The Google Gemini API as an ILlmClient. |
GeminiRequest | What goes UP. |
GeminiGenerationConfig | The sampling settings. |
GeminiAnswer | What comes back — from a whole call and from one streamed chunk alike, which is Gemini's own shape: a chunk is a response with fewer parts filled in. |
GeminiPart | One part of a turn. |
GeminiFunctionCall | args is a document, not text — Anthropic's shape rather than OpenAI's. |
GeminiUsage | The token counts. |
What to read next#
- Osysharp.Llm — every call to a model: which one, what it may cost, what it did cost — every call to a model: which one, what it may cost, what it did cost
- Osysharp.Models.Anthropic — Anthropic's models as a provider — Anthropic's models as a provider
- The map of the kits — which sits on which, and what each one is for — the map of the kits — which sits on which, and what each one is for
Go deeper#
- [[agent-llm-calls#providers]] — how a provider is written and named
- [[agent-llm-calls#models]] — saying which models the app has