Interface IModelClient
- Namespace
- Uralstech.UAI.Abstraction
A client for interacting with a model.
public interface IModelClient
Properties
DefaultModelId
The default model to use for inference.
string DefaultModelId { get; set; }
Property Value
- string
ModelProvider
The provider of the model.
string ModelProvider { get; }
Property Value
- string
Methods
Chat(IReadOnlyList<Message>, IReadOnlyList<Function>, string, int, bool, CancellationToken)
Runs a chat query with the model, with tools.
Awaitable<ChatInferenceResult> Chat(IReadOnlyList<Message> messages, IReadOnlyList<Function> tools, string model = null, int maxToolCalls = 10, bool tryRemoveFilters = false, CancellationToken token = default)
Parameters
messages
IReadOnlyList<Message>The conversation messages.
tools
IReadOnlyList<Function>The tools the model can use.
model
stringThe ID of the model to use.
maxToolCalls
intMaximum number of allowed tool calls.
tryRemoveFilters
boolTry to remove filters if supported by the model provider.
token
CancellationTokenCancellation token.
Returns
- Awaitable<ChatInferenceResult>
The model's response.
Chat(IReadOnlyList<Message>, string, bool, CancellationToken)
Runs a chat query with the model.
Awaitable<ChatInferenceResult> Chat(IReadOnlyList<Message> messages, string model = null, bool tryRemoveFilters = false, CancellationToken token = default)
Parameters
messages
IReadOnlyList<Message>The conversation messages.
model
stringThe ID of the model to use.
tryRemoveFilters
boolTry to remove filters if supported by the model provider.
token
CancellationTokenCancellation token.
Returns
- Awaitable<ChatInferenceResult>
The model's response.