Class AnthropicClientAgent
public class AnthropicClientAgent : IStreamingAgent, IAgent, IAgentMetaInformation
- Inheritance
-
AnthropicClientAgent
- Implements
- Inherited Members
- Extension Methods
Constructors
AnthropicClientAgent(AnthropicClient, string, string, string, decimal, int, Tool[]?, ToolChoice?)
public AnthropicClientAgent(AnthropicClient anthropicClient, string name, string modelName, string systemMessage = "You are a helpful AI assistant", decimal temperature = 0.7, int maxTokens = 1024, Tool[]? tools = null, ToolChoice? toolChoice = null)
Parameters
anthropicClientAnthropicClientnamestringmodelNamestringsystemMessagestringtemperaturedecimalmaxTokensinttoolsTool[]toolChoiceToolChoice
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