89 lines
1.6 KiB
XML
89 lines
1.6 KiB
XML
{
|
|
"widgettype":"VBox",
|
|
"options":{
|
|
"width":"100%",
|
|
"height":"100%"
|
|
},
|
|
"subwidgets":[
|
|
{
|
|
"widgettype":"Filler",
|
|
"options":{},
|
|
"subwidgets":[
|
|
{
|
|
"id":"dialog",
|
|
"widgettype":"LlmDialog",
|
|
"options":{
|
|
"models":[
|
|
{
|
|
"url":"{{entire_url('llm/ollama_local.llm')}}",
|
|
"icon":"{{entire_url('imgs/ollama.png')}}",
|
|
"mapi":"chat",
|
|
"model":"llama2:7b"
|
|
},
|
|
{
|
|
"url":"{{entire_url('llm/moonshot.llm')}}",
|
|
"icon":"{{entire_url('imgs/moonshot.png')}}",
|
|
"mapi":"chat",
|
|
"model":"moonshot-v1-8k"
|
|
},
|
|
{
|
|
"url":"{{entire_url('llm/zhipuai.llm')}}",
|
|
"icon":"{{entire_url('imgs/zhipu.png')}}",
|
|
"mapi":"chat",
|
|
"model":"GLM-4"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype":"HBox",
|
|
"options":{
|
|
"cheight":5
|
|
},
|
|
"subwidgets":[
|
|
{
|
|
"id":"prompt",
|
|
"widgettype":"UiAudioText",
|
|
"options":{
|
|
"css":"filler",
|
|
"upload_url":"https://sage.opencomputing.cn/stt/generate",
|
|
"name":"prompt"
|
|
}
|
|
},
|
|
{
|
|
"widgettype":"IconBar",
|
|
"id":"prompt_bar",
|
|
"options":{
|
|
"tools":[
|
|
{
|
|
"name":"submit",
|
|
"icon":"{{entire_url('imgs/submit.png')}}"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"binds":[
|
|
{
|
|
"wid":"prompt_bar",
|
|
"event":"submit",
|
|
"actiontype":"script",
|
|
"target":"dialog",
|
|
"script":"console.log(arguments); this.set_prompt(params.prompt);",
|
|
"datawidget":"prompt",
|
|
"datamethod":"getValue"
|
|
},
|
|
{
|
|
"wid":"prompt_bar",
|
|
"event":"submit",
|
|
"actiontype":"script",
|
|
"target":"prompt",
|
|
"script":"this.setValue('')"
|
|
}
|
|
]
|
|
}
|