Allow resume of truncated petals completions
This commit is contained in:
parent
8ce425722b
commit
54aac40788
|
@ -156,6 +156,9 @@ export const chatRequest = async (
|
||||||
chatRequest.updatingMessage = ''
|
chatRequest.updatingMessage = ''
|
||||||
const response = JSON.parse(event.data)
|
const response = JSON.parse(event.data)
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
if (response.traceback.includes('Maximum length exceeded')) {
|
||||||
|
return chatResponse.finish('length')
|
||||||
|
}
|
||||||
const err = new Error('Error in response: ' + response.traceback)
|
const err = new Error('Error in response: ' + response.traceback)
|
||||||
console.error(err)
|
console.error(err)
|
||||||
chatResponse.updateFromError(err.message)
|
chatResponse.updateFromError(err.message)
|
||||||
|
|
Loading…
Reference in New Issue