feat: text completion playground

This commit is contained in:
Timothy J. Baek 2024-03-02 03:01:44 -08:00
parent 9b86e0bb41
commit 2379e94cbf
5 changed files with 336 additions and 10 deletions

View file

@ -79,14 +79,18 @@
throw data;
}
if (data.done == false) {
if (prompt == '' && data.response == '\n') {
continue;
} else {
prompt += data.response;
console.log(data.response);
chatInputElement.scrollTop = chatInputElement.scrollHeight;
await tick();
if ('id' in data) {
console.log(data);
} else {
if (data.done == false) {
if (prompt == '' && data.response == '\n') {
continue;
} else {
prompt += data.response;
console.log(data.response);
chatInputElement.scrollTop = chatInputElement.scrollHeight;
await tick();
}
}
}
}