include agent
This commit is contained in:
@@ -76,8 +76,8 @@ services:
|
|||||||
|
|
||||||
App\Infrastructure\OllamaClient:
|
App\Infrastructure\OllamaClient:
|
||||||
arguments:
|
arguments:
|
||||||
$apiUrl: '%env(OLLAMA_API_URL)%'
|
$apiUrl: '%env(AI_LLM_API_URL)%'
|
||||||
$model: '%env(OLLAMA_MODEL)%'
|
$model: '%env(AI_LLM_MODEL)%'
|
||||||
$timeoutSeconds: 600
|
$timeoutSeconds: 600
|
||||||
$configProvider: '@App\Service\ModelGenerationConfigProvider'
|
$configProvider: '@App\Service\ModelGenerationConfigProvider'
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{% extends 'admin/base.html.twig' %}
|
{% extends 'admin/base.html.twig' %}
|
||||||
|
|
||||||
{% block title %}KI Modell-Generierung Config{% endblock %}
|
{% block title %}KI Modell-Generierung{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
<h1 class="h3">KI Modell-Generierung Config</h1>
|
<h1 class="h3 mb-0">KI Modell-Generierung</h1>
|
||||||
|
|
||||||
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
{% if is_granted('ROLE_SUPER_ADMIN') %}
|
||||||
<a href="{{ path('admin_model_config_create') }}"
|
<a href="{{ path('admin_model_config_create') }}"
|
||||||
@@ -16,7 +17,8 @@
|
|||||||
|
|
||||||
<div class="card bg-black border-secondary">
|
<div class="card bg-black border-secondary">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<table class="table table-dark table-striped table-hover mb-0 align-middle">
|
|
||||||
|
<table class="table table-dark table-striped table-hover align-middle mb-0">
|
||||||
<thead class="table-secondary text-dark">
|
<thead class="table-secondary text-dark">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Modell</th>
|
<th>Modell</th>
|
||||||
@@ -28,14 +30,20 @@
|
|||||||
<th>Repeat</th>
|
<th>Repeat</th>
|
||||||
<th>Ctx</th>
|
<th>Ctx</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th class="text-end">Aktion</th>
|
<th class="text-end">Aktionen</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
{% for config in configs %}
|
{% for config in configs %}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ config.modelName }}</td>
|
<td>
|
||||||
|
<span class="text-info">{{ config.modelName }}</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>v{{ config.version }}</td>
|
<td>v{{ config.version }}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{% if config.stream %}
|
{% if config.stream %}
|
||||||
<span class="badge bg-info text-dark">Streaming</span>
|
<span class="badge bg-info text-dark">Streaming</span>
|
||||||
@@ -43,6 +51,7 @@
|
|||||||
<span class="badge bg-secondary">Blocking</span>
|
<span class="badge bg-secondary">Blocking</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ config.temperature }}</td>
|
<td>{{ config.temperature }}</td>
|
||||||
<td>{{ config.topK }}</td>
|
<td>{{ config.topK }}</td>
|
||||||
<td>{{ config.topP }}</td>
|
<td>{{ config.topP }}</td>
|
||||||
@@ -60,19 +69,32 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
|
|
||||||
{% if not config.active and is_granted('ROLE_SUPER_ADMIN') %}
|
{% if not config.active and is_granted('ROLE_SUPER_ADMIN') %}
|
||||||
|
|
||||||
<a href="{{ path('admin_model_config_activate', {id: config.id}) }}"
|
{# Aktivieren via POST + CSRF #}
|
||||||
class="btn btn-sm btn-outline-success me-2">
|
<form method="post"
|
||||||
Aktivieren
|
action="{{ path('admin_model_config_activate', {id: config.id}) }}"
|
||||||
</a>
|
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-2">
|
||||||
|
Aktivieren
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{# Löschen via POST + CSRF #}
|
||||||
<form method="post"
|
<form method="post"
|
||||||
action="{{ path('admin_model_config_delete', {id: config.id}) }}"
|
action="{{ path('admin_model_config_delete', {id: config.id}) }}"
|
||||||
style="display:inline-block"
|
class="d-inline"
|
||||||
onsubmit="return confirm('Wirklich löschen?');">
|
onsubmit="return confirm('Konfiguration wirklich löschen?');">
|
||||||
|
|
||||||
<input type="hidden" name="_token"
|
<input type="hidden"
|
||||||
|
name="_token"
|
||||||
value="{{ csrf_token('delete_model_config_' ~ config.id) }}">
|
value="{{ csrf_token('delete_model_config_' ~ config.id) }}">
|
||||||
|
|
||||||
<button class="btn btn-sm btn-outline-danger">
|
<button class="btn btn-sm btn-outline-danger">
|
||||||
@@ -80,9 +102,13 @@
|
|||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
<span class="text-secondary small">—</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="10" class="text-center text-secondary py-4">
|
<td colspan="10" class="text-center text-secondary py-4">
|
||||||
@@ -90,13 +116,34 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4 small text-secondary">
|
<div class="mt-4 mb-4 small text-secondary">
|
||||||
Hinweis: Änderungen wirken sich unmittelbar auf die Generierungsparameter
|
Hinweis: Änderungen wirken sich unmittelbar auf die Generierungsparameter
|
||||||
des aktiven Modells aus. Nur eine Konfiguration pro Modell kann aktiv sein.
|
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>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user