163 lines
6.5 KiB
Twig
163 lines
6.5 KiB
Twig
{% extends 'admin/base.html.twig' %}
|
|
|
|
{% block title %}KI Modell-Generierung{% endblock %}
|
|
|
|
{% block body %}
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1 class="h3 mb-0">KI Modell-Generierung</h1>
|
|
|
|
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
|
<a href="{{ path('admin_model_config_create') }}"
|
|
class="btn btn-sm btn-outline-info">
|
|
Neue Konfiguration
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="card bg-black border-secondary">
|
|
<div class="card-body p-0">
|
|
|
|
<table class="table table-dark table-striped table-hover align-middle mb-0">
|
|
<thead class="table-secondary text-dark">
|
|
<tr>
|
|
<th>Modell</th>
|
|
<th>Version</th>
|
|
<th>Stream</th>
|
|
<th>Sampling</th>
|
|
<th class="text-warning">Retrieval</th>
|
|
<th>Status</th>
|
|
<th class="text-end">Aktionen</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
{% for config in configs %}
|
|
|
|
<tr>
|
|
<td>
|
|
<span class="text-info">{{ config.modelName }}</span>
|
|
</td>
|
|
|
|
<td>v{{ config.version }}</td>
|
|
|
|
<td>
|
|
{% if config.stream %}
|
|
<span class="badge bg-info text-dark">Streaming</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">Blocking</span>
|
|
{% endif %}
|
|
</td>
|
|
|
|
{# ========================= #}
|
|
{# Sampling Group #}
|
|
{# ========================= #}
|
|
<td>
|
|
<div class="small">
|
|
<div><strong>T:</strong> {{ config.temperature }}</div>
|
|
<div><strong>K:</strong> {{ config.topK }}</div>
|
|
<div><strong>P:</strong> {{ config.topP }}</div>
|
|
<div><strong>R:</strong> {{ config.repeatPenalty }}</div>
|
|
<div><strong>Ctx:</strong> {{ config.numCtx }}</div>
|
|
</div>
|
|
</td>
|
|
|
|
{# ========================= #}
|
|
{# Retrieval Group #}
|
|
{# ========================= #}
|
|
<td class="text-warning">
|
|
<div class="small">
|
|
<div><strong>Chunks:</strong> {{ config.retrievalMaxChunks }}</div>
|
|
<div><strong>VectorK:</strong> {{ config.retrievalVectorTopK }}</div>
|
|
</div>
|
|
</td>
|
|
|
|
<td>
|
|
{% if config.active %}
|
|
<span class="badge bg-success">Aktiv</span>
|
|
{% else %}
|
|
<span class="badge bg-dark border border-secondary">
|
|
Inaktiv
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
|
|
<td class="text-end">
|
|
<a href="{{ path('admin_model_config_test_retrieval', {id: config.id}) }}"
|
|
class="btn btn-sm btn-outline-warning me-1">
|
|
Test Retrieval
|
|
</a>
|
|
|
|
{% if not config.active and is_granted('ROLE_SUPER_ADMIN') %}
|
|
|
|
<form method="post"
|
|
action="{{ path('admin_model_config_activate', {id: config.id}) }}"
|
|
class="d-inline"
|
|
onsubmit="return confirm('Diese Konfiguration aktivieren?');">
|
|
|
|
<input type="hidden"
|
|
name="_token"
|
|
value="{{ csrf_token('activate_model_config_' ~ config.id) }}">
|
|
|
|
<button class="btn btn-sm btn-outline-success me-1">
|
|
Aktivieren
|
|
</button>
|
|
</form>
|
|
|
|
<form method="post"
|
|
action="{{ path('admin_model_config_delete', {id: config.id}) }}"
|
|
class="d-inline"
|
|
onsubmit="return confirm('Konfiguration wirklich löschen?');">
|
|
|
|
<input type="hidden"
|
|
name="_token"
|
|
value="{{ csrf_token('delete_model_config_' ~ config.id) }}">
|
|
|
|
<button class="btn btn-sm btn-outline-danger">
|
|
Löschen
|
|
</button>
|
|
</form>
|
|
|
|
{% else %}
|
|
<span class="text-secondary small">—</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="7" class="text-center text-secondary py-4">
|
|
Keine Konfiguration vorhanden.
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-4 mb-4 small text-secondary">
|
|
Hinweis: Änderungen wirken sich unmittelbar auf die Generierungsparameter
|
|
des aktiven Modells aus. Pro Modell kann nur eine Version aktiv sein.
|
|
</div>
|
|
|
|
<h2 class="h4 mb-4">Agent Live Test</h2>
|
|
|
|
<div class="card bg-black border-info">
|
|
<div class="card-body p-0">
|
|
<iframe
|
|
src="/index.html?admin_test=1"
|
|
class="w-100 border-0"
|
|
style="height:75vh;"
|
|
></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-3 small text-secondary">
|
|
Der Agent läuft im isolierten Admin-Test-Modus.
|
|
Keine Persistenz. Keine produktive Session.
|
|
</div>
|
|
|
|
{% endblock %} |