From f8b963df6d3647272c28be36e9a1de85529b7696 Mon Sep 17 00:00:00 2001 From: Fred Liang Date: Thu, 28 Dec 2023 22:56:01 +0800 Subject: [PATCH 1/3] chore(docs): update readme for Gemini Pro (#3685) * chore: update auth value logic * chore: bump version 2.10.1 * Chore [Package] Downgrade Tauri Builder Version (#3656) - [+] chore(package.json): update @tauri-apps/cli devDependency to version 1.5.7 - [+] chore(yarn.lock): update @tauri-apps/cli versions to 1.5.7 * chore: update README.md --------- Co-authored-by: H0llyW00dzZ --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 69b649926..a42cbd1d4 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,11 @@ One-Click to get a well-designed cross-platform ChatGPT web UI, with GPT3, GPT4 ## What's New -- πŸš€ v2.0 is released, now you can create prompt templates, turn your ideas into reality! Read this: [ChatGPT Prompt Engineering Tips: Zero, One and Few Shot Prompting](https://www.allabtai.com/prompt-engineering-tips-zero-one-and-few-shot-prompting/). -- πŸš€ v2.7 let's share conversations as image, or share to ShareGPT! -- πŸš€ v2.8 now we have a client that runs across all platforms! +- πŸš€ v2.10.1 support Google Gemini Pro model. - πŸš€ v2.9.11 you can use azure endpoint now. +- πŸš€ v2.8 now we have a client that runs across all platforms! +- πŸš€ v2.7 let's share conversations as image, or share to ShareGPT! +- πŸš€ v2.0 is released, now you can create prompt templates, turn your ideas into reality! Read this: [ChatGPT Prompt Engineering Tips: Zero, One and Few Shot Prompting](https://www.allabtai.com/prompt-engineering-tips-zero-one-and-few-shot-prompting/). ## δΈ»θ¦εŠŸθƒ½ From 406530ca69d9f6bd1159e1ff8bde98ec0a3306e2 Mon Sep 17 00:00:00 2001 From: Fred Liang Date: Thu, 28 Dec 2023 23:10:19 +0800 Subject: [PATCH 2/3] feat: support vercel speed insight (#3686) --- app/layout.tsx | 13 ++++++++++++- app/page.tsx | 6 +++++- package.json | 1 + yarn.lock | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index b234051f9..be2162475 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,6 +4,10 @@ import "./styles/markdown.scss"; import "./styles/highlight.scss"; import { getClientConfig } from "./config/client"; import { type Metadata } from "next"; +import { SpeedInsights } from "@vercel/speed-insights/next"; +import { getServerSideConfig } from "./config/server"; + +const serverConfig = getServerSideConfig(); export const metadata: Metadata = { title: "NextChat", @@ -35,7 +39,14 @@ export default function RootLayout({ - {children} + + {children} + {serverConfig?.isVercel && ( + <> + + + )} + ); } diff --git a/app/page.tsx b/app/page.tsx index 20b503174..b3f169a9b 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -10,7 +10,11 @@ export default async function App() { return ( <> - {serverConfig?.isVercel && } + {serverConfig?.isVercel && ( + <> + + + )} ); } diff --git a/package.json b/package.json index 102461b31..a014c7bfe 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "@hello-pangea/dnd": "^16.5.0", "@svgr/webpack": "^6.5.1", "@vercel/analytics": "^0.1.11", + "@vercel/speed-insights": "^1.0.2", "emoji-picker-react": "^4.5.15", "fuse.js": "^7.0.0", "html-to-image": "^1.11.11", diff --git a/yarn.lock b/yarn.lock index 5469672db..bf07c27ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1704,6 +1704,11 @@ resolved "https://registry.yarnpkg.com/@vercel/analytics/-/analytics-0.1.11.tgz#727a0ac655a4a89104cdea3e6925476470299428" integrity sha512-mj5CPR02y0BRs1tN3oZcBNAX9a8NxsIUl9vElDPcqxnMfP0RbRc9fI9Ud7+QDg/1Izvt5uMumsr+6YsmVHcyuw== +"@vercel/speed-insights@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@vercel/speed-insights/-/speed-insights-1.0.2.tgz#1bebf3e7c7046b6a911721233b263b69214ddb3e" + integrity sha512-y5HWeB6RmlyVYxJAMrjiDEz8qAIy2cit0fhBq+MD78WaUwQvuBnQlX4+5MuwVTWi46bV3klaRMq83u9zUy1KOg== + "@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": version "1.11.6" resolved "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" From 3ba598633c4f3b640ea2c8ecc0a604eed39b42e4 Mon Sep 17 00:00:00 2001 From: reece00 <37351410+reece00@users.noreply.github.com> Date: Thu, 28 Dec 2023 23:52:45 +0800 Subject: [PATCH 3/3] Non -GPT model disable system prompt (#3684) --- app/store/chat.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index 4af5a52ac..dff6b7bf1 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -386,7 +386,9 @@ export const useChatStore = createPersistStore( const contextPrompts = session.mask.context.slice(); // system prompts, to get close to OpenAI Web ChatGPT - const shouldInjectSystemPrompts = modelConfig.enableInjectSystemPrompts; + const shouldInjectSystemPrompts = + modelConfig.enableInjectSystemPrompts && + session.mask.modelConfig.model.startsWith("gpt-"); var systemPrompts: ChatMessage[] = []; systemPrompts = shouldInjectSystemPrompts