mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-04 23:55:20 +02:00
fix as described in https://github.com/kolbytn/mindcraft/issues/306
This commit is contained in:
parent
a6edd8fc44
commit
bd8f911637
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ export class GPT {
|
|||
catch (err) {
|
||||
if ((err.message == 'Context length exceeded' || err.code == 'context_length_exceeded') && turns.length > 1) {
|
||||
console.log('Context length exceeded, trying again with shorter context.');
|
||||
return await sendRequest(turns.slice(1), systemMessage, stop_seq);
|
||||
return await this.sendRequest(turns.slice(1), systemMessage, stop_seq);
|
||||
} else {
|
||||
console.log(err);
|
||||
res = 'My brain disconnected, try again.';
|
||||
|
|
Loading…
Add table
Reference in a new issue