Class GeminiModelClient
- Namespace
- Uralstech.UAI.Abstraction.Providers.Gemini
public class GeminiModelClient : IModelClient
- Inheritance
-
objectGeminiModelClient
- Implements
Fields
ModelProvider
Constant for the model provider.
public const string ModelProvider = "gemini"
Field Value
- string
Properties
DefaultModelId
The default model to use for inference.
public string DefaultModelId { get; set; }
Property Value
- string
Methods
Chat(IReadOnlyList<Message>, IReadOnlyList<Function>, string, int, bool, CancellationToken)
Runs a chat query with the model, with tools.
public Awaitable<ChatInferenceResult> Chat(IReadOnlyList<Message> messages, IReadOnlyList<Function> tools, string model = null, int maxToolCalls = 10, bool tryRemoveFilters = false, CancellationToken token = default)
Parameters
messagesIReadOnlyList<Message>The conversation messages.
toolsIReadOnlyList<Function>The tools the model can use.
modelstringThe ID of the model to use.
maxToolCallsintMaximum number of allowed tool calls.
tryRemoveFiltersboolTry to remove filters if supported by the model provider.
tokenCancellationTokenCancellation token.
Returns
- Awaitable<ChatInferenceResult>
The model's response.
Chat(IReadOnlyList<Message>, string, bool, CancellationToken)
Runs a chat query with the model.
public Awaitable<ChatInferenceResult> Chat(IReadOnlyList<Message> messages, string model = null, bool tryRemoveFilters = false, CancellationToken token = default)
Parameters
messagesIReadOnlyList<Message>The conversation messages.
modelstringThe ID of the model to use.
tryRemoveFiltersboolTry to remove filters if supported by the model provider.
tokenCancellationTokenCancellation token.
Returns
- Awaitable<ChatInferenceResult>
The model's response.