新增原生工具调用数据结构与解析:SimpleAIClient.cs
AITool 增加 Schema 构造器与函数定义生成,所有工具补齐 GetParametersSchema():AITool.cs 与 *.cs
This commit is contained in:
@@ -11,6 +11,15 @@ namespace WulaFallenEmpire.EventSystem.AI.Tools
|
||||
public override string Name => "set_overwatch_mode";
|
||||
public override string Description => "Enables or disables the AI Overwatch Combat Protocol. When enabled (enabled=true), the AI will autonomously scan for hostile targets every few seconds and launch appropriate orbital bombardments for a set duration. When disabled (enabled=false), it immediately stops any active overwatch and clears the flight path. Use enabled=false to stop overwatch early if the player requests it.";
|
||||
public override string UsageSchema => "{\"enabled\":true,\"durationSeconds\":60}";
|
||||
public override Dictionary<string, object> GetParametersSchema()
|
||||
{
|
||||
var properties = new Dictionary<string, object>
|
||||
{
|
||||
["enabled"] = SchemaBoolean("Enable or disable overwatch.", nullable: true),
|
||||
["durationSeconds"] = SchemaInteger("Duration in seconds when enabling.", nullable: true)
|
||||
};
|
||||
return SchemaObject(properties, RequiredList("enabled", "durationSeconds"));
|
||||
}
|
||||
|
||||
public override string Execute(string args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user