Session-Kontext: Textarea für System-Prompt pro Session

This commit is contained in:
Meleki committed 2026-02-27 06:52:47 +01:00
1 parent b752c99a64
commit 48be82905e
7 files changed
+17 -18

No files matched your search

+3
View File
@@ -83,6 +83,9 @@ public static class ChatEndpoint
if (!string.IsNullOrWhiteSpace(agent.Instructions))
promptParts.Add($"## Instructions\n{agent.Instructions}");
if (!string.IsNullOrWhiteSpace(session.Context))
promptParts.Add($"## Kontext\n{session.Context}");
var systemPromptText = string.Join("\n\n", promptParts);
var chainId = Guid.NewGuid().ToString("N");
+2 -1
View File
@@ -51,8 +51,9 @@ public static class SessionEndpoint
var image = body.TryGetProperty("image", out var img) ? img.GetString() : null;
var agentId = body.TryGetProperty("agentId", out var a) ? a.GetString() : null;
var workspace = body.TryGetProperty("workspace", out var w) ? w.GetString() : null;
var context = body.TryGetProperty("context", out var ctxEl) ? ctxEl.GetString() : null;
var session = await db.CreateSession(name, description, image, agentId, workspace);
var session = await db.CreateSession(name, description, image, agentId, workspace, context);
await ctx.Response.WriteAsJsonAsync(session);
}