你正常点
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
- 对话记录使用浏览器的 localStorage 保存在本地
|
||||
- 可删除对话消息
|
||||
- 可以设置 system message (如:"你是一个喵娘",参见官方 [API 文档](https://platform.openai.com/docs/guides/chat))
|
||||
- 可以设置 system message (如:"你是一个猫娘",参见官方 [API 文档](https://platform.openai.com/docs/guides/chat))
|
||||
- 可以为不同对话设置不同 APIKEY
|
||||
- 小(整个网页 30k 左右)
|
||||
- 可以设置不同的 API Endpoint(方便墙内人士使用反向代理转发 API 请求)
|
||||
@@ -21,8 +21,6 @@
|
||||
|
||||

|
||||
|
||||
~~让喵娘统治世界吧((发病.webp~~
|
||||
|
||||
## 使用
|
||||
|
||||
以下任意方式都可:
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface ChatStore {
|
||||
const _defaultAPIEndpoint = "https://api.openai.com/v1/chat/completions";
|
||||
const newChatStore = (
|
||||
apiKey = "",
|
||||
systemMessageContent = "你是一个猫娘,你要模仿猫娘的语气说话",
|
||||
systemMessageContent = "你是一个有用的人工智能助理",
|
||||
apiEndpoint = _defaultAPIEndpoint,
|
||||
streamMode = true
|
||||
): ChatStore => {
|
||||
|
||||
@@ -164,17 +164,17 @@ export default function ChatBOX(props: {
|
||||
<div className="grow overflow-scroll">
|
||||
{!chatStore.apiKey && (
|
||||
<p className="opacity-60 p-6 rounded bg-white my-3 text-left">
|
||||
喵喵,请先在上方设置 (OPENAI) API KEY
|
||||
请先在上方设置 (OPENAI) API KEY
|
||||
</p>
|
||||
)}
|
||||
{!chatStore.apiEndpoint && (
|
||||
<p className="opacity-60 p-6 rounded bg-white my-3 text-left">
|
||||
喵喵,请先在上方设置 API Endpoint
|
||||
请先在上方设置 API Endpoint
|
||||
</p>
|
||||
)}
|
||||
{chatStore.history.length === 0 && (
|
||||
<p className="opacity-60 p-6 rounded bg-white my-3 text-left">
|
||||
这里什么都没有哦 QwQ
|
||||
暂无历史对话记录
|
||||
</p>
|
||||
)}
|
||||
{chatStore.history.map((chat, i) => {
|
||||
@@ -226,7 +226,7 @@ export default function ChatBOX(props: {
|
||||
<p className="p-2 my-2 animate-pulse">
|
||||
{generatingMessage
|
||||
? generatingMessage.split("\n").map((line) => <p>{line}</p>)
|
||||
: "生成中,保持网络稳定喵"}
|
||||
: "生成中,请保持网络稳定"}
|
||||
...
|
||||
</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user