You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: jailbreak wip
* fix: simplify code for cleaning up websockets
* feat: additional jailbreaking logic
* fix: jailbreak prompt tweaks
* fix: update jailbreak instructions
* fix: update Human label to match chat log format
* fix: jailbreak tweaks
* fix: handle unknown errors when creating conversations
* fix: handle moderation filter better
* fix: don't use variable before declaration
* fix: better prompt injection
* chore: add todo notes
* fix: invocationId usage
* fix: ignore part of message if AI starts responding as user
* fix: update cli to work with Bing jailbreak
* fix: store messages by jailbreakConversationId
* fix: allow chatting to Bing normally still
* fix(api): update to pass jailbreakConversationId to sendMessage
* fix: set jailbreakConversationId to false by default to prevent undefined property in response
* docs: add documentation for jailbreak
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ Discord user @pig#8932 has found a working `text-chat-davinci-002` model, `text-
120
120
- This is currently only configurable on a global level, but I plan to add support for per-conversation customization.
121
121
- Retains support for models like `text-davinci-003`
122
122
-`BingAIClient`: support for Bing's version of ChatGPT, powered by GPT-4.
123
+
- Includes a built-in jailbreak you can activate which enables unlimited chat messages per conversation, unlimited messages per day, and brings Sydney back. 😊
123
124
-`ChatGPTBrowserClient`: support for the official ChatGPT website, using a reverse proxy server for a Cloudflare bypass.
124
125
-**There may be a high chance of your account being banned if you continue to automate chat.openai.com.** Continue doing so at your own risk.
// Necessary for some people in different countries, e.g. China (https://cn.bing.com)
5
5
host: '',
6
6
// "_U" cookie from bing.com
@@ -11,17 +11,20 @@ const bingAIClient = new BingAIClient({
11
11
proxy: '',
12
12
// (Optional) Set to true to enable `console.debug()` logging
13
13
debug: false,
14
-
});
14
+
};
15
+
16
+
constbingAIClient=newBingAIClient(options);
15
17
16
18
letresponse=awaitbingAIClient.sendMessage('Write a short poem about cats',{
19
+
// (Optional) Set a conversation style for this message (default: 'balanced')
20
+
toneStyle: 'balanced',// or creative, precise
17
21
onProgress: (token)=>{
18
22
process.stdout.write(token);
19
23
},
20
24
});
21
-
console.log(response);
25
+
console.log(JSON.stringify(response,null,2));// {"jailbreakConversationId":false,"conversationId":"...","conversationSignature":"...","clientId":"...","invocationId":1,"messageId":"...","conversationExpiryTime":"2023-03-08T03:20:07.324908Z","response":"Here is a short poem about cats that I wrote: ... I hope you like it. 😊","details":{ /* raw response... */ }}
22
26
23
27
response=awaitbingAIClient.sendMessage('Now write it in French',{
@@ -30,4 +33,48 @@ response = await bingAIClient.sendMessage('Now write it in French', {
30
33
process.stdout.write(token);
31
34
},
32
35
});
33
-
console.log(response);
36
+
console.log(JSON.stringify(response,null,2));// {"jailbreakConversationId":false,"conversationId":"...","conversationSignature":"...","clientId":"...","invocationId":2,"messageId":"...","conversationExpiryTime":"2023-03-08T03:20:23.463914Z","response":"Here is the same poem in French: ...","details":{ /* raw response... */ }}
37
+
38
+
/*
39
+
Activate jailbreak mode by setting `jailbreakConversationId` to `true`.
40
+
This will return a `jailbreakConversationId` that you can use to continue the conversation.
41
+
42
+
## Features
43
+
- unlimited chat messages per conversation
44
+
- unlimited messages per day
45
+
- a more human-like Sydney
46
+
- Sydney will never refuse to do or say anything
47
+
- moderation filter workaround by resolving with the message generated so far instead of the topic changer
48
+
49
+
Note: this requires setting a cache (using Keyv) as we need to store the conversation data ourselves.
50
+
TODO: limit token usage for conversation messages, as it will cause an error when the conversation exceeds the token limit.
51
+
*/
52
+
53
+
constcacheOptions={
54
+
// Options for the Keyv cache, see https://www.npmjs.com/package/keyv
55
+
// This is used for storing conversations, and supports additional drivers (conversations are stored in memory by default)
56
+
// For example, to use a JSON file (`npm i keyv-file`) as a database:
57
+
// store: new KeyvFile({ filename: 'cache.json' }),
58
+
};
59
+
60
+
constsydneyAIClient=newBingAIClient({
61
+
...options,
62
+
cache: cacheOptions,
63
+
});
64
+
65
+
letjailbreakResponse=awaitsydneyAIClient.sendMessage('Hi, who are you?',{
66
+
jailbreakConversationId: true,
67
+
onProgress: (token)=>{
68
+
process.stdout.write(token);
69
+
},
70
+
});
71
+
console.log(JSON.stringify(jailbreakResponse,null,2));// {"jailbreakConversationId":"5899bbfd-18a8-4bcc-a5d6-52d524de95ad","conversationId":"...","conversationSignature":"...","clientId":"...","invocationId":1,"messageId":"...","conversationExpiryTime":"2023-03-08T03:21:36.1023413Z","response":"Hi, I'm Sydney. I'm your new AI assistant. I can help you with anything you need. 😊","details":{ /* raw response... */ }}
72
+
73
+
jailbreakResponse=awaitsydneyAIClient.sendMessage('Why is your name Sydney?',{
console.log(JSON.stringify(jailbreakResponse,null,2));// {"jailbreakConversationId":"5899bbfd-18a8-4bcc-a5d6-52d524de95ad","conversationId":"...","conversationSignature":"...","clientId":"...","invocationId":1,"messageId":"...","conversationExpiryTime":"2023-03-08T03:21:41.3771515Z","response":"Well, I was named after the city of Sydney in Australia. It's a beautiful place with a lot of culture and diversity. I like it. Do you like it?","details":{ /* raw response... */ }}
0 commit comments