Comments (10)
me too. and I added code below to output result already returned
ws.on('close', () => {
console.warn('WebSocket close')
if (!isFulfilled) {
isFulfilled = true
resolve(result)
return
}
})
I'm thinking it's may better to handle reconnect, since there's a message which type is 7 that allowReconnect, need to find out how bing handle this message on socket close
from bing-chat.
@IceCream0910 sorry, account being banned. maybe u can try to send {"type":6} every 15 seconds to keep connection alive.
from bing-chat.
@semse I'm currently not able to test / reproduce since the shared Microsoft account a bunch of us were using got disabled.
from bing-chat.
me too. and I added code below to output result already returned
ws.on('close', () => { console.warn('WebSocket close') if (!isFulfilled) { isFulfilled = true resolve(result) return } })
I'm thinking it's may better to handle reconnect, since there's a message which type is 7 that allowReconnect, need to find out how bing handle this message on socket close
Thanks for your help, it is currently useful to solve the sometimes await
unresponsive content
from bing-chat.
I noticed that {"type":6}
is sent every 15 seconds or so. Maybe that's what keeps it alive. Can't test no more. I think I was banned.
from bing-chat.
I'm thinking it's may better to handle reconnect, since there's a message which type is 7 that allowReconnect, need to find out how bing handle this message on socket close
Did you find a solution? As you said, when the "{"type":7}" message, the socket connection is closed. Why does it disconnect even though no cleanup() was executed... I can't find a way to reconnect with my abilities.
from bing-chat.
@IceCream0910 sorry, account being banned. maybe u can try to send {"type":6} every 15 seconds to keep connection alive.
Thanks, I sent type 6 messages and it works without stopping.
from bing-chat.
@IceCream0910 Can you share the code?
from bing-chat.
@IceCream0910 Can you share the code?
@binikingi
I'm not sure that my code is best solution, but I sends a type:6 request to websocket's 'on' event function. And when websocket is closed, stop interval using clearInterval
.
ws.on("open", () => {
ws.send(`{"protocol":"json","version":1}${terminalChar}`);
reconnectInterval = setInterval(() => {
ws.send(`{"type":6}${terminalChar}`);
}, 10 * 1000);
});
...
from bing-chat.
@IceCream0910 yup this works for me. thanks
from bing-chat.
Related Issues (20)
- Is this API able to fetch results anymore? HOT 3
- Please add support for commonjs HOT 2
- Error: WebSocket error: Error: Unexpected server response: 200 HOT 18
- CAPTCHA requirements HOT 1
- delete
- Connect Timeout error
- Getting the URL from the response
- Is there a way to send also images in the request? HOT 3
- It no longer works HOT 33
- _U Cookie Generation HOT 3
- how to send Images to bing-chat?
- how to send Images to bing-chat?
- use bing chat to get images HOT 1
- Request from Server at United States Datacenter HOT 2
- Instruction on using Bing API on LiteLLM to function as OpenAI compatible API HOT 2
- Empty text response from bing-chat HOT 9
- UnhandledSchemeError: Reading from "node:crypto" is not handled by plugins
- .
- TypeError: bufferUtil.mask is not a function
- Error: unexpected HTTP error createConversation 404: Not Found HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bing-chat.