@@ -24,78 +24,52 @@ type Params = SendMessageParams<{ bingConversationStyle: BingConversationStyle,
2424const getOptionSets = ( conversationStyle : BingConversationStyle , allowSeach = true ) => {
2525 const results = {
2626 [ BingConversationStyle . Creative ] : [
27- 'nlu_direct_response_filter' ,
2827 'deepleo' ,
2928 'disable_emoji_spoken_text' ,
30- 'responsible_ai_policy_235' ,
31- 'enablemm' ,
3229 'dv3sugg' ,
3330 'autosave' ,
3431 'iyxapbing' ,
3532 'iycapbing' ,
3633 'h3imaginative' ,
37- 'gptvprvc' ,
38- 'fluxpcalc' ,
39- 'eredirecturl' ,
4034 'clgalileo' ,
4135 'gencontentv3' ,
42- 'fluxv14l'
4336 ] ,
4437 [ BingConversationStyle . Balanced ] : [
45- 'nlu_direct_response_filter' ,
4638 'deepleo' ,
4739 'disable_emoji_spoken_text' ,
48- 'responsible_ai_policy_235' ,
49- 'enablemm' ,
5040 'dv3sugg' ,
5141 'autosave' ,
5242 'iyxapbing' ,
5343 'iycapbing' ,
5444 'galileo' ,
55- 'gptvprvc' ,
56- 'fluxpcalc' ,
57- 'eredirecturl' ,
5845 'saharagenconv5'
5946 ] ,
6047 [ BingConversationStyle . Precise ] : [
61- 'nlu_direct_response_filter' ,
6248 'deepleo' ,
6349 'disable_emoji_spoken_text' ,
64- 'responsible_ai_policy_235' ,
65- 'enablemm' ,
6650 'dv3sugg' ,
6751 'autosave' ,
6852 'iyxapbing' ,
6953 'iycapbing' ,
7054 'h3precise' ,
71- 'gptvprvc' ,
72- 'fluxpcalc' ,
73- 'eredirecturl' ,
7455 'clgalileo' ,
7556 'gencontentv3' ,
76- 'fluxv14l'
7757 ] ,
7858 [ BingConversationStyle . Base ] : [
7959 'deepleo' ,
8060 'disable_emoji_spoken_text' ,
81- 'responsible_ai_policy_235' ,
82- 'enablemm' ,
8361 'dv3sugg' ,
8462 'autosave' ,
8563 'iyxapbing' ,
8664 'iycapbing' ,
87- 'h3imaginative' ,
88- 'gptvprvc' ,
89- 'fluxpcalc' ,
90- 'eredirecturl' ,
9165 'clgalileo' ,
9266 'gencontentv3' ,
93- 'fluxv14l' ,
9467 'nojbfedge' ,
9568 ]
9669 } [ conversationStyle ]
9770 if ( allowSeach === false ) {
98- results . push ( 'nosearchall' )
71+ //results.push('nosearchall')
72+ results . push ( 'gpt4tmncnp' )
9973 }
10074 return results
10175}
@@ -126,20 +100,24 @@ export class BingWebBot {
126100 const message = {
127101 locale : 'zh-CN' ,
128102 market : 'zh-CN' ,
129- region : 'US ' ,
103+ region : 'CN ' ,
130104 locationHints : [
131105 {
132- country : 'United States' ,
133- state : 'California' ,
134- city : 'Los Angeles' ,
135- timezoneoffset : 8 ,
136- countryConfidence : 8 ,
137- Center : {
138- Latitude : 34.0536909 ,
139- Longitude : - 118.242766
106+ "SourceType" : 1 ,
107+ "RegionType" : 2 ,
108+ "Center" : {
109+ "Latitude" : 39.9042 ,
110+ "Longitude" : 116.4074 ,
140111 } ,
141- RegionType : 2 ,
142- SourceType : 1
112+ "Radius" : 24902 ,
113+ "Name" : "China" ,
114+ "Accuracy" : 24902 ,
115+ "FDConfidence" : 0 ,
116+ "CountryName" : "China" ,
117+ "CountryConfidence" : 9 ,
118+ "PopulatedPlaceConfidence" : 0 ,
119+ "UtcOffset" : 8 ,
120+ "Dma" : 0
143121 }
144122 ] ,
145123 author : 'user' ,
@@ -153,57 +131,38 @@ export class BingWebBot {
153131
154132 const argument = {
155133 optionsSets : getOptionSets ( useBaseSets ? BingConversationStyle . Base : conversation . conversationStyle , conversation . allowSearch ) ,
156- sliceIds : [
157- 'gbaa' ,
158- 'gba' ,
159- 'emovoice' ,
160- 'tts3cf' ,
161- 'kcinherocf' ,
162- 'inochatv2' ,
163- 'wrapnoins' ,
164- 'mlchatpc9000ns' ,
165- 'mlchatpcbase' ,
166- 'sydconfigoptt' ,
167- '803iyjbexps0' ,
168- '0529streamws0' ,
169- '178gentechs0' ,
170- '0901utilbal' ,
171- 'attr2atral3' ,
172- '821iypapyrust' ,
173- '019hlthgrd' ,
174- '829suggtrim' ,
175- '821fluxv13s0' ,
176- '727nrprdrt3'
177- ] ,
134+ sliceIds : [ ] ,
178135 message,
179136 source : 'cib' ,
180137 spokenTextMode : 'None' ,
181138 allowedMessageTypes : [
182- 'ActionRequest' ,
183- 'Chat' ,
184- 'ConfirmationCard' ,
185- 'Context' ,
186- 'InternalSearchQuery' ,
187- 'InternalSearchResult' ,
188- 'Disengaged' ,
189- 'InternalLoaderMessage' ,
190- 'InvokeAction' ,
191- 'Progress' ,
192- 'RenderCardRequest' ,
193- 'RenderContentRequest' ,
194- // 'AdsQuery',
195- 'SemanticSerp' ,
196- 'GenerateContentQuery' ,
197- 'SearchQuery'
139+ "ActionRequest" ,
140+ "Chat" ,
141+ "ConfirmationCard" ,
142+ "Context" ,
143+ "InternalSearchQuery" ,
144+ "InternalSearchResult" ,
145+ "Disengaged" ,
146+ "InternalLoaderMessage" ,
147+ "Progress" ,
148+ "RenderCardRequest" ,
149+ "RenderContentRequest" ,
150+ "AdsQuery" ,
151+ "SemanticSerp" ,
152+ "GenerateContentQuery" ,
153+ "SearchQuery" ,
154+ "GeneratedCode" ,
155+ "InternalTasksMessage"
198156 ] ,
199157 conversationHistoryOptionsSets : [
200158 'autosave' ,
201159 'savemem' ,
202160 'uprofupd' ,
203161 'uprofgen'
204162 ] ,
163+ gptId : "copilot" ,
205164 previousMessages : conversation . context ?. length ? [ {
206- author : 'user ' ,
165+ author : 'system ' ,
207166 description : conversation . context ,
208167 contextType : 'WebPage' ,
209168 messageType : 'Context' ,
@@ -213,7 +172,6 @@ export class BingWebBot {
213172 requestId : uuid ,
214173 isStartOfSession : conversation . invocationId === 0 ,
215174 conversationId : conversation . conversationId ,
216- conversationSignature : conversation . conversationSignature ,
217175 participant : { id : conversation . clientId } ,
218176 plugins : [ ] ,
219177 scenario : 'SERP' ,
@@ -230,7 +188,7 @@ export class BingWebBot {
230188 async createConversation ( conversationId ?: string ) : Promise < ConversationResponse > {
231189 const headers = {
232190 'Accept-Encoding' : 'gzip, deflate, br, zsdch' ,
233- 'x-ms-useragent' : 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.0 OS/Win32 ' ,
191+ 'x-ms-useragent' : 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.12.3 OS/Android ' ,
234192 cookie : this . cookie ,
235193 }
236194
@@ -388,6 +346,7 @@ export class BingWebBot {
388346 headers : {
389347 'accept-language' : 'zh-CN,zh;q=0.9' ,
390348 'cache-control' : 'no-cache' ,
349+ "user-agent" : "Mozilla/5.0 (Linux; Android 7.1.1; OPPO R11t) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36 EdgA/108.0.1462.4" ,
391350 pragma : 'no-cache' ,
392351 cookie : this . cookie ,
393352 }
@@ -407,7 +366,7 @@ export class BingWebBot {
407366 private async createImage ( prompt : string , id : string ) {
408367 const headers = {
409368 'Accept-Encoding' : 'gzip, deflate, br, zsdch' ,
410- 'x-ms-useragent' : 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.0 OS/Win32 ' ,
369+ 'x-ms-useragent' : 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.12.3 OS/Android ' ,
411370 cookie : this . cookie ,
412371 }
413372
0 commit comments