mirror of
https://github.com/woodchen-ink/ChatGPT-Tailwind.git
synced 2025-07-18 22:12:00 +08:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a6cd8d1df5 | ||
|
e11323f211 | ||
|
bfbcfb7559 | ||
74a24d7426 | |||
33c06b4fb7 | |||
5d35b854aa | |||
25ff724634 | |||
da4872a8db | |||
|
50bb227a04 | ||
|
93d02d356b | ||
af4bee0d29 |
@ -4,16 +4,11 @@
|
|||||||
|
|
||||||
可以自定义修改模型参数,不过请求方式都是openai接口
|
可以自定义修改模型参数,不过请求方式都是openai接口
|
||||||
|
|
||||||
*练手页面,有问题请进群反馈*
|
|
||||||
|
|
||||||
Telegram交流群:https://t.me/ai_cn2023
|
|
||||||
|
|
||||||
|
|
||||||
## 例子
|
## 例子
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
## 使用方法
|
## 使用方法
|
||||||
|
53
index.html
53
index.html
@ -1,23 +1,22 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh-cn">
|
<html lang="zh-cmn-Hans">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>ChatGPT-Tailwind</title>
|
<title>ChatGPT-Tailwind</title>
|
||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
||||||
<link rel="shortcut icon" href="https://cdn-img-qiniu.czl.net/2023/08/03/64cb6db97b0bf.png">
|
<link rel="shortcut icon" href="https://i-cf.czl.net/r2/qiniu/2023/08/03/64cb6db97b0bf.png">
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/daisyui/3.6.4/full.min.css" rel="stylesheet" type="text/css" />
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/daisyui/4.12.14/full.min.css" rel="stylesheet" type="text/css" />
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.1/markdown-it.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.2/markdown-it.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/vs2015.min.css" />
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/vs2015.min.css" />
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: system-ui, -apple-system, "Microsoft YaHei", Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif !important;
|
font-family: system-ui, -apple-system, "Microsoft YaHei", Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link href="https://cdn.czl.net/frame/tailwind/typography.css" rel="stylesheet" type="text/css">
|
<link href="https://i.czl.net/g-f/frame/prose.css" rel="stylesheet" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="pb-72 pt-20 h-full">
|
<body class="pb-72 pt-20 h-full">
|
||||||
@ -62,32 +61,8 @@
|
|||||||
class="border-2 border-gray-300 bg-white h-10 px-2 rounded-lg text-sm flex-grow focus:outline-none select-primary"
|
class="border-2 border-gray-300 bg-white h-10 px-2 rounded-lg text-sm flex-grow focus:outline-none select-primary"
|
||||||
id="model">
|
id="model">
|
||||||
<!-- your options here -->
|
<!-- your options here -->
|
||||||
<option value="gpt-3.5-turbo">gpt-3.5-turbo</option>
|
<option value="gpt-3.5-turbo">gpt-4o-mini</option>
|
||||||
<option value="gpt-3.5-turbo-0301">gpt-3.5-turbo-0301</option>
|
<option value="gpt-3.5-turbo-16k">gpt-4o</option>
|
||||||
<option value="gpt-3.5-turbo-0613">gpt-3.5-turbo-0613</option>
|
|
||||||
<option value="gpt-3.5-turbo-16k">gpt-3.5-turbo-16k</option>
|
|
||||||
<option value="gpt-3.5-turbo-16k-0613">gpt-3.5-turbo-16k-0613</option>
|
|
||||||
<option value="gpt-4">gpt-4</option>
|
|
||||||
<option value="gpt-4-0301">gpt-4-0301</option>
|
|
||||||
<option value="gpt-4-0613">gpt-4-0613</option>
|
|
||||||
<option value="gpt-4-32k">gpt-4-32k</option>
|
|
||||||
<option value="gpt-4-32k-0613">gpt-4-32k-0613</option>
|
|
||||||
<option value="PaLM-2">PaLM-2</option>
|
|
||||||
<option value="ERINIE-Bot">ERNIE-Bot</option>
|
|
||||||
<option value="ERNIE-Bot-turbo">ERNIE-Bot-turbo</option>
|
|
||||||
<option value="BLOOMZ-7B">BLOOMZ-7B</option>
|
|
||||||
<option value="Embedding-V1">Embedding-V1</option>
|
|
||||||
<option value="chatglm_std">chatglm_std</option>
|
|
||||||
<option value="chatglm_lite">chatglm_lite</option>
|
|
||||||
<option value="chatglm_pro">chatglm_pro</option>
|
|
||||||
<option value="qwen-v1">qwen-v1</option>
|
|
||||||
<option value="qwen-plus-v1">qwen-plus-v1</option>
|
|
||||||
<option value="SparkDesk">SparkDesk</option>
|
|
||||||
<option value="360GPT_S2_V9">360GPT_S2_V9</option>
|
|
||||||
<option value="embedding-bert-512-v1">embedding-bert-512-v1</option>
|
|
||||||
<option value="embedding_s1_v1">embedding_s1_v1</option>
|
|
||||||
<option value="semantic_similarity_s1_v1">semantic_similarity_s1_v1</option>
|
|
||||||
<option value="360GPT_S2_V9.4">360GPT_S2_V9.4</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xs italics">*选择模型</div>
|
<div class="text-xs italics">*选择模型</div>
|
||||||
@ -140,7 +115,7 @@
|
|||||||
});
|
});
|
||||||
chatbox.append(`<div class="chat chat-end"><div class="chat-image avatar">
|
chatbox.append(`<div class="chat chat-end"><div class="chat-image avatar">
|
||||||
<div class="w-10 rounded-full">
|
<div class="w-10 rounded-full">
|
||||||
<img src="https://cdn-img.czl.net/2023/08/10/64d3b992cf86e.png" />
|
<img src="https://i-cf.czl.net/r2/2023/08/10/64d3b992cf86e.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-header">You</div><div class="chat-bubble chat-bubble-info">${message}</div><div>`);
|
<div class="chat-header">You</div><div class="chat-bubble chat-bubble-info">${message}</div><div>`);
|
||||||
@ -211,8 +186,8 @@
|
|||||||
: 'chat-bubble-accent'
|
: 'chat-bubble-accent'
|
||||||
const avatarURL =
|
const avatarURL =
|
||||||
message.role === 'user'
|
message.role === 'user'
|
||||||
? 'https://cdn-img.czl.net/2023/08/10/64d3b992cf86e.png'
|
? 'https://i-cf.czl.net/r2/2023/08/10/64d3b992cf86e.png'
|
||||||
: 'https://cdn-img.czl.net/2023/08/10/64d3b8c9819c7.png'
|
: 'https://i-cf.czl.net/r2/2023/08/10/64d3b8c9819c7.png'
|
||||||
const chatHeader = message.role === 'user' ? 'You' : 'AI'
|
const chatHeader = message.role === 'user' ? 'You' : 'AI'
|
||||||
|
|
||||||
let myID = 'codeSnippet-' + Date.now()
|
let myID = 'codeSnippet-' + Date.now()
|
||||||
@ -303,7 +278,7 @@
|
|||||||
}
|
}
|
||||||
chatbox.append(`<div class="chat chat-start"><div class="chat-image avatar">
|
chatbox.append(`<div class="chat chat-start"><div class="chat-image avatar">
|
||||||
<div class="w-10 rounded-full">
|
<div class="w-10 rounded-full">
|
||||||
<img src="https://cdn-img.czl.net/2023/08/10/64d3b8c9819c7.png" />
|
<img src="https://i-cf.czl.net/r2/2023/08/10/64d3b8c9819c7.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-header">AI</div><div class="chat-bubble chat-bubble-error prose prose-slate">Error: ${errorMessage}</div><div>`);
|
<div class="chat-header">AI</div><div class="chat-bubble chat-bubble-error prose prose-slate">Error: ${errorMessage}</div><div>`);
|
||||||
@ -314,7 +289,7 @@
|
|||||||
sendButton.removeClass('btn-error').addClass('btn-info');
|
sendButton.removeClass('btn-error').addClass('btn-info');
|
||||||
chatbox.append(`<div class="chat chat-start"><div class="chat-image avatar">
|
chatbox.append(`<div class="chat chat-start"><div class="chat-image avatar">
|
||||||
<div class="w-10 rounded-full">
|
<div class="w-10 rounded-full">
|
||||||
<img src="https://cdn-img.czl.net/2023/08/10/64d3b8c9819c7.png" />
|
<img src="https://i-cf.czl.net/r2/2023/08/10/64d3b8c9819c7.png" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-header">AI</div><div class="chat-bubble chat-bubble-error prose prose-slate">Error: ${error.message}</div><div>`);
|
<div class="chat-header">AI</div><div class="chat-bubble chat-bubble-error prose prose-slate">Error: ${error.message}</div><div>`);
|
||||||
@ -322,7 +297,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js" defer></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js" defer></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user