From 15315df3c7b187fc8ccb78745af31bb74dbcda4b Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Mon, 1 Jul 2024 10:52:57 -0500 Subject: [PATCH] fix: remove unused member and move comment --- src/AnthropicClient/Models/Tool.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/AnthropicClient/Models/Tool.cs b/src/AnthropicClient/Models/Tool.cs index d5d0d1b..ed61992 100644 --- a/src/AnthropicClient/Models/Tool.cs +++ b/src/AnthropicClient/Models/Tool.cs @@ -12,11 +12,6 @@ namespace AnthropicClient.Models; /// public class Tool { - // Anthropic imposes a limit on tool names. Tool names must be... - // - between 1 and 64 characters long - // - contain only letters, numbers, underscores, and hyphens - private readonly Regex _nameRegex = new(@"^[a-zA-Z0-9_-]{1,64}$"); - /// /// Gets the name of the tool. This name will conform to the Anthropic tool naming rules. /// @@ -51,6 +46,9 @@ public class Tool ArgumentValidator.ThrowIfNullOrWhitespace(description, nameof(description)); ArgumentValidator.ThrowIfNull(function, nameof(function)); + // Anthropic imposes a limit on tool names. Tool names must be... + // - between 1 and 64 characters long + // - contain only letters, numbers, underscores, and hyphens var sanitizedName = SanitizeName(name); Name = sanitizedName;