bugfix
This commit is contained in:
parent
5da4f203c4
commit
5fd801d5b9
@ -79,21 +79,21 @@ bricks.LlmModel = class {
|
||||
messages:this.messages,
|
||||
mapi:this.mapi,
|
||||
prompt:prompt,
|
||||
model:this.model
|
||||
model:this.opts.model
|
||||
}
|
||||
} else {
|
||||
d = bricks.extend({}, data);
|
||||
d.model = this.model;
|
||||
d.model = this.opts.model;
|
||||
}
|
||||
if (this.response_mode == 'stream') {
|
||||
var hr = new bricks.HttpResponseStream();
|
||||
this.set_stream_data();
|
||||
var resp = await hr.post(this.url, {params:d});
|
||||
var resp = await hr.post(this.opts.url, {params:d});
|
||||
await hr.handle_chunk(resp, this.chunk_response.bind(this, mout));
|
||||
this.chunk_ended(mout);
|
||||
} else {
|
||||
var hj = new bricks.HttpJson()
|
||||
var resp = await hj.post(this.url, {params:d});
|
||||
var resp = await hj.post(this.opts.url, {params:d});
|
||||
if (this.response_mode == 'sync'){
|
||||
mout.update_data(resp);
|
||||
if (this.messages){
|
||||
|
Loading…
Reference in New Issue
Block a user