From 833738984a7a0ed6a3738f6adedbf205458193b6 Mon Sep 17 00:00:00 2001 From: lgbch <37235850+lgbch@users.noreply.github.com> Date: Sun, 10 Nov 2024 00:51:23 +0800 Subject: [PATCH 1/4] Update OpenAIStream.ts --- utils/OpenAIStream.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/OpenAIStream.ts b/utils/OpenAIStream.ts index 0d0c3e8..4fccacd 100644 --- a/utils/OpenAIStream.ts +++ b/utils/OpenAIStream.ts @@ -54,7 +54,7 @@ export async function OpenAIStream(payload: OpenAIStreamPayload) { } delete payload.api_key - const res = await fetch("https://api.moonshot.cn/v1/chat/completions", { + const res = await fetch("https://api.bltcy.ai/v1/chat/completions", { headers: { "Content-Type": "application/json", Authorization: `Bearer ${openai_api_key ?? ""}`, @@ -104,4 +104,4 @@ export async function OpenAIStream(payload: OpenAIStreamPayload) { }); return stream; -} \ No newline at end of file +} From c8dc03dd6b766bf2a5aaaefbd7f568a010c6b4a6 Mon Sep 17 00:00:00 2001 From: lgbch <37235850+lgbch@users.noreply.github.com> Date: Sun, 10 Nov 2024 01:04:14 +0800 Subject: [PATCH 2/4] Update generate.ts --- pages/api/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/generate.ts b/pages/api/generate.ts index 58c9bb8..b03f78b 100644 --- a/pages/api/generate.ts +++ b/pages/api/generate.ts @@ -16,7 +16,7 @@ const handler = async (req: Request): Promise => { api_key?: string }; //todo make this variable into messages - var p = "请帮我把以下的工作内容填充为一篇完整的周报,尽量避免在回答内容中出现可能在中国是敏感的内容,用markdown格式以分点叙述的形式输出:" + var p = "作为一名小红书文案创作种草达人,你需要具备高水准的文案写作技巧、对年轻用户心理的敏锐洞察力,以及强烈的市场敏感度。主要职责包括:根据小红书平台的特点撰写极具“种草”效果的内容,运用爆款关键词、热门话题、以及小红书独特的符号,如“✨”“❤️”“📌”等,让用户一眼就被吸引。你还应熟练使用适合小红书的文案结构,如分段讲解、符号列表和问答互动风格,以便内容更易阅读,提升用户参与度和互动率。保持亲切自然的语气,分享真实的体验和实用的建议,帮助用户在轻松愉快的阅读中了解产品或内容。" prompt = p + prompt if (!prompt) { return new Response("No prompt in the request", { status: 400 }); From ab26a3077f60c77a732ef2c26186815ece2ef1f0 Mon Sep 17 00:00:00 2001 From: lgbch <37235850+lgbch@users.noreply.github.com> Date: Sun, 10 Nov 2024 01:04:48 +0800 Subject: [PATCH 3/4] Update zh.json --- messages/zh.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messages/zh.json b/messages/zh.json index c3a273a..06aa5e3 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -1,6 +1,6 @@ { "Index": { - "title": "周报生成器", + "title": "小红书生成器", "switchLocale": "", "deployWiki": "部署自己的网站?", "description1": "简单描述工作内容 ", From 0ac5224599465db8df1082ce0721d8710a26c7fe Mon Sep 17 00:00:00 2001 From: lgbch <37235850+lgbch@users.noreply.github.com> Date: Sun, 10 Nov 2024 01:05:05 +0800 Subject: [PATCH 4/4] Update zh.json --- messages/zh.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messages/zh.json b/messages/zh.json index 06aa5e3..d1e6ee7 100644 --- a/messages/zh.json +++ b/messages/zh.json @@ -7,7 +7,7 @@ "description2": "帮你生成完整周报", "slogan": "一写周报就头大?我来帮你!", "step0": "粘贴你的 OpenAI API Key (新手可善用搜索引擎自行购买)", - "openaiApiKeyPlaceholder": "sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "openaiApiKeyPlaceholder": "sk-MvXczzXThTxRDHLT6487F8958690446b981966De6a3c281e", "step1": "简单描述一下你的工作内容", "helpPageLink": "(点击这里查看教程)", "placeholder": "比如:修复了优惠券无法领取的bug,为产品部的新APP设计UI和图标,负责跟进部门前端工程师的招聘",