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
anthropicClient
AnthropicClientname
stringmodelName
stringsystemMessage
stringtemperature
decimalmaxTokens
inttools
Tool[]toolChoice
ToolChoice
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