52 lines
2.2 KiB
HTML
52 lines
2.2 KiB
HTML
|
|
{% extends "base.html" %}
|
||
|
|
{% block title %}Playground — Gogo Admin{% endblock %}
|
||
|
|
{% block nav %}{% include "admin/_nav.html" %}{% endblock %}
|
||
|
|
{% block content %}
|
||
|
|
<h1>Test playground (§11)</h1>
|
||
|
|
<p class="muted">Tekstualni razgovor s asistentom pojedinog salona — koristi njegov sastavljeni
|
||
|
|
prompt, usluge i provajdera termina. Zahtjevi kreirani ovdje se <b>zaista</b> šalju (koristite
|
||
|
|
demo salon za igranje).</p>
|
||
|
|
|
||
|
|
<div class="card">
|
||
|
|
<form method="post" action="/admin/playground">
|
||
|
|
<label>Salon</label>
|
||
|
|
<select name="tenant_id" {{ 'disabled' if history_json != '[]' }}>
|
||
|
|
{% for tn in tenants %}
|
||
|
|
<option value="{{ tn.id }}" {{ 'selected' if selected_tenant and tn.id==selected_tenant.id }}>{{ tn.name }} ({{ tn.scheduling_provider }})</option>
|
||
|
|
{% endfor %}
|
||
|
|
</select>
|
||
|
|
{% if history_json != '[]' %}<input type="hidden" name="tenant_id" value="{{ selected_tenant.id }}">{% endif %}
|
||
|
|
<label>Kanal</label>
|
||
|
|
<select name="channel">
|
||
|
|
<option value="voice" {{ 'selected' if channel=='voice' }}>voice (telefon)</option>
|
||
|
|
<option value="chat" {{ 'selected' if channel=='chat' }}>chat</option>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
{% if transcript %}
|
||
|
|
<div class="transcript" style="margin:16px 0">
|
||
|
|
{% for t in transcript %}
|
||
|
|
<div class="t {{ t.role }}">{{ t.text }}</div>
|
||
|
|
{% if t.tool_calls %}<div class="tools">⚙ {% for tc in t.tool_calls %}{{ tc.name }}({{ tc.input | tojson }}) {% endfor %}</div>{% endif %}
|
||
|
|
{% endfor %}
|
||
|
|
</div>
|
||
|
|
{% endif %}
|
||
|
|
|
||
|
|
<input type="hidden" name="history" value="{{ history_json | e }}">
|
||
|
|
<label>Poruka klijenta</label>
|
||
|
|
<input type="text" name="message" placeholder="npr. Htjela bih zakazati šišanje u srijedu" autofocus>
|
||
|
|
<div style="margin-top:12px">
|
||
|
|
<button>Pošalji</button>
|
||
|
|
<a class="btn ghost" href="/admin/playground">Novi razgovor</a>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
{% if error %}<div class="msg error" style="margin-top:12px">{{ error }}</div>{% endif %}
|
||
|
|
</div>
|
||
|
|
|
||
|
|
{% if system_prompt %}
|
||
|
|
<details class="card">
|
||
|
|
<summary style="cursor:pointer;font-weight:600">Sastavljeni system prompt</summary>
|
||
|
|
<pre style="white-space:pre-wrap">{{ system_prompt }}</pre>
|
||
|
|
</details>
|
||
|
|
{% endif %}
|
||
|
|
{% endblock %}
|