feat: ToolChoice + ToolNames pro Chain in DB speichern
- ChainRecord: neue Felder ToolChoice (auto/any) und ToolNames (JSON-Array) - DatabaseService: Migration tool_choice + tool_names Spalten, INSERT erweitert - ChatEndpoint: berechnet Tools vor Chain-Erstellung, speichert Werte mit - ToolService: execute-Timeout Beschreibung korrigiert (30s → 180s)
This commit is contained in:
1 parent
b24a000784
commit
a1c54bf376
4 files changed
+26
-6
No files matched your search
@@ -124,6 +124,8 @@ public class DatabaseService
|
||||
TryAddColumn(conn, "chains", "agent_id", "TEXT");
|
||||
TryAddColumn(conn, "chains", "cache_creation_tokens", "INTEGER NOT NULL DEFAULT 0");
|
||||
TryAddColumn(conn, "chains", "cache_read_tokens", "INTEGER NOT NULL DEFAULT 0");
|
||||
TryAddColumn(conn, "chains", "tool_choice", "TEXT");
|
||||
TryAddColumn(conn, "chains", "tool_names", "TEXT");
|
||||
TryAddColumn(conn, "messages", "attachment_count", "INTEGER NOT NULL DEFAULT 0");
|
||||
TryAddColumn(conn, "messages", "attachment_names", "TEXT");
|
||||
TryAddColumn(conn, "agents", "tool_choice", "TEXT DEFAULT 'any'");
|
||||
@@ -396,8 +398,8 @@ public class DatabaseService
|
||||
using var conn = CreateConnection();
|
||||
chain.CreatedAt = DateTime.UtcNow.ToString("o");
|
||||
await conn.ExecuteAsync(@"
|
||||
INSERT INTO chains (chain_id, session_id, archive_id, agent_id, model, system_prompt, input_tokens, output_tokens, iterations, stop_reason, duration_ms, created_at)
|
||||
VALUES (@ChainId, @SessionId, @ArchiveId, @AgentId, @Model, @SystemPrompt, @InputTokens, @OutputTokens, @Iterations, @StopReason, @DurationMs, @CreatedAt)
|
||||
INSERT INTO chains (chain_id, session_id, archive_id, agent_id, model, system_prompt, tool_choice, tool_names, input_tokens, output_tokens, iterations, stop_reason, duration_ms, created_at)
|
||||
VALUES (@ChainId, @SessionId, @ArchiveId, @AgentId, @Model, @SystemPrompt, @ToolChoice, @ToolNames, @InputTokens, @OutputTokens, @Iterations, @StopReason, @DurationMs, @CreatedAt)
|
||||
", chain);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public class ToolService
|
||||
new
|
||||
{
|
||||
name = "execute",
|
||||
description = "Führt einen Shell-Befehl im Workspace-Verzeichnis aus. Gibt stdout und stderr zurück. Timeout: 30 Sekunden.",
|
||||
description = "Führt einen Shell-Befehl im Workspace-Verzeichnis aus. Gibt stdout und stderr zurück. Timeout: 180 Sekunden.",
|
||||
input_schema = new
|
||||
{
|
||||
type = "object",
|
||||
|
||||
Reference in new issue
Block a user