新增原生工具调用数据结构与解析:SimpleAIClient.cs

AITool 增加 Schema 构造器与函数定义生成,所有工具补齐 GetParametersSchema():AITool.cs 与 *.cs
This commit is contained in:
2025-12-31 15:44:57 +08:00
parent 244ba3d354
commit 1e64302d21
21 changed files with 936 additions and 4 deletions

View File

@@ -12,6 +12,16 @@ namespace WulaFallenEmpire.EventSystem.AI.Tools
public override string Name => "get_pawn_status";
public override string Description => "Returns detailed status (health, needs, gear) of specified pawns. Use this to check for sickness, injuries, mood, or equipment. Can filter by name, category (colonist/animal/prisoner/guest), or status (sick/injured).";
public override string UsageSchema => "{\"name\":\"optional\",\"category\":\"colonist\",\"filter\":\"sick\"}";
public override Dictionary<string, object> GetParametersSchema()
{
var properties = new Dictionary<string, object>
{
["name"] = SchemaString("Name filter (substring).", nullable: true),
["category"] = SchemaString("colonist/animal/prisoner/guest/all.", nullable: true),
["filter"] = SchemaString("sick/injured/downed/dead.", nullable: true)
};
return SchemaObject(properties, RequiredList("name", "category", "filter"));
}
public override string Execute(string args)
{