-
-
Notifications
You must be signed in to change notification settings - Fork 124
It no longer works #55
Comments
Hi everyone, I'm also having the same problem. The service worked fine yesterday, but today it's not returning any results. I've tried adding the _U cookie and all cookies, but it's still not working. |
Same - unsure what changed. Maybe something to do with images? |
|
yeah this is what I think changed. I've never reconstructed an API before, so this'll be fun |
@evankozliner I have not either, but may have time to look into this next week. Are you presently attempting to fix? |
Not right this moment. May take a crack at it this weekend though. Could be fun to mob on it |
@evankozliner @diogo-karma @ByTheFxter @transitive-bullshit I believe I fixed it, made a PR: While this PR is awaiting review & merge, for use in the meantime, I've published my fork with the fix under bing-chat-rnz. |
Congratulations @rnz269! which cookie should I use? I would like to test this here. Thank you very much. I saw your fork. |
It was able to work, I guess because when I did the demo it took a while to respond. But in its response, the text field returns my answer and not the answer from Bing chat, can you fix it, I will be very grateful to you because I need it for a real project my practice. |
@diogo-karma _U cookie worked for me. Will follow up with code examples later today. |
I tried putting together a repl but I'm running into a websocket error which likely has to do with the replit environment. That said, I've downloaded it & run the code locally and it works (if you try this, just make sure to include BING_COOKIE in your .env file, which should be set to the _U cookie, and run the dev script listed in the package.json). I wanted to get the repl working, but unfortunately couldn't and don't have any more time to commit to this. |
|
Hi, I removed bing-chat and installed bing-chat-rnz and tried the same code (except for the import which is now bing-chat-rnz), it gave me the prompt itself as the answer. I used _U cookie. Is there something wrong that I am doing? |
That is the same problem we are facing and currently there is no solution for that problem. |
@rudrajyotibhattacharya @ByTheFxter did you follow the example repl mentioned above https://github.com/transitive-bullshit/bing-chat/issues/55#issuecomment-1751101507? I'm unable to reproduce your issue; I'm getting the correct response (an answer, not my prompt) from bing. |
Update: I wound up just checking it out locally, and I also get @rudrajyotibhattacharya 's problem
|
@rnz269, Firstly, sorry I did not read your post carefully, just noticed "websocket error" and assumed you will be coming up with other examples. Anyway, I tried to simplify your code a little and run it. I removed the timeout (promise race) and did not use any options (variant).
The response was the following:
Then I introduced the options
The prompt was "Tell me about bitcoin"
A sight for sore eyes :) Maybe a default variant is a good idea because in the bing-chat package we did not need to pass this option. But anyway, thanks a million. |
@evankozliner, just do an npm install bing-chat-rnz in your working directory. |
Nice! Adding the precise prompt solved the repeat-prompt response problem for me too |
@rnz269 it worked perfectly. thank you very much. you are a genius! |
Hi, I tried that code import { BingChat } from "bing-chat-rnz"
// instantiate the BingChat class
const api = new BingChat({
cookie:
"<mycookie _U>"
})
async function askBingChat(message, options) {
const res = await api.sendMessage(message)
console.log(res);
}
askBingChat("Tell me about themis (TMS) vesting schedule") But my response is
Is my problem related to the fix or not at all ? |
I am getting the same. Text is empty. @rudrajyotibhattacharya @diogo-karma @evankozliner Could you please tell what we are doing wrong? It would be a great help. Many thanks! |
@rudrajyotibhattacharya thank you for reviewing the code in detail and noticing the issue with the default variant. It turns out, the issue was not that the default variant (Balanced) was not being provided to the BingChat class, it was rather that my solution introduced a bug with Balanced that led it to just re-print the input message. So, anyone who tried to use the class without specifying the Precise or Creative variants received a response containing their original input. I just fixed this and published a new variant to npm. So after installing the latest version, the Balanced variant will be working again, and so the default case where no variant is specified will work. Sadly, I don't have time to answer everyone else's questions, but hopefully upgrading to the latest version of bing-chat-rnz. and/or checking out the example I put together earlier will help. |
I will also say, to those who are receiving empty messages back from the API, you may need a new _U cookie.
I find myself having to do this each day. This process is manual. I noticed that there's a new conversation around automatic _U cookie generation, though: #57 |
Most welcome @rnz269. I will just point out one issue regarding blank response. From time to time, Bing presents logged in users a captcha even if they have not rolled the cookie. So just opening bing chat from browser and writing any message will present a captcha. Once you clear it, the same cookie will work in the API. |
Here is a working example using @rnz269 module. A simple javascript/Nodejs with expressjs code
Since I used express, you can access (for example) the browser or curl: Remembering that it is necessary to edit the .env file. I used the module "bing-chat-rnz": "^0.2.4" try this @shuaibaslam2019 @Aube33 @rudrajyotibhattacharya (ur right, but cases are rare) thx @ByTheFxter @rnz269 An easy way to know the _U Cookie using Google Console / DevTools / Console; Just use this simple script (copy&past)
|
It no longer works. And I updated bing-chat-rnz to the latest version, use many solutions of this thread, use the _U token but it no longer works. Now that they don't use _U cookie anymore. They don't call https anymore. They use WebSocket now. Can someone do it right now? |
Hi @britneypicciuy, I was able to get bing-chat-rnz working locally after updating to the latest version from @rnz269. I put together a small Express app as an example. It takes a bit of setup with the .env file, but I was able to get it working (just tested again now locally). You can try it out locally with this repo: https://github.com/diogo-karma/bingchat-expressjs
Then open in browser or curl: Caveat: There is a delay, but it works. I repeat, and I tested locally and with a browser open with Bing. Let me know if you have any other questions! |
I have already cloned your repo. But with my old _U token, it no longer work. I cannot get the new _U token in www.bing.com. Can you share your _U if it works for testing purpose? |
@britneypicciuy yep. https://www.bing.com/chat Google Chrome Extension (for cookies): https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm or (chrome webdev tools) console: let cookie_U = await cookieStore.getAll(); cookie_U.find(i => i.name == '_U').value must be in the same tab bing.com/chat or bing.com/search
|
@britneypicciuy That seems odd. Are you logged in? If so, have you tried accessing it through the Google extension at bign.com/chat? I’m currently logged in and this has been tested in Brazil. It might be an issue specific to your country. If you’re logged in, you might want to try using a VPN. I recommend using Proton.me, which is free, and setting your location to somewhere else. |
It seems to no longer work, I've tried adding the _U cookie and also tried adding all cookies but it doesn't return any results.
The text was updated successfully, but these errors were encountered: