I'm using node -v v14.19.0. I tried to run this in my project and got the following:
## Unable to handle prompt for ...
{"model":"gpt-4","temperature":0,"max_tokens":7905,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"messages":[{"role":"system","content":"You are an assistant, who can only reply in JSON object, reply with a yes (in a param named 'reply') if you understand"},{"role":"assistant","content":"{\"reply\":\"yes\"}"},{"role":"user","content":"[object Object]\n[object Object]\n[object Object]\n[object Object]\n[object Object]"}]}
## Recieved error ...
ReferenceError: fetch is not defined
I checked out the project and added const fetch = require('node-fetch'); to the top of ai-bridge/src/openai/getChatCompletion.js and it solved it for me.
I'm using
node -v v14.19.0
. I tried to run this in my project and got the following:I checked out the project and added
const fetch = require('node-fetch');
to the top ofai-bridge/src/openai/getChatCompletion.js
and it solved it for me.