namespace OASystem.API.OAMethodLib.TokenHubAI.Models;
///
/// 工具定义(Function Calling)
///
public class Tool
{
///
/// 工具类型
///
public string Type { get; set; } = "function";
///
/// 函数定义
///
public FunctionDefinition? Function { get; set; }
}
///
/// 函数定义
///
public class FunctionDefinition
{
///
/// 函数名称
///
public string Name { get; set; } = string.Empty;
///
/// 函数描述
///
public string? Description { get; set; }
///
/// 参数定义(JSON Schema 格式)
///
public object? Parameters { get; set; }
}
///
/// 工具调用
///
public class ToolCall
{
///
/// 工具调用 ID
///
public string Id { get; set; } = string.Empty;
///
/// 工具类型
///
public string Type { get; set; } = "function";
///
/// 函数调用
///
public FunctionCall? Function { get; set; }
}
///
/// 函数调用
///
public class FunctionCall
{
///
/// 函数名称
///
public string Name { get; set; } = string.Empty;
///
/// 函数参数(JSON 字符串)
///
public string Arguments { get; set; } = string.Empty;
}