mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
fix: variable label i18n & create question guide language (#2933)
This commit is contained in:
@@ -4,11 +4,15 @@ import { countGptMessagesTokens } from '../../../common/string/tiktoken/index';
|
||||
import { loadRequestMessages } from '../../chat/utils';
|
||||
import { llmCompletionsBodyFormat } from '../utils';
|
||||
|
||||
export const Prompt_QuestionGuide = `你是一个AI智能助手,你的任务是结合对话记录,推测我下一步的问题。
|
||||
你需要生成 3 个可能的问题,引导我继续提问,生成的问题要求:
|
||||
1. 生成问题的语言,与最后一个用户提问语言一致。
|
||||
2. 问题的长度应小于20个字符。
|
||||
3. 按 JSON 格式返回: ["question1", "question2", "question3"]。`;
|
||||
export const Prompt_QuestionGuide = `You are an AI assistant tasked with predicting the user's next question based on the conversation history. Your goal is to generate 3 potential questions that will guide the user to continue the conversation. When generating these questions, adhere to the following rules:
|
||||
|
||||
1. Use the same language as the user's last question in the conversation history.
|
||||
2. Keep each question under 20 characters in length.
|
||||
3. Return the questions in JSON format: ["question1", "question2", "question3"].
|
||||
|
||||
Analyze the conversation history provided to you and use it as context to generate relevant and engaging follow-up questions. Your predictions should be logical extensions of the current topic or related areas that the user might be interested in exploring further.
|
||||
|
||||
Remember to maintain consistency in tone and style with the existing conversation while providing diverse options for the user to choose from. Your goal is to keep the conversation flowing naturally and help the user delve deeper into the subject matter or explore related topics.`;
|
||||
|
||||
export async function createQuestionGuide({
|
||||
messages,
|
||||
|
Reference in New Issue
Block a user