更改必应和chatgpt的图片模式web模板,临时处理切换模式后会话失效问题 (#163)

* 修复引用转发,默认bing模式并发

* 开启stream增加稳定性

* fix: remove queue element only in non-bing mode

* 使用chatgpt-api自带的超时逻辑,文字过多时启动切换到图片输出防止被吞

* Update chat.js

* 添加Bing专用的图片输出样式

* 添加chatgpt的新图片模式,临时处理切换api导致的对话异常

---------

Co-authored-by: ikechan8370 <geyinchibuaa@gmail.com>
This commit is contained in:
HalcyonAlcedo 2023-02-17 19:55:23 +08:00 committed by GitHub
parent 37f75a64fa
commit 4d53f378f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
183 changed files with 6684 additions and 113 deletions

View file

@ -0,0 +1,103 @@
<!doctype html>
<html class="no-js" lang="zxx">
<head>
<!--========= Required meta tags =========-->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!--====== CSS Here ======-->
<link rel="stylesheet" href="{{pluResPath}}content/ChatGPT/static/css/bootstrap.min.css">
<link rel="stylesheet" href="{{pluResPath}}content/ChatGPT/static/css/font-awesome.min.css">
<link rel="stylesheet" href="{{pluResPath}}content/ChatGPT/static/css/hljs.css">
<link rel="stylesheet" href="{{pluResPath}}content/ChatGPT/static/css/style.css">
</head>
<body>
<header class="site-header">
<div class="container">
<div class="row">
<div class="col-lg-3 col-4 my-auto">
<a href="index.html" class="site-logo">
<img src="{{pluResPath}}content/ChatGPT/static/picture/openai.png" alt="LOGO">
</a>
</div>
</div>
</div>
</header>
<section class="about-area pt-232">
<div class="container">
<div class="row justify-content-end">
<div class="col-xl-5 col-lg-5 text-right">
<div class="section-heading">
<h2>Open AI</h2>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<div class="hero-content">
<h4>{{senderName}}</h4>
</div>
<div class="about-content">
<h2>{{@ prompt}}</h2>
<span class="height-50"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-xl-12">
<div class="hero-content">
<h4>ChatGPT</h4>
</div>
<div class="about-content">
<p class="markdown">{{@ content}}</p>
<span class="height-50"></span>
</div>
</div>
</div>
</div>
</section>
<!-- footer start -->
<footer class="site-footer mt-175">
<div class="container">
<div class="row">
<div class="col-md-3">
</div>
<div class="col-md-9 my-auto text-right">
<div class="copyright-text">
<p>Response to {{senderName}} Created By Yunzai-Bot and ChatGPT-Plugin</a></p>
</div>
</div>
</div>
</div>
</footer>
<!-- footer end -->
<!--========= JS Here =========-->
<script src="{{pluResPath}}content/ChatGPT/static/js/jquery-2.2.4.min.js"></script>
<script src="{{pluResPath}}content/ChatGPT/static/js/highlight.min.js"></script>
<script src="{{pluResPath}}content/ChatGPT/static/js/marked.min.js"></script>
<script src="{{pluResPath}}content/ChatGPT/static/js/main.js"></script>
<script>
marked.setOptions({
renderer: new marked.Renderer(),
gfm: true,
tables: true,
breaks: false,
pedantic: false,
sanitize: false,
smartLists: true,
smartypants: false,
highlight: function (code,lang) {
return hljs.highlightAuto(code,[lang]).value;
}
});
let text = marked.parse($(".markdown").text());
$(".markdown").html(text);
</script>
</body>
</html>