feat: node prompt version (#4141)

* feat: node prompt version

* fix

* delete unused code

* fix

* fix code
This commit is contained in:
heheer
2025-03-19 21:46:57 +08:00
committed by archer
parent 6a4eada85b
commit 8eec8566db
17 changed files with 206 additions and 107 deletions

View File

@@ -4,8 +4,8 @@ import { countGptMessagesTokens, countPromptTokens } from '../../../common/strin
import { loadRequestMessages } from '../../chat/utils';
import { llmCompletionsBodyFormat } from '../utils';
import {
PROMPT_QUESTION_GUIDE,
PROMPT_QUESTION_GUIDE_FOOTER
getQuestionGuideFooterPrompt,
getQuestionGuidePrompt
} from '@fastgpt/global/core/ai/prompt/agent';
import { addLog } from '../../../common/system/log';
import json5 from 'json5';
@@ -27,7 +27,7 @@ export async function createQuestionGuide({
...messages,
{
role: 'user',
content: `${customPrompt || PROMPT_QUESTION_GUIDE}\n${PROMPT_QUESTION_GUIDE_FOOTER}`
content: `${customPrompt || getQuestionGuidePrompt()}\n${getQuestionGuideFooterPrompt()}`
}
];
const requestMessages = await loadRequestMessages({