perf: prompt and gpt4

This commit is contained in:
archer
2023-05-10 12:03:54 +08:00
parent e3c9b8179e
commit cdf4b9f324
12 changed files with 47 additions and 24 deletions

View File

@@ -25,9 +25,9 @@ export const lafClaudChat = async ({
.filter((item) => item.obj === 'System')
.map((item) => item.value)
.join('\n');
const systemPromptText = systemPrompt ? `\n知识库内容:'${systemPrompt}'\n` : '';
const systemPromptText = systemPrompt ? `你本次知识:${systemPrompt}\n` : '';
const prompt = `${systemPromptText}\n我的问题是:'${messages[messages.length - 1].value}'`;
const prompt = `${systemPromptText}我的问题是:'${messages[messages.length - 1].value}'`;
const lafResponse = await axios.post(
'https://hnvacz.laf.run/claude-gpt',