From 83d755ad0e41ea49f988f0568d1a71fda9e852d2 Mon Sep 17 00:00:00 2001
From: archer <545436317@qq.com>
Date: Sat, 24 Jun 2023 18:55:46 +0800
Subject: [PATCH] feat: limit prompt
---
client/src/api/response/chat.d.ts | 1 +
client/src/components/Select/index.tsx | 2 +-
client/src/constants/model.ts | 1 +
client/src/pages/api/chat/init.ts | 1 +
.../src/pages/api/openapi/kb/appKbSearch.ts | 32 ++++++----
.../pages/api/openapi/v1/chat/completions.ts | 47 ++++++++++-----
client/src/pages/chat/index.tsx | 13 ++--
.../components/detail/components/Settings.tsx | 59 +++++++++++++------
client/src/service/models/model.ts | 5 +-
client/src/types/mongoSchema.d.ts | 1 +
10 files changed, 110 insertions(+), 52 deletions(-)
diff --git a/client/src/api/response/chat.d.ts b/client/src/api/response/chat.d.ts
index 2d35c78dc..c8c5480be 100644
--- a/client/src/api/response/chat.d.ts
+++ b/client/src/api/response/chat.d.ts
@@ -5,6 +5,7 @@ export interface InitChatResponse {
chatId: string;
modelId: string;
systemPrompt?: string;
+ limitPrompt?: string;
model: {
name: string;
avatar: string;
diff --git a/client/src/components/Select/index.tsx b/client/src/components/Select/index.tsx
index 5faf81d58..4999d5a9d 100644
--- a/client/src/components/Select/index.tsx
+++ b/client/src/components/Select/index.tsx
@@ -26,7 +26,7 @@ const MySelect = ({ placeholder, value, width = 'auto', list, onchange, ...props
return (