feat: OpenAI-kompatibler Provider (Nvidia/g4f.space) mit Tool-Calling und SSE-Streaming

- OpenAiService.cs: Neuer Service für OpenAI-kompatible APIs
  - SSE-Streaming mit text_start/text_delta/text_end Events
  - Tool-Calling: list_files, read_file, write_file, edit_file, delete_file, execute
  - Agentic Loop (max 10 Iterationen)
  - Tool-Use + Tool-Result in DB gespeichert
  - History-Rebuild: Anthropic-Format → OpenAI-Format (tool_use/tool_result korrekt konvertiert)
- ChatContext.cs: Provider-Feld hinzugefügt
- ChatService.cs: OpenAI-Provider-Erkennung in ResolveModelId + PrepareContext
- ChatEndpoint.cs: Provider-Dispatch (nvidia → OpenAiService, sonst → AnthropicService)
- Program.cs: OpenAiService als Singleton registriert
- wwwroot/index.html: nvidia:moonshotai/kimi-k2.5 in Modell-Auswahl
This commit is contained in:
Meleki committed 2026-03-11 16:15:09 +01:00
1 parent a646e695cd
commit 7972ca6a3a
6 files changed
+665 -2

No files matched your search

+3
View File
@@ -191,6 +191,9 @@
<option value="opus-4-5">Opus 4.5</option>
<option value="opus-4-6" selected>Opus 4.6</option>
<option value="haiku-4-5">Haiku 4.5</option>
<optgroup label="Nvidia (via g4f.space)">
<option value="nvidia:moonshotai/kimi-k2.5">Kimi K2.5 (Moonshot)</option>
</optgroup>
</select>
<div class="more">
<a>Weitere Einstellungen</a>