mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-03-28 14:56:24 +01:00
Merge pull request #307 from keneo/patch-issue-306
fix as described in https://github.com/kolbytn/mindcraft/issues/306
This commit is contained in:
commit
d265409c55
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