UGemini 2.0.1
A C# wrapper for the Google Gemini API.
|
The class for accessing the Gemini API! More...
Public Member Functions | |
void | SetApiKey (string apiKey) |
Sets the Gemini API key. | |
async Task< TResponse > | Request< TResponse > (IGeminiPostRequest request) |
Computes a POST request on the Gemini API. | |
async Task< TResponse > | Request< TResponse > (IGeminiMultiPartPostRequest request) |
Computes a multi-part POST request on the Gemini API. | |
async Task< TResponse > | Request< TResponse > (IGeminiGetRequest request) |
Computes a GET request on the Gemini API. | |
async Task | Request (IGeminiDeleteRequest request) |
Computes a DELETE request on the Gemini API. | |
async Task< TResponse > | Request< TResponse > (IGeminiPatchRequest request) |
Computes a PATCH request on the Gemini API. | |
async Task< TResponse > | StreamRequest< TResponse > (IGeminiStreamablePostRequest< TResponse > request) |
Computes a streaming POST request on the Gemini API. | |
Additional Inherited Members | |
Properties inherited from Uralstech.UGemini.Utils.Singleton.Singleton< GeminiManager > | |
static T | Instance [get] |
The active instance of type T . | |
The class for accessing the Gemini API!
async Task Uralstech.UGemini.GeminiManager.Request | ( | IGeminiDeleteRequest | request | ) |
Computes a DELETE request on the Gemini API.
request | The request object. |
GeminiRequestException | Thrown when the API request fails. |
async Task< TResponse > Uralstech.UGemini.GeminiManager.Request< TResponse > | ( | IGeminiGetRequest | request | ) |
Computes a GET request on the Gemini API.
TResponse | The response type. For example, a request of type Models.Generation.Chat.GeminiChatRequest corresponds to a response type of Models.Generation.Chat.GeminiChatResponse, and a request of type Models.CountTokens.GeminiTokenCountRequest corresponds to a response of type Models.CountTokens.GeminiTokenCountResponse. |
request | The request object. |
GeminiRequestException | Thrown when the API request fails. |
async Task< TResponse > Uralstech.UGemini.GeminiManager.Request< TResponse > | ( | IGeminiMultiPartPostRequest | request | ) |
Computes a multi-part POST request on the Gemini API.
TResponse | The response type. For example, a request of type Models.Generation.Chat.GeminiChatRequest corresponds to a response type of Models.Generation.Chat.GeminiChatResponse, and a request of type Models.CountTokens.GeminiTokenCountRequest corresponds to a response of type Models.CountTokens.GeminiTokenCountResponse. |
request | The request object. |
GeminiRequestException | Thrown when the API request fails. |
async Task< TResponse > Uralstech.UGemini.GeminiManager.Request< TResponse > | ( | IGeminiPatchRequest | request | ) |
Computes a PATCH request on the Gemini API.
TResponse | The response type. For example, a request of type Models.Generation.Chat.GeminiChatRequest corresponds to a response type of Models.Generation.Chat.GeminiChatResponse, and a request of type Models.CountTokens.GeminiTokenCountRequest corresponds to a response of type Models.CountTokens.GeminiTokenCountResponse. |
request | The request object. |
GeminiRequestException | Thrown when the API request fails. |
async Task< TResponse > Uralstech.UGemini.GeminiManager.Request< TResponse > | ( | IGeminiPostRequest | request | ) |
Computes a POST request on the Gemini API.
TResponse | The response type. For example, a request of type Models.Generation.Chat.GeminiChatRequest corresponds to a response type of Models.Generation.Chat.GeminiChatResponse, and a request of type Models.CountTokens.GeminiTokenCountRequest corresponds to a response of type Models.CountTokens.GeminiTokenCountResponse. |
request | The request object. |
GeminiRequestException | Thrown when the API request fails. |
void Uralstech.UGemini.GeminiManager.SetApiKey | ( | string | apiKey | ) |
Sets the Gemini API key.
apiKey | The new API key. |
async Task< TResponse > Uralstech.UGemini.GeminiManager.StreamRequest< TResponse > | ( | IGeminiStreamablePostRequest< TResponse > | request | ) |
Computes a streaming POST request on the Gemini API.
Use callbacks in the request object to receive the streamed data.
TResponse | The response type. For example, a request of type Models.Generation.Chat.GeminiChatRequest corresponds to a response type of Models.Generation.Chat.GeminiChatResponse, and a request of type Models.CountTokens.GeminiTokenCountRequest corresponds to a response of type Models.CountTokens.GeminiTokenCountResponse. |
request | The request object. |
GeminiRequestException | Thrown when the API request fails. |
TResponse | : | IAppendableData<TResponse> |