style: 调整架构引用

This commit is contained in:
chenchun
2025-08-11 15:31:11 +08:00
parent 25eebec8f7
commit 42d537a68b
55 changed files with 63 additions and 61 deletions

View File

@@ -0,0 +1,32 @@
using System.Text.Json.Serialization;
namespace Yi.Framework.AiHub.Domain.Shared.Dtos.OpenAi;
/// <summary>
/// 有效工具的定义。
/// </summary>
public class ThorToolDefinition
{
/// <summary>
/// 必修的。工具的类型。目前仅支持 function 。
/// </summary>
[JsonPropertyName("type")]
public string Type { get; set; } = ThorToolTypeConst.Function;
/// <summary>
/// 函数对象
/// </summary>
[JsonPropertyName("function")]
public ThorToolFunctionDefinition? Function { get; set; }
/// <summary>
/// 创建函数工具
/// </summary>
/// <param name="function"></param>
/// <returns></returns>
public static ThorToolDefinition CreateFunctionTool(ThorToolFunctionDefinition function) => new()
{
Type = ThorToolTypeConst.Function,
Function = function
};
}