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 RegisterMessageConnector(MistralClientAgent, MistralChatMessageConnector?) to support more AutoGen message types.
public class MistralClientAgent : IStreamingAgent, IAgent, IAgentMetaInformation
- Inheritance
-
MistralClientAgent
- Implements
- Inherited Members
- Extension Methods
Constructors
MistralClientAgent(MistralClient, string, string, string, int?, ToolChoiceEnum?, bool)
Create a new instance of MistralClientAgent.
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
MistralClientname
stringthe name of this agent
model
stringthe mistral model id.
systemMessage
stringsystem message.
randomSeed
int?the seed to generate output.
toolChoice
ToolChoiceEnum?tool choice strategy.
jsonOutput
booluse json output.
Properties
Name
public string Name { get; }
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
GenerateReplyOptionscompletion 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
GenerateReplyOptionscancellationToken
CancellationToken