Class MistralClientAgent
Mistral client agent.
This agent supports the following input message types:
This agent returns the following message types:
You can register this agent with Register
- Inheritance
-
Mistral
Client Agent
- Implements
- Inherited Members
- Extension Methods
Constructors
MistralClientAgent(MistralClient, string, string, string, int?, ToolChoiceEnum?, bool)
Create a new instance of Mistral
public MistralClientAgent(MistralClient client, string name, string model, string systemMessage = "You are a helpful AI assistant", int? randomSeed = null, ToolChoiceEnum? toolChoice = null, bool jsonOutput = false)
Parameters
client
MistralClient name
stringthe name of this agent
model
stringthe mistral model id.
systemMessage
stringsystem message.
randomSeed
int?the seed to generate output.
toolChoice
ToolChoice ?Enum tool choice strategy.
jsonOutput
booluse json output.
Properties
Name
Property Value
Methods
GenerateReplyAsync(IEnumerable<IMessage>, GenerateReplyOptions?, CancellationToken)
Generate reply
public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Parameters
messages
IEnumerable<IMessage>conversation history
options
GenerateReply Options completion option. If provided, it should override existing option if there's any
cancellationToken
CancellationToken
Returns
GenerateStreamingReplyAsync(IEnumerable<IMessage>, GenerateReplyOptions?, CancellationToken)
public IAsyncEnumerable<IMessage> GenerateStreamingReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Parameters
messages
IEnumerable<IMessage>options
GenerateReply Options cancellationToken
CancellationToken