113 lines
4.3 KiB
XML
113 lines
4.3 KiB
XML
{% set providerid = params_kw.get('providerid', '') %}
|
|
{% set catelogid = params_kw.get('catelogid', '') %}
|
|
{% set search = params_kw.get('search', '') %}
|
|
{% set data = get_plaza_models(providerid, catelogid, search) %}
|
|
{% set ns = namespace(first=true) %}
|
|
{
|
|
"widgettype": "VScrollPanel",
|
|
"options": {
|
|
"css": "filler",
|
|
"width": "100%",
|
|
"height": "100%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "DynamicColumn",
|
|
"options": {
|
|
"css": "plaza-grid",
|
|
"width": "100%",
|
|
"col_cwidth": 25,
|
|
"col_cgap": 1
|
|
},
|
|
"subwidgets": [
|
|
{% for llm in data %}
|
|
{% if not ns.first %},{% endif %}
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"css": "card plaza-card",
|
|
"cwidth": 15,
|
|
"cheight": 12
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {"cheight": 2},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Svg",
|
|
"options": {"rate": 1.5, "url": "{{entire_url('/appbase/show_icon.dspy')}}?id={{llm.iconid}}"}
|
|
},
|
|
{
|
|
"widgettype": "Title6",
|
|
"options": {"text": "{{llm.name}}"}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VScrollPanel",
|
|
"options": {"css": "card-body-scroll", "flex": "1"},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"height": "auto",
|
|
"text": {{json.dumps(llm.description, ensure_ascii=False)}},
|
|
"wrap": true,
|
|
"halign": "left"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {"css": "filler", "cheight": 4},
|
|
"subwidgets": [
|
|
{% set pricing_text = llm.pricing_display %}
|
|
{% if type(pricing_text) == type("") %}
|
|
{% set pricing_text = [pricing_text] %}
|
|
{% endif %}
|
|
{% for pt in pricing_text %}
|
|
{
|
|
"widgettype": "Text",
|
|
"options": {
|
|
"text": {{json.dumps(pt, ensure_ascii=False)}},
|
|
"wrap": true,
|
|
"halign": "left",
|
|
"css": "pricing-text"
|
|
}
|
|
}{% if not loop.last %},{% endif %}
|
|
{% endfor %}
|
|
]
|
|
}
|
|
],
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "{{llm.name}}",
|
|
{% if int(params_kw._is_mobile or 0) %}
|
|
"width": "100%",
|
|
"height": "100%"
|
|
{% else %}
|
|
"width": "40%",
|
|
"height": "85%"
|
|
{% endif %}
|
|
},
|
|
"options": {
|
|
"params": {"id": "{{llm.id}}"},
|
|
"url": "{{entire_url('./llm_dialog.ui')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
{% set ns.first = false %}
|
|
{% endfor %}
|
|
]
|
|
}
|
|
]
|
|
}
|