({
apitype: 'chatgpt-api',
model: 'chatgpt-web' == apitype ? 'text-davinci-002-render-sha' : 'gpt-3.5-turbo',
- max_tokens: 4000,
+ max_tokens: 2000,
temperature: 0.8,
top_p: 1.0,
presence_penalty: 1.0,
@@ -121,48 +121,16 @@ function Option(props: { chat: Chat }) {
-
+
-
+
-
+
-
+
>
diff --git a/src/components/pages/prompt/Edit.tsx b/src/components/pages/prompt/Edit.tsx
index c686d87..2b5178b 100644
--- a/src/components/pages/prompt/Edit.tsx
+++ b/src/components/pages/prompt/Edit.tsx
@@ -20,6 +20,8 @@ function Edit(props: { action: string; page: boolean; prompt?: Prompt; edit: boo
const [initForm, setInitForm] = useState
({
type: 'text',
name: prompt?.name || '',
+ lang: lang,
+ ...prompt,
context: prompt?.context || [
{
key: 'user',
@@ -27,7 +29,15 @@ function Edit(props: { action: string; page: boolean; prompt?: Prompt; edit: boo
content: prompt?.prompt || '',
},
],
- ...prompt,
+ modelConfig: {
+ model: Model['GPT-3.5-Turbo'],
+ max_tokens: 2000,
+ top_p: 1.0,
+ temperature: 0.8,
+ presence_penalty: 1.0,
+ frequency_penalty: 0,
+ ...prompt?.modelConfig,
+ },
})
const [form] = Form.useForm()
@@ -133,7 +143,7 @@ function Edit(props: { action: string; page: boolean; prompt?: Prompt; edit: boo
-