37 lines
2.6 KiB
HTML
37 lines
2.6 KiB
HTML
<form method="post" action="/admin/models" class="stack stack-sm">
|
|
<input type="hidden" name="_csrf" value="{{ p.csrf }}">
|
|
{% if model %}<input type="hidden" name="model_id" value="{{ model.id }}">{% endif %}
|
|
<div class="form-group">
|
|
<label>Endpunkt
|
|
<select name="provider_id">{% for pr in providers %}<option value="{{ pr.id }}" {% if model and model.provider_id == pr.id %}selected{% endif %}>{{ pr.name }}</option>{% endfor %}</select>
|
|
</label>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Modellname (wie die API ihn erwartet)
|
|
<input name="name" required value="{{ model.name if model else 'gpt-6-luna' }}">
|
|
</label>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Anzeigename <input name="label" value="{{ model.label if model else '' }}" placeholder="z. B. GPT-6 Luna"></label>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Modellklasse
|
|
<select name="model_class">{% for c in classes %}<option {% if model and model.model_class == c %}selected{% endif %}>{{ c }}</option>{% endfor %}</select>
|
|
</label>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Kontextgröße (Tokens) <input name="context_window" type="number" min="1000" value="{{ model.context_window if model else 128000 }}"></label>
|
|
</div>
|
|
<fieldset class="stack stack-sm">
|
|
<legend class="text-sm">Preise je 1 Mio. Tokens ({{ currency }}, optional, für die Kostenübersicht)</legend>
|
|
<div class="cluster">
|
|
<label class="text-sm">Eingabe <input name="input_price" inputmode="decimal" size="8" value="{{ model.input_price if model and model.input_price is not none else '' }}"></label>
|
|
<label class="text-sm">Eingabe aus Cache <input name="cached_price" inputmode="decimal" size="8" value="{{ model.cached_price if model and model.cached_price is not none else '' }}"></label>
|
|
<label class="text-sm">Ausgabe <input name="output_price" inputmode="decimal" size="8" value="{{ model.output_price if model and model.output_price is not none else '' }}"></label>
|
|
</div>
|
|
</fieldset>
|
|
<label class="cluster"><input type="checkbox" name="supports_tools" value="1" {% if not model or model.supports_tools %}checked{% endif %}> Tool Calling</label>
|
|
<label class="cluster"><input type="checkbox" name="supports_reasoning" value="1" {% if model and model.supports_reasoning %}checked{% endif %}> Reasoning (verschlüsselte Reasoning-Elemente zurückgeben)</label>
|
|
<label class="cluster"><input type="checkbox" name="active" value="1" {% if not model or model.active %}checked{% endif %}> aktiv (für Workspaces wählbar)</label>
|
|
<button class="btn btn-primary btn-sm" type="submit">{{ 'Speichern' if model else 'Hinzufügen' }}</button>
|
|
</form>
|