新增原生工具调用数据结构与解析:SimpleAIClient.cs
AITool 增加 Schema 构造器与函数定义生成,所有工具补齐 GetParametersSchema():AITool.cs 与 *.cs
This commit is contained in:
@@ -15,6 +15,15 @@ namespace WulaFallenEmpire.EventSystem.AI.Tools
|
||||
"Analyze the current game screen screenshot. Provide an instruction to guide the analysis.";
|
||||
|
||||
public override string UsageSchema => "{\"instruction\":\"Describe the current screen\"}";
|
||||
public override Dictionary<string, object> GetParametersSchema()
|
||||
{
|
||||
var properties = new Dictionary<string, object>
|
||||
{
|
||||
["instruction"] = SchemaString("Instruction for image analysis.", nullable: true),
|
||||
["context"] = SchemaString("Alias for instruction.", nullable: true)
|
||||
};
|
||||
return SchemaObject(properties, RequiredList("instruction", "context"));
|
||||
}
|
||||
|
||||
private const string BaseVisionSystemPrompt = "You are a seasoned RimWorld assistant. Analyze the screenshot per instruction. Keep replies concise. Do not output tool call JSON unless explicitly asked.";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user