feat: Agent-Einstellung 'Rückfragen erlauben' (allowUserChoice)
- Neues Feld AllowUserChoice (bool, default true) im AgentRecord - DB-Migration: allow_user_choice Spalte mit DEFAULT 1 - Agent-Form: Checkbox 'Rückfragen erlauben' nach 'Tool-Nutzung erzwingen' - ToolService.GetToolDefinitions: neuer Parameter includeUserChoice - ask_user_choice Tool wird nur eingebunden wenn Agent es erlaubt - Review-Agents und Non-Streaming (Cronjobs) erhalten nie ask_user_choice - ChatEndpoint reicht Agent.AllowUserChoice an StreamChat durch
This commit is contained in:
1 parent
5f3e308975
commit
89ceb61948
10 files changed
+26
-36
No files matched your search
@@ -65,6 +65,7 @@ public static class AgentEndpoint
|
||||
UseMemory = !body.TryGetProperty("useMemory", out var um) || um.GetBoolean(),
|
||||
UseWebSearch = body.TryGetProperty("webSearchVersion", out var wsv) && !string.IsNullOrEmpty(wsv.GetString()),
|
||||
WebSearchVersion = body.TryGetProperty("webSearchVersion", out var wsv2) ? wsv2.GetString() ?? "" : "",
|
||||
AllowUserChoice = !body.TryGetProperty("allowUserChoice", out var auc) || auc.GetBoolean(),
|
||||
AvatarScale = body.TryGetProperty("avatarScale", out var asc) ? asc.GetDouble() : 1.0,
|
||||
AvatarOffsetX = body.TryGetProperty("avatarOffsetX", out var aox) ? aox.GetDouble() : 0,
|
||||
AvatarOffsetY = body.TryGetProperty("avatarOffsetY", out var aoy) ? aoy.GetDouble() : 0
|
||||
@@ -103,6 +104,7 @@ public static class AgentEndpoint
|
||||
agent.WebSearchVersion = wsv.GetString() ?? "";
|
||||
agent.UseWebSearch = !string.IsNullOrEmpty(agent.WebSearchVersion);
|
||||
}
|
||||
if (body.TryGetProperty("allowUserChoice", out var auc)) agent.AllowUserChoice = auc.GetBoolean();
|
||||
if (body.TryGetProperty("avatarScale", out var asc)) agent.AvatarScale = asc.GetDouble();
|
||||
if (body.TryGetProperty("avatarOffsetX", out var aox)) agent.AvatarOffsetX = aox.GetDouble();
|
||||
if (body.TryGetProperty("avatarOffsetY", out var aoy)) agent.AvatarOffsetY = aoy.GetDouble();
|
||||
|
||||
Reference in new issue
Block a user