Add models caching and management functionality with corresponding API endpoints and templates

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 13:51:43 +02:00
parent fe32c32726
commit 96d13fc440
9 changed files with 534 additions and 8 deletions
@@ -4,6 +4,13 @@ AI{% endblock %} {% block content %}
<h1>Text Generation</h1>
<form method="post">
<label for="model">Model</label>
{% if models %}
<select id="model" name="model" required>
{% for m in models %}
<option value="{{ m.id }}" {% if request.form.get('model', '') == m.id %}selected{% endif %}>{{ m.name }}</option>
{% endfor %}
</select>
{% else %}
<input
id="model"
name="model"
@@ -12,6 +19,7 @@ AI{% endblock %} {% block content %}
placeholder="e.g. openai/gpt-4o"
value="{{ request.form.get('model', '') }}"
/>
{% endif %}
<label for="prompt">Prompt</label>
<textarea