feat: create chat message

This commit is contained in:
Stevan Freeborn
2024-06-27 23:26:53 -05:00
parent 68b359163d
commit 4c2cee643a
77 changed files with 3860 additions and 0 deletions
@@ -0,0 +1,34 @@
using System.Text.Json.Serialization;
using AnthropicClient.Utils;
namespace AnthropicClient.Models;
/// <summary>
/// Represents the specific tool choice mode.
/// </summary>
public class SpecificToolChoice : ToolChoice
{
/// <summary>
/// Gets the name of the tool.
/// </summary>
public string Name { get; init; } = string.Empty;
[JsonConstructor]
internal SpecificToolChoice() : base(ToolChoiceType.Tool)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="SpecificToolChoice"/> class.
/// </summary>
/// <param name="name">The name of the tool.</param>
/// <exception cref="ArgumentNullException">Thrown when the name is null.</exception>
/// <returns>A new instance of the <see cref="SpecificToolChoice"/> class.</returns>
public SpecificToolChoice(string name) : base(ToolChoiceType.Tool)
{
ArgumentValidator.ThrowIfNull(name, nameof(name));
Name = name;
}
}