新增原生工具调用数据结构与解析:SimpleAIClient.cs
AITool 增加 Schema 构造器与函数定义生成,所有工具补齐 GetParametersSchema():AITool.cs 与 *.cs
This commit is contained in:
@@ -12,6 +12,15 @@ namespace WulaFallenEmpire.EventSystem.AI.Tools
|
||||
public override string Name => "recall_memories";
|
||||
public override string Description => "Searches the AI's long-term memory for facts matching a specific query or keyword.";
|
||||
public override string UsageSchema => "{\"query\":\"keywords\",\"limit\":5}";
|
||||
public override Dictionary<string, object> GetParametersSchema()
|
||||
{
|
||||
var properties = new Dictionary<string, object>
|
||||
{
|
||||
["query"] = SchemaString("Search query.", nullable: true),
|
||||
["limit"] = SchemaInteger("Max memories to return.", nullable: true)
|
||||
};
|
||||
return SchemaObject(properties, RequiredList("query", "limit"));
|
||||
}
|
||||
|
||||
public override string Execute(string args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user