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
clientMistralClientnamestringthe name of this agent
modelstringthe mistral model id.
systemMessagestringsystem message.
randomSeedint?the seed to generate output.
toolChoiceToolChoiceEnum?tool choice strategy.
jsonOutputbooluse 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
messagesIEnumerable<IMessage>conversation history
optionsGenerateReplyOptionscompletion option. If provided, it should override existing option if there's any
cancellationTokenCancellationToken
Returns
GenerateStreamingReplyAsync(IEnumerable<IMessage>, GenerateReplyOptions?, CancellationToken)
public IAsyncEnumerable<IMessage> GenerateStreamingReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Parameters
messagesIEnumerable<IMessage>optionsGenerateReplyOptionscancellationTokenCancellationToken