Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
bing-chat-cjs-rnz
Advanced tools
Node.js client for the unofficial Bing Chat API. It's like ChatGPT on steroids 🔥
This package is a Node.js wrapper around Bing Chat by Microsoft. TS batteries included. ✨
Warning This package is a reverse-engineered hack. I do not expect it to continue working long-term, and it is not meant for use in production. I'm building this in public, and you can follow the progress on Twitter @transitive_bs.
(30s conversation demo)
npm install bing-chat
Make sure you're using node >= 18
so fetch
is available.
You need access to Bing Chat OR a valid cookie from someone who has access.
The cookie you need from Bing is the _U
cookie (or just all of the cookies concatenated together; both will work).
import { BingChat } from 'bing-chat'
async function example() {
const api = new BingChat({
cookie: process.env.BING_COOKIE
})
const res = await api.sendMessage('Hello World!')
console.log(res.text)
}
You can follow-up messages to continue the conversation. See demos/demo-conversation.ts
for an example.
Note that Bing Chat conversations expire after about 20 minutes, so they're not meant to be long-term objects.
You can add streaming via the onProgress
handler:
const res = await api.sendMessage('Write a 500 word essay on frogs.', {
// print the partial response as the AI is "typing"
onProgress: (partialResponse) => console.log(partialResponse.text)
})
// print the full text at the end
console.log(res.text)
See demos/demo-on-progress.ts
for a full example of streaming support.
You can also add the the parameter variant
to the sendMessage
function to change the variant of the AI. The default is Balanced
, but you can also use Precise
or Creative
.
const res = await api.sendMessage('Write a 500 word essay on frogs.', {
// change the variant to 'Precise'
variant: 'Creative'
})
If you create a cool integration, feel free to open a PR and add it to the list.
node >= 18
.fetch
is installed globally.bing-chat
, we recommend using it only from your backend APIMIT © Travis Fischer
If you found this project interesting, please consider sponsoring me or following me on twitter
FAQs
Node.js client for the unofficial Bing Chat API.
The npm package bing-chat-cjs-rnz receives a total of 2 weekly downloads. As such, bing-chat-cjs-rnz popularity was classified as not popular.
We found that bing-chat-cjs-rnz demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.