{ "widgettype":"VBox", "options":{ "height":"100%" }, "subwidgets":[ { "widgettype":"Filler", "options":{}, "subwidgets":[ { "widgettype":"Form", "id":"form", "options":{ "title":"流式返回", "submit_url":"{{entire_url('/api/infer_stream')}}", "fields":[ { "name":"speaker", "label":"播音员", "uitype":"code", "value":"main", "dataurl":"{{entire_url('/get_speakers.dspy')}}" }, { "name":"prompt", "label":"文本", "uitype":"text", "uiparams":{ "rows":20, "cols":80 } } ] } } ] }, { "id":"audio", "widgettype":"AudioPlayer", "options":{ "height":"40px", "auto_play":true } } ], "binds":[ { "wid":"form", "event":"submited", "actiontype":"script", "target":"audio", "script":"console.log('this=', this, event);this.set_stream_urls(event.params)" } ] }