mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 11:43:56 +00:00

* feat:Prompt task (#3337) * feat:猜你想问自定义功能 * 修改用户输入框部分,去除冗余代码 * 删除不必要的属性 * 删除多余内容 * 修正了格式问题,并实现获取调试和app最新参数 * 修正了几行代码 * feat:Prompt task (#3337) * feat:猜你想问自定义功能 * 修改用户输入框部分,去除冗余代码 * 删除不必要的属性 * 删除多余内容 * 修正了格式问题,并实现获取调试和app最新参数 * 修正了几行代码 * perf: question gudide code * fix: i18n * hunyuan logo * fix: cq templates * perf: create question guide code * udpate svg --------- Co-authored-by: Jiangween <145003935+Jiangween@users.noreply.github.com>
78 lines
2.8 KiB
TypeScript
78 lines
2.8 KiB
TypeScript
export const Prompt_AgentQA = {
|
||
description: `<Context></Context> 标记中是一段文本,学习和分析它,并整理学习成果:
|
||
- 提出问题并给出每个问题的答案。
|
||
- 答案需详细完整,尽可能保留原文描述,可以适当扩展答案描述。
|
||
- 答案可以包含普通文字、链接、代码、表格、公示、媒体链接等 Markdown 元素。
|
||
- 最多提出 50 个问题。
|
||
- 生成的问题和答案和源文本语言相同。
|
||
`,
|
||
fixedText: `请按以下格式整理学习成果:
|
||
<Context>
|
||
文本
|
||
</Context>
|
||
Q1: 问题。
|
||
A1: 答案。
|
||
Q2:
|
||
A2:
|
||
|
||
------
|
||
|
||
我们开始吧!
|
||
|
||
<Context>
|
||
{{text}}
|
||
</Context>
|
||
`
|
||
};
|
||
|
||
export const Prompt_ExtractJson = `你可以从 <对话记录></对话记录> 中提取指定 Json 信息,你仅需返回 Json 字符串,无需回答问题。
|
||
<提取要求>
|
||
{{description}}
|
||
</提取要求>
|
||
|
||
<提取规则>
|
||
- 本次需提取的 json 字符串,需符合 JsonSchema 的规则。
|
||
- type 代表数据类型; key 代表字段名; description 代表字段的描述; enum 是枚举值,代表可选的 value。
|
||
- 如果没有可提取的内容,忽略该字段。
|
||
</提取规则>
|
||
|
||
<JsonSchema>
|
||
{{json}}
|
||
</JsonSchema>
|
||
|
||
<对话记录>
|
||
{{text}}
|
||
</对话记录>
|
||
|
||
提取的 json 字符串:`;
|
||
|
||
export const Prompt_CQJson = `请帮我执行一个“问题分类”任务,将问题分类为以下几种类型之一:
|
||
|
||
"""
|
||
{{typeList}}
|
||
"""
|
||
|
||
## 背景知识
|
||
{{systemPrompt}}
|
||
|
||
## 对话记录
|
||
{{history}}
|
||
|
||
## 开始任务
|
||
|
||
现在,我们开始分类,我会给你一个"问题",请结合背景知识和对话记录,将问题分类到对应的类型中,并返回类型ID。
|
||
|
||
问题:"{{question}}"
|
||
类型ID=
|
||
`;
|
||
|
||
export const PROMPT_QUESTION_GUIDE = `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.
|
||
|
||
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 const PROMPT_QUESTION_GUIDE_FOOTER = `Please strictly follow the format rules: \nReturn questions in JSON format: ['Question 1', 'Question 2', 'Question 3']. Your output: `;
|