Table of Contents

Class MistralClientAgent

Namespace
AutoGen.Mistral
Assembly
AutoGen.Mistral.dll

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 MistralClient

      MistralClient

      name string

      the name of this agent

      model string

      the mistral model id.

      systemMessage string

      system message.

      randomSeed int?

      the seed to generate output.

      toolChoice ToolChoiceEnum?

      tool choice strategy.

      jsonOutput bool

      use json output.

      Properties

      Name

      public string Name { get; }

      Property Value

      string

      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 GenerateReplyOptions

      completion option. If provided, it should override existing option if there's any

      cancellationToken CancellationToken

      Returns

      Task<IMessage>

      GenerateStreamingReplyAsync(IEnumerable<IMessage>, GenerateReplyOptions?, CancellationToken)

      public IAsyncEnumerable<IMessage> GenerateStreamingReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)

      Parameters

      messages IEnumerable<IMessage>
      options GenerateReplyOptions
      cancellationToken CancellationToken

      Returns

      IAsyncEnumerable<IMessage>