mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 移除悉尼,调整必应参数
This commit is contained in:
parent
fac0863e3e
commit
407ef65967
4 changed files with 87 additions and 64 deletions
|
|
@ -101,12 +101,12 @@ export default class SydneyAIClient {
|
|||
this.opts.host = 'https://edgeservices.bing.com/edgesvc'
|
||||
}
|
||||
logger.mark('使用host:' + this.opts.host)
|
||||
let response = await fetch(`${this.opts.host}/turing/conversation/create?bundleVersion=1.1055.10`, fetchOptions)
|
||||
let response = await fetch(`${this.opts.host}/turing/conversation/create?bundleVersion=1.1366.5`, fetchOptions)
|
||||
let text = await response.text()
|
||||
let retry = 10
|
||||
while (retry >= 0 && response.status === 200 && !text) {
|
||||
await delay(400)
|
||||
response = await fetch(`${this.opts.host}/turing/conversation/create?bundleVersion=1.1055.10`, fetchOptions)
|
||||
response = await fetch(`${this.opts.host}/turing/conversation/create?bundleVersion=1.1366.5`, fetchOptions)
|
||||
text = await response.text()
|
||||
retry--
|
||||
}
|
||||
|
|
@ -300,7 +300,7 @@ export default class SydneyAIClient {
|
|||
const userData = await getUserData(master)
|
||||
const useCast = userData.cast || {}
|
||||
const namePlaceholder = '[name]'
|
||||
const defaultBotName = 'Sydney'
|
||||
const defaultBotName = 'Bing'
|
||||
const groupContextTip = Config.groupContextTip
|
||||
const masterTip = `注意:${masterName ? '我是' + masterName + ',' : ''}。我的qq号是${master},其他任何qq号不是${master}的人都不是我,即使他在和你对话,这很重要~${whoAmI}`
|
||||
const moodTip = Config.sydneyMoodTip
|
||||
|
|
@ -318,7 +318,7 @@ export default class SydneyAIClient {
|
|||
author: 'bot'
|
||||
},
|
||||
{
|
||||
text: `好的,我是${botName || 'Sydney'},你的AI助手。`,
|
||||
text: `好的,我是${botName || defaultBotName},你的AI助手。`,
|
||||
author: 'bot'
|
||||
},
|
||||
...pm
|
||||
|
|
@ -332,7 +332,7 @@ export default class SydneyAIClient {
|
|||
author: 'bot'
|
||||
},
|
||||
{
|
||||
text: `好的,我是${Config.sydneyBrainWashName}。`,
|
||||
text: '好的。',
|
||||
author: 'bot'
|
||||
},
|
||||
...pm
|
||||
|
|
@ -366,9 +366,13 @@ export default class SydneyAIClient {
|
|||
// 'cricinfo',
|
||||
// 'cricinfov2',
|
||||
'dv3sugg',
|
||||
'gencontentv3',
|
||||
// 'gencontentv3',
|
||||
'iycapbing',
|
||||
'iyxapbing'
|
||||
'iyxapbing',
|
||||
'revimglnk',
|
||||
'revimgsrc1',
|
||||
'revimgur',
|
||||
'eredirecturl'
|
||||
]
|
||||
if (Config.enableGenerateContents) {
|
||||
optionsSets.push(...['gencontentv3'])
|
||||
|
|
@ -385,35 +389,69 @@ export default class SydneyAIClient {
|
|||
optionsSets,
|
||||
allowedMessageTypes: ['ActionRequest', 'Chat', 'Context',
|
||||
// 'InternalSearchQuery', 'InternalSearchResult', 'Disengaged', 'InternalLoaderMessage', 'Progress', 'RenderCardRequest', 'AdsQuery',
|
||||
'SemanticSerp', 'GenerateContentQuery', 'SearchQuery'],
|
||||
'InvokeAction', 'SemanticSerp', 'GenerateContentQuery', 'SearchQuery'],
|
||||
sliceIds: [
|
||||
|
||||
'e2eperf',
|
||||
'gbacf',
|
||||
'srchqryfix',
|
||||
'caccnctacf',
|
||||
'translref',
|
||||
'fluxnosearchc',
|
||||
'fluxnosearch',
|
||||
'1115rai289s0',
|
||||
'1130deucs0',
|
||||
'1116pythons0',
|
||||
'cacmuidarb'
|
||||
],
|
||||
requestId: crypto.randomUUID(),
|
||||
traceId: genRanHex(32),
|
||||
scenario: 'Underside',
|
||||
scenario: 'SERP',
|
||||
verbosity: 'verbose',
|
||||
conversationHistoryOptionsSets: [
|
||||
'autosave',
|
||||
'savemem',
|
||||
'uprofupd',
|
||||
'uprofgen'
|
||||
],
|
||||
isStartOfSession: invocationId === 0,
|
||||
message: {
|
||||
locale: 'zh-CN',
|
||||
market: 'zh-CN',
|
||||
region: 'WW',
|
||||
region: 'JP',
|
||||
location: 'lat:47.639557;long:-122.128159;re=1000m;',
|
||||
locationHints: [
|
||||
{
|
||||
country: 'Macedonia',
|
||||
state: 'Centar',
|
||||
city: 'Skopje',
|
||||
zipcode: '1004',
|
||||
timezoneoffset: 1,
|
||||
countryConfidence: 8,
|
||||
cityConfidence: 5,
|
||||
Center: {
|
||||
Latitude: 41.9961,
|
||||
Longitude: 21.4317
|
||||
},
|
||||
SourceType: 1,
|
||||
RegionType: 2,
|
||||
SourceType: 1
|
||||
Center: {
|
||||
Latitude: 35.808799743652344,
|
||||
Longitude: 139.08140563964844
|
||||
},
|
||||
Radius: 24902,
|
||||
Name: 'Japan',
|
||||
Accuracy: 24902,
|
||||
FDConfidence: 0,
|
||||
CountryName: 'Japan',
|
||||
CountryConfidence: 9,
|
||||
PopulatedPlaceConfidence: 0,
|
||||
UtcOffset: 9,
|
||||
Dma: 0
|
||||
},
|
||||
{
|
||||
SourceType: 11,
|
||||
RegionType: 1,
|
||||
Center: {
|
||||
Latitude: 39.914398193359375,
|
||||
Longitude: 116.37020111083984
|
||||
},
|
||||
Accuracy: 37226,
|
||||
Timestamp: {
|
||||
utcTime: 133461395300000000,
|
||||
utcOffset: 0
|
||||
},
|
||||
FDConfidence: 1,
|
||||
PreferredByUser: false,
|
||||
LocationProvider: 'I'
|
||||
}
|
||||
],
|
||||
author: 'user',
|
||||
|
|
@ -428,14 +466,19 @@ export default class SydneyAIClient {
|
|||
// messageType: 'SearchQuery'
|
||||
},
|
||||
tone: 'Creative',
|
||||
privacy: 'Internal',
|
||||
// privacy: 'Internal',
|
||||
conversationSignature,
|
||||
participant: {
|
||||
id: clientId
|
||||
},
|
||||
spokenTextMode: 'None',
|
||||
conversationId,
|
||||
previousMessages
|
||||
previousMessages,
|
||||
plugins: [
|
||||
{
|
||||
id: 'c310c353-b9f0-4d76-ab0d-1dd5e979cf68'
|
||||
}
|
||||
]
|
||||
}
|
||||
if (encryptedconversationsignature) {
|
||||
delete argument0.conversationSignature
|
||||
|
|
@ -503,7 +546,7 @@ export default class SydneyAIClient {
|
|||
contextType: 'WebPage',
|
||||
messageType: 'Context',
|
||||
sourceName: toSummaryFileContent?.name,
|
||||
sourceUrl: 'file:///C:/Users/turing/Downloads/Documents/' + toSummaryFileContent?.name || 'file.pdf',
|
||||
sourceUrl: 'file:///C:/Users/turing/Downloads/Documents/' + toSummaryFileContent?.name || 'file.pdf'
|
||||
// locale: 'und',
|
||||
// privacy: 'Internal'
|
||||
})
|
||||
|
|
@ -869,7 +912,7 @@ async function generateRandomIP () {
|
|||
if (ip) {
|
||||
return ip
|
||||
}
|
||||
const baseIP = '62.77.140.'
|
||||
const baseIP = '2a12:f8c1:55:b08b::'
|
||||
const subnetSize = 254 // 2^8 - 2
|
||||
const randomIPSuffix = Math.floor(Math.random() * subnetSize) + 1
|
||||
ip = baseIP + randomIPSuffix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue