fix: remove unused member and move comment
This commit is contained in:
@@ -12,11 +12,6 @@ namespace AnthropicClient.Models;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Tool
|
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}$");
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the name of the tool. This name will conform to the Anthropic tool naming rules.
|
/// Gets the name of the tool. This name will conform to the Anthropic tool naming rules.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -51,6 +46,9 @@ public class Tool
|
|||||||
ArgumentValidator.ThrowIfNullOrWhitespace(description, nameof(description));
|
ArgumentValidator.ThrowIfNullOrWhitespace(description, nameof(description));
|
||||||
ArgumentValidator.ThrowIfNull(function, nameof(function));
|
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);
|
var sanitizedName = SanitizeName(name);
|
||||||
|
|
||||||
Name = sanitizedName;
|
Name = sanitizedName;
|
||||||
|
|||||||
Reference in New Issue
Block a user