SES_UNHANDLED_REJECTION: [ReferenceError: sendRequest is not defined
at GPT.sendRequest (file:///media/pansutodeus/Data/repos/mindcraft/src/models/gpt.js:47:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Prompter.promptConvo (file:///media/pansutodeus/Data/repos/mindcraft/src/agent/prompter.js:198:16)
at async Agent.handleMessage (file:///media/pansutodeus/Data/repos/mindcraft/src/agent/agent.js:186:23)]
In the following line
this.
is missing. https://github.com/kolbytn/mindcraft/blob/a6edd8fc44813e01c4decfda3d6b6ee018671620/src/models/gpt.js#L47making the code to throw the following message:
this only happens if the following condition is met and throws the exception https://github.com/kolbytn/mindcraft/blob/a6edd8fc44813e01c4decfda3d6b6ee018671620/src/models/gpt.js#L39-L40
fix: