Files
gott/Models/ChatContext.cs
T
Meleki 02f5fe2faf Provider-Abstraktion: Agents unterstützen jetzt OpenAI + Anthropic
Backend:
- ChatEndpoint: Globaler OpenAI-Fallback entfernt, Key-Check pro Provider
- TelegramService/CronjobService: Provider-Weiche statt hardcoded Anthropic
- AnthropicService: Preparer/Review/Finalizer sind Provider-aware
- OpenAiService: Neue ChatNonStreaming()-Methode für agentic loop
- ToolService: send_to_session lädt Key des Ziel-Agents
- SubAgentContext: Provider-Feld hinzugefügt
- ChatService: BuildSubAgentContext setzt Provider

Frontend:
- Key-Switch-Modal: 'Kein Key'-Option zum Entfernen der Zuweisung
- ApiKeysEndpoint: keyId='none' löscht Key-Zuweisung
2026-03-14 22:59:33 +01:00

54 lines
1.7 KiB
C#

using System.Collections.Generic;
using Gott.Services;
namespace Gott.Models;
public class ChatContext
{
public string ChainId { get; set; }
public string SessionId { get; set; }
public string ModelId { get; set; }
public string Provider { get; set; } // "" = Anthropic, "nvidia" = OpenAI-kompatibler Provider
public string Workspace { get; set; }
public string AgentId { get; set; }
public string SystemPromptText { get; set; }
public List<object> SystemPrompt { get; set; }
public List<PromptBlock> PromptBlocks { get; set; }
public string ToolChoice { get; set; }
public bool UseMemory { get; set; }
public string WebSearchVersion { get; set; }
public int MaxIterations { get; set; }
public AgentRecord Agent { get; set; }
public SessionRecord Session { get; set; }
public bool PlanMode { get; set; }
public string ApiToken { get; set; }
// Preparer-Agent (vor dem Worker)
public SubAgentContext Preparer { get; set; }
// Review-Agent
public SubAgentContext Review { get; set; }
// Finalizer-Agent
public SubAgentContext Finalizer { get; set; }
}
public class SubAgentContext
{
public string ModelId { get; set; }
public string Provider { get; set; } // "" = Anthropic, "nvidia"/"openai"/etc. = OpenAI-kompatibel
public List<object> SystemPrompt { get; set; }
public string AgentId { get; set; }
public string Workspace { get; set; }
public bool UseMemory { get; set; }
public string WebSearchVersion { get; set; }
public string ToolChoice { get; set; }
public AgentRecord Agent { get; set; }
// Preparer-spezifisch
public bool AllowUserChoice { get; set; }
// Review-spezifisch
public int MaxReviewIterations { get; set; }
}