wip
This commit is contained in:
parent
8f2a5943ee
commit
1cbbc95856
|
@ -43,13 +43,13 @@ function summarizeButtonClick(button) {
|
||||||
return request.onerror(e);
|
return request.onerror(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200 || !response.response || !response.response.output_text) {
|
||||||
return request.onerror(e);
|
return request.onerror(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
container.classList.remove('alert-warning');
|
container.classList.remove('alert-warning');
|
||||||
container.classList.add('alert-success');
|
container.classList.add('alert-success');
|
||||||
container.innerHTML = 'placeholder';
|
container.innerHTML = response.response.output_text.replace('\n', '<br>');
|
||||||
}
|
}
|
||||||
|
|
||||||
request.onerror = function(e) {
|
request.onerror = function(e) {
|
||||||
|
|
Loading…
Reference in New Issue