docs: Dokumentation aktualisieren – Multi-Provider-System, Gemini, Modell-Caching
This commit is contained in:
1 parent
ed6e78de56
commit
982aa60376
3 files changed
+93
-59
No files matched your search
+76
-32
@@ -1,6 +1,6 @@
|
||||
# ARCHITECTURE.md – Gott
|
||||
|
||||
**Gott** ist eine selbst-gehostete AI-Chat-Plattform, gebaut auf **.NET 10** und der **Anthropic Claude API**. Sie bietet Multi-User-Support, persistente Agent-Memory, Datei-/Shell-Tools, Telegram-Integration, Cronjobs und eine Krea-Bildgenerierung – alles über ein Vanilla-JavaScript-Frontend gesteuert.
|
||||
**Gott** ist eine selbst-gehostete AI-Chat-Plattform, gebaut auf **.NET 10** mit **Anthropic Claude API** als Haupt-Provider sowie **OpenAI-kompatiblen Providern** (Nvidia, Pollinations, Gemini). Sie bietet Multi-User-Support, persistente Agent-Memory, Datei-/Shell-Tools, Telegram-Integration, Cronjobs und eine Krea-Bildgenerierung – alles über ein Vanilla-JavaScript-Frontend gesteuert.
|
||||
|
||||
---
|
||||
|
||||
@@ -18,28 +18,29 @@
|
||||
- [Models](#models)
|
||||
- [Templates](#templates)
|
||||
6. [Frontend-Architektur](#frontend-architektur)
|
||||
7. [Chat-Pipeline](#chat-pipeline)
|
||||
8. [Tool-System](#tool-system)
|
||||
9. [Agent-System](#agent-system)
|
||||
10. [System-Prompt-Aufbau](#system-prompt-aufbau)
|
||||
11. [Memory-System](#memory-system)
|
||||
12. [Skill-System](#skill-system)
|
||||
13. [Telegram-Integration](#telegram-integration)
|
||||
14. [Cronjob-System](#cronjob-system)
|
||||
15. [Krea-Bildgenerierung](#krea-bildgenerierung)
|
||||
16. [Auth & Multi-User](#auth--multi-user)
|
||||
17. [Admin-Benutzerverwaltung](#admin-benutzerverwaltung)
|
||||
18. [Multi-Agent System (Preparer + Review + Finalizer)](#multi-agent-system-preparer--review--finalizer)
|
||||
19. [Interaktive Rückfragen (ask_user_choice)](#interaktive-rückfragen-ask_user_choice)
|
||||
20. [Plan-Modus](#plan-modus)
|
||||
21. [Nachrichten teilen (Shared Messages)](#nachrichten-teilen-shared-messages)
|
||||
22. [Workspace & File-Explorer](#workspace--file-explorer)
|
||||
23. [Avatar-System](#avatar-system)
|
||||
24. [LaTeX/Math-Rendering](#latexmath-rendering)
|
||||
25. [Windows Desktop App](#windows-desktop-app)
|
||||
26. [Deployment](#deployment)
|
||||
27. [Konfiguration](#konfiguration)
|
||||
28. [Datenbank-Migrationen](#datenbank-migrationen)
|
||||
7. [Multi-Provider-System (OpenAI-kompatibel)](#multi-provider-system-openai-kompatibel)
|
||||
8. [Chat-Pipeline](#chat-pipeline)
|
||||
9. [Tool-System](#tool-system)
|
||||
10. [Agent-System](#agent-system)
|
||||
11. [System-Prompt-Aufbau](#system-prompt-aufbau)
|
||||
12. [Memory-System](#memory-system)
|
||||
13. [Skill-System](#skill-system)
|
||||
14. [Telegram-Integration](#telegram-integration)
|
||||
15. [Cronjob-System](#cronjob-system)
|
||||
16. [Krea-Bildgenerierung](#krea-bildgenerierung)
|
||||
17. [Auth & Multi-User](#auth--multi-user)
|
||||
18. [Admin-Benutzerverwaltung](#admin-benutzerverwaltung)
|
||||
19. [Multi-Agent System (Preparer + Review + Finalizer)](#multi-agent-system-preparer--review--finalizer)
|
||||
20. [Interaktive Rückfragen (ask_user_choice)](#interaktive-rückfragen-ask_user_choice)
|
||||
21. [Plan-Modus](#plan-modus)
|
||||
22. [Nachrichten teilen (Shared Messages)](#nachrichten-teilen-shared-messages)
|
||||
23. [Workspace & File-Explorer](#workspace--file-explorer)
|
||||
24. [Avatar-System](#avatar-system)
|
||||
25. [LaTeX/Math-Rendering](#latexmath-rendering)
|
||||
26. [Windows Desktop App](#windows-desktop-app)
|
||||
27. [Deployment](#deployment)
|
||||
28. [Konfiguration](#konfiguration)
|
||||
29. [Datenbank-Migrationen](#datenbank-migrationen)
|
||||
|
||||
---
|
||||
|
||||
@@ -57,7 +58,7 @@
|
||||
│ │ SSE │ │ │ │ gram │ jobs │ Img │ in │
|
||||
├──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴────┤
|
||||
│ Services Layer │
|
||||
│ AnthropicService · ChatService · ToolService │
|
||||
│ AnthropicService · OpenAiService · ChatService · ToolService│
|
||||
│ DatabaseService · MemoryService · SkillService │
|
||||
│ TelegramService · CronjobService · KreaService │
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
@@ -65,6 +66,7 @@
|
||||
│ Filesystem (data/agents/, data/skills/) │
|
||||
├─────────────────────────────────────────────────────────────┤
|
||||
│ Anthropic Claude API (claude-sonnet/opus/haiku) │
|
||||
│ OpenAI-kompatible APIs (Nvidia, Pollinations, Gemini) │
|
||||
│ Krea API (Bildgenerierung) │
|
||||
│ Telegram Bot API │
|
||||
└─────────────────────────────────────────────────────────────┘
|
||||
@@ -79,7 +81,7 @@
|
||||
| **Runtime** | .NET 10 (ohne Nullable, ohne Implicit Usings) |
|
||||
| **Web** | ASP.NET Minimal API, Kestrel |
|
||||
| **Datenbank** | SQLite via Microsoft.Data.Sqlite + Dapper |
|
||||
| **AI** | Anthropic Claude API (Streaming SSE + Non-Streaming) |
|
||||
| **AI** | Anthropic Claude API (Streaming SSE + Non-Streaming), OpenAI-kompatible APIs (Nvidia, Pollinations, Gemini) |
|
||||
| **Images** | SixLabors.ImageSharp (Resize, Thumbnails) |
|
||||
| **Cron** | Cronos (Cron-Expression-Parsing) |
|
||||
| **Frontend** | Vanilla JavaScript SPA (kein Framework) |
|
||||
@@ -120,6 +122,7 @@ gott/
|
||||
│ ├── AuthService.cs # Token-basierte Authentifizierung
|
||||
│ ├── ChatService.cs # Kontext-Aufbau, History-Builder
|
||||
│ ├── AnthropicService.cs # Claude API (Streaming + Non-Streaming)
|
||||
│ ├── OpenAiService.cs # OpenAI-kompatible Provider (Nvidia, Pollinations, Gemini)
|
||||
│ ├── ToolService.cs # Tool-Definitionen + Ausführung
|
||||
│ ├── SystemPromptBuilder.cs # Modularer System-Prompt aus Blöcken
|
||||
│ ├── MemoryService.cs # Agent-Gedächtnis (Dateisystem)
|
||||
@@ -143,6 +146,7 @@ gott/
|
||||
│ ├── CronjobEndpoint.cs # CRUD + Toggle, Manual Run
|
||||
│ ├── KreaEndpoint.cs # Generate, List, File-Serve
|
||||
│ ├── SkillEndpoint.cs # List, Agent-Skill-Mapping, Output-Files
|
||||
│ ├── ModelsEndpoint.cs # Provider-Modelle (nvidia, pollinations, gemini, refresh)
|
||||
│ ├── SharedEndpoint.cs # Nachrichten teilen (öffentliche Links)
|
||||
│ ├── AdminEndpoint.cs # Admin: User-CRUD, Impersonate (Admin-only)
|
||||
│ ├── ServerSettingsEndpoint.cs # Admin: Server-Settings lesen/schreiben (Admin-only)
|
||||
@@ -254,6 +258,7 @@ gott/
|
||||
│ ├── PROMPT.md
|
||||
│ └── output/
|
||||
├── images/ # Krea-generierte Bilder
|
||||
├── models_cache.json # Gecachte Provider-Modelle (Nvidia, Pollinations, Gemini)
|
||||
├── logs/ # Payload-Logs (optional)
|
||||
└── backup/ # Backup-Archive
|
||||
```
|
||||
@@ -289,10 +294,10 @@ TelegramBot (1) ─── (*) Session (via telegram_bot_id)
|
||||
|-------------------|-----------------------------------------------------|
|
||||
| `users` | Benutzer (username, password_hash, display_name, is_admin, persona, settings, default_path) |
|
||||
| `tokens` | Auth-Tokens (token → user_id) |
|
||||
| `agents` | AI-Agenten (model, custom_commands, auto_commit, use_soul/identity/user_info/memory, use_web_search, web_search_version, allow_user_choice, task_instruction, avatar_scale/offset, avatar_small, is_public) |
|
||||
| `agents` | AI-Agenten (model – z.B. `claude-sonnet-4-6` oder `nvidia:deepseek-ai/deepseek-r1`, custom_commands, auto_commit, use_soul/identity/user_info/memory, use_web_search, web_search_version, allow_user_choice, task_instruction, avatar_scale/offset, avatar_small, is_public) |
|
||||
| `sessions` | Chat-Sessions (description, image, image_small, workspace, context, custom_commands, telegram_bot_id, telegram_chat_id, avatar_scale/offset, preparer_agent_id, review_agent_id, max_review_iterations, finalizer_agent_id) |
|
||||
| `chains` | Request-Chains (model, tokens, iterations, timing, tool_choice, tool_names, stream_error_info, plan_mode, archive_id) |
|
||||
| `messages` | Einzelne Nachrichten (text, tool_use, tool_result, error, web_search_result), Tag für Sub-Agent-Markierung oder Import-Herkunft (`openclaw-import`), SortKey für korrekte Reihenfolge |
|
||||
| `messages` | Einzelne Nachrichten (text, tool_use, tool_result, error, web_search_result), Tag für Sub-Agent-Markierung oder Import-Herkunft (`openclaw-import`), SortKey für korrekte Reihenfolge, thought_signature (Gemini) |
|
||||
| `attachments` | Datei-Anhänge (base64, image/document) |
|
||||
| `archives` | Archivierte Chain-Gruppen |
|
||||
| `agent_skills` | Agent ↔ Skill Zuordnung |
|
||||
@@ -306,7 +311,7 @@ TelegramBot (1) ─── (*) Session (via telegram_bot_id)
|
||||
- `ChainId` – Eindeutige ID
|
||||
- `SessionId` – Zugehörige Session
|
||||
- `AgentId` – Zugehöriger Agent
|
||||
- `Model` – Verwendetes Claude-Modell (z.B. `claude-sonnet-4-6`)
|
||||
- `Model` – Verwendetes Modell (z.B. `claude-sonnet-4-6`, `nvidia:deepseek-ai/deepseek-r1`, `gemini:gemini-2.5-flash`)
|
||||
- `SystemPrompt` – Der vollständige System-Prompt (gespeichert für Nachvollziehbarkeit)
|
||||
- `InputTokens`, `OutputTokens`, `CacheCreationTokens`, `CacheReadTokens` – Token-Verbrauch
|
||||
- `Iterations` – Anzahl der Tool-Loop-Durchläufe
|
||||
@@ -329,6 +334,7 @@ TelegramBot (1) ─── (*) Session (via telegram_bot_id)
|
||||
- `AttachmentNames` – JSON-Array mit Dateinamen
|
||||
- `Tag` – Markierung (`null` = normal, `"preparer"/"review"/"finalizer"` = Sub-Agent-Message (wird aus API-History gefiltert), `"openclaw-import"` = importierte Nachricht (wird immer in History einbezogen))
|
||||
- `IsMarked` – Als wichtig markierte Nachricht (wird in System-Prompt aufgenommen)
|
||||
- `ThoughtSignature` – Gemini thought_signature (für Gemini-Tool-Calls, wird im nächsten Request zurückgesendet)
|
||||
- `DeletedOn` – Soft-Delete Zeitstempel
|
||||
|
||||
**SessionWithStats** – Erweitertes Session-Objekt für Listen-Endpunkt:
|
||||
@@ -361,7 +367,7 @@ Initialisierungsreihenfolge:
|
||||
AuthService → DatabaseService → EnsureDefaultUser
|
||||
→ ImageService, StreamingTracker, MemoryService, SkillService
|
||||
→ ToolService → ChatService
|
||||
→ AnthropicService → TelegramService → KreaService
|
||||
→ AnthropicService → OpenAiService (+ LoadModelsAsync) → TelegramService → KreaService
|
||||
→ CronjobService (BackgroundService)
|
||||
```
|
||||
|
||||
@@ -373,6 +379,7 @@ AuthService → DatabaseService → EnsureDefaultUser
|
||||
| `AuthService` | Singleton | Token-Erzeugung/-Validierung, Passwort-Hashing (SHA256) |
|
||||
| `ChatService` | Singleton | Chat-Kontext aufbauen, History aus DB rekonstruieren |
|
||||
| `AnthropicService` | Singleton | Claude API Kommunikation (Streaming SSE + Non-Streaming) |
|
||||
| `OpenAiService` | Singleton | OpenAI-kompatible Provider (Nvidia, Pollinations, Gemini) mit Tool-Calling, Streaming, Modell-Caching |
|
||||
| `ToolService` | Singleton | Tool-Definitionen bereitstellen, Tool-Aufrufe ausführen |
|
||||
| `WorkspaceHelper` | Static | Workspace-Pfad-Auflösung (relativ → absolut), Path-Traversal-Schutz |
|
||||
| `SystemPromptBuilder` | Static | Modularer System-Prompt aus konfigurierbaren Blöcken + Reminder-Generierung |
|
||||
@@ -406,6 +413,7 @@ Alle Endpoints folgen dem **Minimal API**-Pattern mit Extension Methods (`MapXxx
|
||||
| **Settings** | `/api/settings` | `GET`, `PUT` |
|
||||
| **Backup** | `/api/backup` | `POST` (Admin only, tar.gz Download) |
|
||||
| **Shared** | `/api/shared/`, `/api/messages/{id}/share` | Share erstellen, öffentlich abrufen, auflisten, löschen |
|
||||
| **Models** | `/api/models/` | `GET nvidia`, `GET pollinations`, `GET gemini`, `POST refresh` |
|
||||
| **Info** | `/api/info` | `GET` (Build-Zeitstempel) |
|
||||
| **ServerSettings** | `/api/admin/server-settings` | `GET`, `PUT` (Admin-only, liest/schreibt `appsettings.Production.json`) |
|
||||
|
||||
@@ -515,6 +523,41 @@ CSS ist in modulare Dateien aufgeteilt mit CSS Custom Properties für Theming:
|
||||
|
||||
---
|
||||
|
||||
## Multi-Provider-System (OpenAI-kompatibel)
|
||||
|
||||
Neben Anthropic Claude unterstützt Gott drei **OpenAI-kompatible Provider**. Der Agent-Model-String bestimmt den Provider:
|
||||
|
||||
| Prefix | Provider | Base-URL | API-Key |
|
||||
|--------|----------|----------|---------|
|
||||
| (kein) | Anthropic Claude | `api.anthropic.com` | `AnthropicToken` |
|
||||
| `nvidia:` | Nvidia (g4f.space Proxy) | `g4f.space/api/nvidia/v1` | keiner |
|
||||
| `pollinations:` | Pollinations | `text.pollinations.ai/openai` | keiner |
|
||||
| `gemini:` | Google Gemini | `generativelanguage.googleapis.com/v1beta/openai` | `GeminiApiKey` |
|
||||
|
||||
### Model-String-Format
|
||||
|
||||
`provider:model-id` – z.B. `nvidia:deepseek-ai/deepseek-r1`, `gemini:gemini-2.5-flash`, `pollinations:openai-fast`
|
||||
|
||||
### Modell-Caching
|
||||
|
||||
Beim Server-Start werden verfügbare Modelle von den Provider-APIs geladen und in `data/models_cache.json` gecacht. Bei nachfolgenden Starts wird der Cache verwendet (kein API-Call). Manueller Refresh via `POST /api/models/refresh`.
|
||||
|
||||
### OpenAiService
|
||||
|
||||
`OpenAiService` implementiert:
|
||||
- **Streaming via SSE** (OpenAI-Format: `choices[0].delta`)
|
||||
- **Tool-Calling** (identische Tools wie AnthropicService)
|
||||
- **Agentic Loop** (Tool-Results → nächste Iteration)
|
||||
- **Gemini thought_signature** – wird aus `extra_content.google.thought_signature` gelesen, in DB persistiert (`MessageRecord.ThoughtSignature`), und beim History-Rebuild in `extra_content.google.thought_signature` zurückgesendet
|
||||
|
||||
### Routing
|
||||
|
||||
`ChatService.ResolveModelId()` prüft den Model-String:
|
||||
- Enthält `:` mit bekanntem Provider-Prefix → `OpenAiService.StreamChat()`
|
||||
- Sonst → `AnthropicService.StreamChat()`
|
||||
|
||||
---
|
||||
|
||||
## Chat-Pipeline
|
||||
|
||||
Der Chat-Flow von User-Input bis zur gerenderten Antwort:
|
||||
@@ -528,9 +571,9 @@ Der Chat-Flow von User-Input bis zur gerenderten Antwort:
|
||||
a) User-Message + Attachments in DB speichern
|
||||
b) ChatService.PrepareContext() → Agent, Model, System-Prompt, Chain
|
||||
c) ChatService.BuildHistoryFromDb() → vollständige Message-History
|
||||
d) AnthropicService.StreamChat() starten
|
||||
d) Model-Routing: Anthropic → AnthropicService.StreamChat(), OpenAI-Provider (nvidia:/pollinations:/gemini:) → OpenAiService.StreamChat()
|
||||
↓
|
||||
4. AnthropicService (Agentic Loop):
|
||||
4. Agentic Loop (AnthropicService oder OpenAiService):
|
||||
┌─────────────────────────────────────────┐
|
||||
│ while (iterations < maxIterations) │
|
||||
│ → Claude API Request (SSE) │
|
||||
@@ -1602,7 +1645,8 @@ Die Anwendung ist als systemd-Service konfiguriert und läuft standardmäßig au
|
||||
"PayloadLogging": false, // API-Payloads loggen (Debug)
|
||||
"PayloadLoggingGzip": false, // Payload-Logs als .gz komprimieren
|
||||
"KreaToken": "", // Krea API Token (optional)
|
||||
"KreaApiKey": "" // API-Key für Krea-Endpoints ohne User-Auth (optional)
|
||||
"KreaApiKey": "", // API-Key für Krea-Endpoints ohne User-Auth (optional)
|
||||
"GeminiApiKey": "" // Google Gemini API Key (kostenlos via aistudio.google.com/apikey)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
+10
-24
@@ -6,7 +6,7 @@
|
||||
|
||||
## Tech-Stack
|
||||
|
||||
**.NET 10** Minimal API · **SQLite** + Dapper · **Anthropic Claude API** (SSE Streaming) · **Vanilla JS** SPA · **KaTeX** (Math) · **Kestrel** auf Port 19000
|
||||
**.NET 10** Minimal API · **SQLite** + Dapper · **Anthropic Claude API** (SSE Streaming) · **OpenAI-kompatible APIs** (Nvidia, Pollinations, Gemini) · **Vanilla JS** SPA · **KaTeX** (Math) · **Kestrel** auf Port 19000
|
||||
|
||||
---
|
||||
|
||||
@@ -17,7 +17,7 @@ gott/
|
||||
├── Program.cs # Startup, DI, Middleware, Routing
|
||||
├── appsettings.json # Tokens, API-Keys, Limits
|
||||
├── Models/ # Records (reine Daten)
|
||||
├── Services/ # Business-Logic (alle Singletons + WorkspaceHelper)
|
||||
├── Services/ # Business-Logic (alle Singletons + WorkspaceHelper + OpenAiService)
|
||||
├── Endpoints/ # HTTP API (Minimal API MapXxx-Pattern)
|
||||
├── Middleware/ # AuthMiddleware
|
||||
├── Templates/ # Vorlagen für neue Agents (IDENTITY, SOUL, USER)
|
||||
@@ -70,10 +70,10 @@ User 1──* TelegramBot 1──* Session (via telegram_bot_id)
|
||||
|---------|-------|
|
||||
| `users` | Login, DisplayName, IsAdmin, Persona, Settings (JSON), DefaultPath |
|
||||
| `tokens` | Auth-Tokens → User |
|
||||
| `agents` | AI-Agenten (Model, CustomCommands, AutoCommit, UseSoul/Identity/UserInfo/Memory, WebSearch, AllowUserChoice, TaskInstruction, AvatarScale/Offset, AvatarSmall, IsPublic) |
|
||||
| `agents` | AI-Agenten (Model – z.B. `claude-sonnet-4-6` oder `nvidia:model-id`, CustomCommands, AutoCommit, UseSoul/Identity/UserInfo/Memory, WebSearch, AllowUserChoice, TaskInstruction, AvatarScale/Offset, AvatarSmall, IsPublic) |
|
||||
| `sessions` | Chat-Sessions (Description, Image, ImageSmall, Workspace, Context, CustomCommands, TelegramBotId, TelegramChatId, AvatarScale/Offset, PreparerAgentId, ReviewAgentId, MaxReviewIterations, FinalizerAgentId) |
|
||||
| `chains` | Ein Request-Response-Zyklus (Tokens, Timing, Iterations, PlanMode, ToolChoice, ToolNames, StreamErrorInfo, ArchiveId) |
|
||||
| `messages` | Einzelne Nachrichten (text / tool_use / tool_result / error / web_search_result), Tag für Sub-Agent-Markierung oder Import-Herkunft (`openclaw-import`) |
|
||||
| `messages` | Einzelne Nachrichten (text / tool_use / tool_result / error / web_search_result), Tag für Sub-Agent-Markierung oder Import-Herkunft (`openclaw-import`), thought_signature (Gemini) |
|
||||
| `attachments` | Base64-Anhänge (Bilder, Dokumente) |
|
||||
| `archives` | Archivierte Chain-Gruppen |
|
||||
| `cronjobs` | Geplante Tasks (Cron-Expression + Prompt) |
|
||||
@@ -103,6 +103,7 @@ User 1──* TelegramBot 1──* Session (via telegram_bot_id)
|
||||
| Settings | `/api/settings` | GET, PUT (JSON blob) |
|
||||
| Backup | `/api/backup` | POST → tar.gz download (Admin) |
|
||||
| Shared | `/api/shared/`, `/api/messages/{id}/share` | Share erstellen, öffentlich abrufen, löschen |
|
||||
| Models | `/api/models/` | `GET nvidia`, `GET pollinations`, `GET gemini`, `POST refresh` |
|
||||
| Info | `/api/info` | GET → Build-Zeitstempel |
|
||||
| ServerSettings | `/api/admin/server-settings` | `GET`, `PUT` (Admin-only, liest/schreibt `appsettings.Production.json`) |
|
||||
|
||||
@@ -116,6 +117,7 @@ User 1──* TelegramBot 1──* Session (via telegram_bot_id)
|
||||
| **AuthService** | Token-Auth, Passwort-Hashing (SHA256) |
|
||||
| **ChatService** | Chat-Kontext aufbauen, History aus DB laden |
|
||||
| **AnthropicService** | Claude API: SSE Streaming + Non-Streaming |
|
||||
| **OpenAiService** | OpenAI-kompatible Provider (Nvidia, Pollinations, Gemini) mit Tool-Calling, Streaming, Modell-Caching |
|
||||
| **ToolService** | Tool-Definitionen + Ausführung (13 Tools) |
|
||||
| **WorkspaceHelper** | Workspace-Pfad-Auflösung (relativ → absolut), Path-Traversal-Schutz (static) |
|
||||
| **SystemPromptBuilder** | System-Prompt aus modularen Blöcken zusammenbauen + Reminder-Generierung (static) |
|
||||
@@ -262,27 +264,11 @@ Verwaltung über **Admin-UI** (`#/server-settings`): Liest `appsettings.Producti
|
||||
|
||||
## Deployment
|
||||
|
||||
**WICHTIG:** Das Deployment ist ein **manueller Vorgang**, der durch den Benutzer auf dem Server durchgeführt werden muss. Das System führt kein automatisches Deployment durch.
|
||||
```bash
|
||||
./deploy.sh # dotnet publish → systemctl restart gott
|
||||
```
|
||||
|
||||
### Goldene Regel für Änderungen
|
||||
* **Arbeiten Sie AUSSCHLIESSLICH im Verzeichnis `wwwroot/`** für Frontend-Änderungen.
|
||||
* **Editiere NIEMALS Dateien in `Build/*/publish/wwwroot/`!** Diese Verzeichnisse werden bei jedem Build überschrieben.
|
||||
* Das Verzeichnis `Build/*/publish/data/gott.db` darf niemals manuell gelöscht, geleert oder direkt modifiziert werden.
|
||||
|
||||
### Deployment-Vorgang (Beispiel für Linux)
|
||||
Das vorhandene Shell-Skript `deploy.sh` dient lediglich als Hilfestellung für den manuellen Prozess:
|
||||
|
||||
1. **Frontend-Anpassungen vornehmen** (in `wwwroot/`).
|
||||
2. **Manuelles Deployment** auf dem Server ausführen:
|
||||
```bash
|
||||
# Beispiel-Ablauf:
|
||||
systemctl stop gott
|
||||
dotnet publish -c Release -o Build/Linux/publish
|
||||
systemctl start gott
|
||||
```
|
||||
|
||||
### systemd
|
||||
Die Anwendung ist als systemd-Service konfiguriert und läuft standardmäßig auf Port 19000.
|
||||
Läuft als `systemd`-Service, Kestrel auf konfigurierbarem Port (Default 19000), typisch hinter Nginx/Caddy Reverse Proxy.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# // gott
|
||||
|
||||
Self-hosted AI-Coding-Agent auf Basis der Anthropic Claude API. Stellt eine Web-UI bereit, über die man in Sessions mit konfigurierbaren Agenten chatten kann. Die Agenten haben Tool-Zugriff (Dateien lesen/schreiben/bearbeiten, Shell-Befehle ausführen, Suchen, Todos, Memory) auf ein definiertes Workspace-Verzeichnis.
|
||||
Self-hosted AI-Coding-Agent mit **Anthropic Claude API** als Haupt-Provider sowie **OpenAI-kompatiblen Providern** (Nvidia, Pollinations, Google Gemini). Stellt eine Web-UI bereit, über die man in Sessions mit konfigurierbaren Agenten chatten kann. Die Agenten haben Tool-Zugriff (Dateien lesen/schreiben/bearbeiten, Shell-Befehle ausführen, Suchen, Todos, Memory) auf ein definiertes Workspace-Verzeichnis.
|
||||
|
||||
---
|
||||
|
||||
@@ -15,6 +15,7 @@ Self-hosted AI-Coding-Agent auf Basis der Anthropic Claude API. Stellt eine Web-
|
||||
- **Interaktive Rückfragen** – `ask_user_choice`-Tool: Agent stellt dem User klickbare Auswahlmöglichkeiten
|
||||
- **Plan-Modus** – Read-only-Modus zum Analysieren und Planen ohne Änderungen (Toggle im Chat)
|
||||
- **Web-Search** – Integrierte Web-Suche mit Quellenangaben (URLs + Titel) in Chat und geteilten Nachrichten
|
||||
- **Multi-Provider** – Anthropic Claude (Haupt-Provider), Nvidia (g4f.space), Pollinations (kostenlos), Google Gemini (kostenloser Free Tier)
|
||||
- **13 Tools** – `read_file`, `write_file`, `edit_file`, `list_files`, `delete_file`, `execute`, `glob`, `grep`, `todo_write`, `memory_read`, `memory_write`, `memory_list`, `ask_user_choice`
|
||||
- **Streaming** – Echtzeit-Antworten via Server-Sent Events (SSE)
|
||||
- **Stop-Button** – Laufende Requests zuverlässig abbrechen (inkl. laufender Shell-Befehle)
|
||||
@@ -38,7 +39,7 @@ Self-hosted AI-Coding-Agent auf Basis der Anthropic Claude API. Stellt eine Web-
|
||||
|---------|-------------|
|
||||
| **Backend** | .NET 10 Minimal API, C# |
|
||||
| **Datenbank** | SQLite + Dapper |
|
||||
| **AI** | Anthropic Claude API (SSE Streaming) |
|
||||
| **AI** | Anthropic Claude API + OpenAI-kompatible APIs (Nvidia, Pollinations, Gemini) |
|
||||
| **Frontend** | Vanilla JS SPA (kein Framework), CSS Variables |
|
||||
| **Mathe** | KaTeX (LaTeX-Rendering) |
|
||||
| **Bilder** | SixLabors.ImageSharp |
|
||||
@@ -51,6 +52,7 @@ Self-hosted AI-Coding-Agent auf Basis der Anthropic Claude API. Stellt eine Web-
|
||||
|
||||
- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
|
||||
- Anthropic API Key ([console.anthropic.com](https://console.anthropic.com/))
|
||||
- Optional: Gemini API Key ([aistudio.google.com](https://aistudio.google.com/apikey)) – kostenlos, kein Billing nötig
|
||||
- Linux/macOS/Windows (Produktiv: Linux empfohlen)
|
||||
|
||||
## Konfiguration
|
||||
@@ -65,7 +67,8 @@ Beim ersten Start wird `appsettings.json` mit Standardwerten verwendet. Für eig
|
||||
"PayloadLogging": false,
|
||||
"PayloadLoggingGzip": false,
|
||||
"KreaToken": "",
|
||||
"KreaApiKey": ""
|
||||
"KreaApiKey": "",
|
||||
"GeminiApiKey": ""
|
||||
}
|
||||
```
|
||||
|
||||
@@ -78,6 +81,7 @@ Beim ersten Start wird `appsettings.json` mit Standardwerten verwendet. Für eig
|
||||
| `PayloadLoggingGzip` | Payload-Logs als .gz komprimieren | `false` |
|
||||
| `KreaToken` | Krea AI API Token (optional) | – |
|
||||
| `KreaApiKey` | API-Key für Krea-Endpoints ohne User-Auth (optional) | – |
|
||||
| `GeminiApiKey` | Google Gemini API Key (kostenlos via [aistudio.google.com](https://aistudio.google.com/apikey)) | – |
|
||||
|
||||
> **Hinweis:** Die `appsettings.Production.json` wird **nicht** beim `dotnet publish` mitkopiert. Sie lebt ausschließlich im `Build/Linux/publish/`-Verzeichnis und kann über die Admin-UI (`#/server-settings`) verwaltet werden.
|
||||
|
||||
|
||||
Reference in new issue
Block a user