新增原生工具调用数据结构与解析:SimpleAIClient.cs
AITool 增加 Schema 构造器与函数定义生成,所有工具补齐 GetParametersSchema():AITool.cs 与 *.cs
This commit is contained in:
@@ -10,6 +10,15 @@ namespace WulaFallenEmpire.EventSystem.AI.Tools
|
||||
public override string Name => "remember_fact";
|
||||
public override string Description => "Stores a specific fact or piece of information into the AI's long-term memory for future retrieval.";
|
||||
public override string UsageSchema => "{\"fact\":\"...\",\"category\":\"misc\"}";
|
||||
public override Dictionary<string, object> GetParametersSchema()
|
||||
{
|
||||
var properties = new Dictionary<string, object>
|
||||
{
|
||||
["fact"] = SchemaString("Fact to store.", nullable: true),
|
||||
["category"] = SchemaString("Memory category.", nullable: true)
|
||||
};
|
||||
return SchemaObject(properties, RequiredList("fact", "category"));
|
||||
}
|
||||
|
||||
public override string Execute(string args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user