Tool-Nutzung: tool_choice pro Agent konfigurierbar (default: any), wiederholte Instruktionen im System-Prompt, MaxIterations in appsettings
This commit is contained in:
1 parent
8c9f54da79
commit
ff67542ba6
10 files changed
+59
-9
No files matched your search
@@ -49,7 +49,8 @@ public static class AgentEndpoint
|
||||
Description = body.TryGetProperty("description", out var d) ? d.GetString() : null,
|
||||
Model = body.TryGetProperty("model", out var m) ? m.GetString() ?? "sonnet" : "sonnet",
|
||||
Persona = body.TryGetProperty("persona", out var p) ? p.GetString() : null,
|
||||
Instructions = body.TryGetProperty("instructions", out var i) ? i.GetString() : null
|
||||
Instructions = body.TryGetProperty("instructions", out var i) ? i.GetString() : null,
|
||||
ToolChoice = body.TryGetProperty("toolChoice", out var tc) ? tc.GetString() ?? "any" : "any"
|
||||
};
|
||||
|
||||
agent = await db.CreateAgent(agent);
|
||||
@@ -72,6 +73,7 @@ public static class AgentEndpoint
|
||||
if (body.TryGetProperty("model", out var m)) agent.Model = m.GetString();
|
||||
if (body.TryGetProperty("persona", out var p)) agent.Persona = p.GetString();
|
||||
if (body.TryGetProperty("instructions", out var i)) agent.Instructions = i.GetString();
|
||||
if (body.TryGetProperty("toolChoice", out var tc)) agent.ToolChoice = tc.GetString();
|
||||
|
||||
await db.UpdateAgent(agent);
|
||||
agent = await db.GetAgent(agentId);
|
||||
|
||||
Reference in new issue
Block a user