llmage/wwwroot/llm_dialog.ui
2026-05-21 13:19:48 +08:00

77 lines
1.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% if get_user() %}
{% set userid = get_user() %}
{% set userorgid = get_userorgid() %}
{% if params_kw.id %}
{% if checkCustomerBalance(params_kw.id, userid, userorgid) %}
{% set llm = get_llm(params_kw.id) %}
{% set kdbs = get_user_kdbs(request) %}
{% if llm %}
{
"widgettype":"LlmIO",
"options":{
"width":"100%",
"height":"100%",
"title":"{{llm.name}}",
{% if len(kdbs) > 0 %}
"enabled_kdb": true,
"kdb_setting":{},
"get_kdb_url": "{{entire_url('/rag/get_my_kdbs.dspy')}}",
{% endif %}
"list_models_url":"{{entire_url('list_paging_catelog_llms.dspy')}}",
"estimate_url":"{{entire_url('model_estimate.dspy')}}",
"input_fields":{{llm.input_fields}},
"models":[
{
"llmid":"{{llm.id}}",
"response_mode": "{{llm.stream}}",
"icon":"{{entire_url('/appbase/show_icon.dspy')}}?id={{llm.iconid}}",
"url":"{{entire_url('/llmage/llminference.dspy')}}",
{% if llm.stream == 'stream' %}
"stream": true,
{% endif %}
{% if llm.stream =='async' %}
"query_url": "{{entire_url('/llmage/tasks')}}",
{% endif %}
"model":"{{llm.model}}",
"modelname":"{{llm.name}}"
}
]
}
}
{% else %}
{
"widgettype":"Text",
"options":{
"otext": "没找到模型",
"i18n":true
}
}
{% endif %}
{% else %}
{
"widgettype":"Text",
"options":{
"otext":"Not enrogh balance to use llm",
"i18n":true
}
}
{% endif %}
{% else %}
{
"widgettype":"Text",
"options":{
"otext":"无效的参数未找到模型ID",
"i18n":true
}
}
{% endif %}
{% else %}
{
"widgettype":"Text",
"options":{
"otext":"You need login to use llm",
"i18n":true
}
}
{% endif %}