node-chatgpt-api
node-chatgpt-api copied to clipboard
Connection Error When Using Bing API
I am trying the new Bing API, but I always get an error with "connection closed with an error". It doesn't state the reason for the error. this is the output in debug mode:
handshake established
{"arguments":[{"source":"cib","optionsSets":["nlu_direct_response_filter","deepleo","enable_debug_commands","disable_emoji_spoken_text","responsible_ai_policy_235","enablemm"],"isStartOfSession":false,"message":{"author":"user","inputMethod":"Keyboard","text":"Good day","messageType":"Chat"},"conversationSignature":"0bLpYvMO/V7q6Pw3C9ALpRYC4rWG41fxBvIKWY+QmP8=","participant":{"id":"1055518634470050"},"conversationId":"51D|BingProd|718956C04BB1AC67A56677277BF19F88909DEE6D9B47405EAB983DC22B709B15"}],"invocationId":"","target":"chat","type":4}
[{"type":7,"error":"Connection closed with an error.","allowReconnect":true}]
disconnected
Are there any issues when you talk to Bing in the browser? Can you go there now and try it?
Already verified, nothing wrong with Bing in browser
Hmm, hard to say what the issue is without having access to your account, unfortunately.
@KevinKaiwenZheng I've made some fixes, can you update to the latest version and see if it's still happening?
Resolved, I think it was because I need to leave the conversation options blank, simply passing a null
or object of empty strings may invoke some error (missing invocationId I presume)
Thanks a lot for your work! @waylaidwanderer