Session-Kontext: Textarea für System-Prompt pro Session
This commit is contained in:
1 parent
b752c99a64
commit
48be82905e
7 files changed
+17
-18
No files matched your search
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user