2026-09-04 15:48:07 +02:00
|
|
|
using System.Text.Json;
|
|
|
|
|
|
|
|
|
|
namespace AIStudio.Provider.Anthropic;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A tool as the Anthropic messages API expects it.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// Anthropic names the schema field input schema, where the chat completions and responses APIs
|
|
|
|
|
/// call it parameters. The description is the plain one, without their nesting.
|
|
|
|
|
/// </remarks>
|
|
|
|
|
public sealed record AnthropicTool
|
|
|
|
|
{
|
2026-11-03 07:59:30 +01:00
|
|
|
public string Name { get; set; } = string.Empty;
|
2026-09-04 15:48:07 +02:00
|
|
|
|
2026-11-03 07:59:30 +01:00
|
|
|
public string Description { get; set; } = string.Empty;
|
2026-09-04 15:48:07 +02:00
|
|
|
|
2026-11-03 07:59:30 +01:00
|
|
|
public bool Strict { get; set; }
|
2026-09-04 15:48:07 +02:00
|
|
|
|
2026-11-03 07:59:30 +01:00
|
|
|
public JsonElement InputSchema { get; set; }
|
2026-09-04 15:48:07 +02:00
|
|
|
}
|