mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
修复上下文,修改bing样式
This commit is contained in:
parent
ec2aef6b6d
commit
e7655b5291
3 changed files with 36 additions and 11 deletions
12
apps/chat.js
12
apps/chat.js
|
|
@ -605,18 +605,23 @@ export class chatgpt extends plugin {
|
|||
cookie = bingToken
|
||||
}
|
||||
let bingAIClient
|
||||
if (Config.bingStyle === 'Sydney')
|
||||
if (Config.bingStyle === 'Sydney') {
|
||||
bingAIClient = new SydneyAIClient({
|
||||
userToken: bingToken, // "_U" cookie from bing.com
|
||||
cookie,
|
||||
debug: Config.debug
|
||||
})
|
||||
else
|
||||
// Sydney不实现上下文传递,自行处理
|
||||
conversation.clientId = undefined
|
||||
conversation.invocationId = undefined
|
||||
conversation.conversationSignature = undefined
|
||||
} else {
|
||||
bingAIClient = new BingAIClient({
|
||||
userToken: bingToken, // "_U" cookie from bing.com
|
||||
cookie,
|
||||
debug: Config.debug
|
||||
})
|
||||
}
|
||||
let response
|
||||
let reply = ''
|
||||
try {
|
||||
|
|
@ -650,7 +655,8 @@ export class chatgpt extends plugin {
|
|||
conversationId: response.conversationId,
|
||||
clientId: response.clientId,
|
||||
invocationId: response.invocationId,
|
||||
conversationSignature: response.conversationSignature
|
||||
conversationSignature: response.conversationSignature,
|
||||
parentMessageId: response.messageId
|
||||
}
|
||||
}
|
||||
case 'api3': {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body class="body-{{style}}">
|
||||
<header class="site-header">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
<div class="container">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-xl-5 col-lg-5 text-right">
|
||||
<div class="section-heading">
|
||||
<div class="section-heading section-heading-{{style}}">
|
||||
<h2>New Bing</h2>
|
||||
{{if cache.file != ''}}
|
||||
<p> {{cache.file}} </p>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="hero-content">
|
||||
<div class="hero-content hero-content-{{style}}">
|
||||
<h4>{{senderName}}</h4>
|
||||
</div>
|
||||
<div class="about-content">
|
||||
|
|
@ -50,8 +50,12 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="hero-content">
|
||||
<h4>{{style === 'Sydney' ? '必应' : 'Sydney'}}</h4>
|
||||
<div class="hero-content hero-content-{{style}}">
|
||||
{{if style === 'Sydney'}}
|
||||
<h4>Sydney</h4>
|
||||
{{else}}
|
||||
<h4>必应</h4>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="about-content">
|
||||
<p class="markdown_content"></p>
|
||||
|
|
@ -62,7 +66,7 @@
|
|||
{{if quote}}
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="hero-content">
|
||||
<div class="hero-content hero-content-{{style}}">
|
||||
<h4>引用</h4>
|
||||
</div>
|
||||
<div class="about-content">
|
||||
|
|
@ -80,13 +84,13 @@
|
|||
</div>
|
||||
</section>
|
||||
<!-- footer start -->
|
||||
<footer class="site-footer mt-175">
|
||||
<footer class="site-footer site-footer-{{style}} mt-175">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-10 my-auto text-right">
|
||||
<div class="copyright-text">
|
||||
<div class="copyright-text copyright-text-{{style}}">
|
||||
<p>Response to {{senderName}} Created By Yunzai-Bot and ChatGPT-Plugin {{version}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3545,4 +3545,19 @@ input.form-control-sm {
|
|||
color: #17a2b8;
|
||||
}
|
||||
|
||||
.body-Sydney {
|
||||
background: #c5afed29;
|
||||
}
|
||||
.section-heading-Sydney h2::after {
|
||||
background: #caa5e96a;
|
||||
}
|
||||
.hero-content-Sydney h4::after {
|
||||
background: #ad6bff;
|
||||
}
|
||||
.site-footer-Sydney {
|
||||
border-top: 1px solid #6f42c1;
|
||||
}
|
||||
.copyright-text-Sydney p {
|
||||
color: #9c17b8;
|
||||
}
|
||||
/*# sourceMappingURL=style.css.map */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue