This commit is contained in:
yumoqing 2024-07-17 23:45:38 +08:00
parent 8d4cf14901
commit 0731970918
2 changed files with 9 additions and 4 deletions

View File

@ -24,11 +24,11 @@ bricks.ModelOutput = class extends bricks.HBox {
if (!this.estimate_url) return;
this.estimate_w = new bricks.HBox({width:'100%', cheight:2});
txtw = new bricks.Text({
otext:'希望吗,
otext:'结果满意吗?',
i18n:true,
});
likew = new bricks.Icon({rate:2, url:bricks_resource('imgs/like.png'));
unlikew = new bricks.Icon({rate:2, url:bricks_resource('imgs/unlike.png');
likew = new bricks.Icon({rate:2, url:bricks_resource('imgs/like.png')});
unlikew = new bricks.Icon({rate:2, url:bricks_resource('imgs/unlike.png')});
likew.bind('click', this.estimate_llm.bind(this, 1));
unlike.bind('click', this.estimate_llm.bind(this, -1))
this.estimate_w.add_widget(txtw);
@ -61,8 +61,10 @@ bricks.ModelOutput = class extends bricks.HBox {
this.run = null;
if (data.logid){
this.logid = data.logid;
if (this.estimate_url){
this.estimate_w.show();
}
}
var w = await bricks.widgetBuild(this.output_view, this.llmio, data);
w.set_css('llm_msg');
w.set_css('filler');

View File

@ -36,6 +36,9 @@ bricks.MdWidget = class extends bricks.JsWidget {
bricks.debug('scrollY=', window.scrollY);
}
async build(){
if (! this.opts.md_url){
return;
}
this._build(this.opts.md_url);
}
async _build(md_url){