mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 12:48:30 +00:00
4.6.3-website dataset (#532)
This commit is contained in:
20
projects/app/src/global/core/api/datasetReq.d.ts
vendored
20
projects/app/src/global/core/api/datasetReq.d.ts
vendored
@@ -12,15 +12,6 @@ import { PermissionTypeEnum } from '@fastgpt/global/support/permission/constant'
|
||||
import type { LLMModelItemType } from '@fastgpt/global/core/ai/model.d';
|
||||
|
||||
/* ===== dataset ===== */
|
||||
export type DatasetUpdateParams = {
|
||||
id: string;
|
||||
parentId?: string;
|
||||
tags?: string[];
|
||||
name?: string;
|
||||
avatar?: string;
|
||||
permission?: `${PermissionTypeEnum}`;
|
||||
agentModel?: LLMModelItemType;
|
||||
};
|
||||
|
||||
/* ======= collections =========== */
|
||||
export type GetDatasetCollectionsProps = RequestPaging & {
|
||||
@@ -30,16 +21,7 @@ export type GetDatasetCollectionsProps = RequestPaging & {
|
||||
simple?: boolean;
|
||||
selectFolder?: boolean;
|
||||
};
|
||||
export type CreateDatasetCollectionParams = {
|
||||
datasetId: string;
|
||||
parentId?: string;
|
||||
name: string;
|
||||
type: `${DatasetCollectionTypeEnum}`;
|
||||
trainingType?: `${DatasetCollectionTrainingModeEnum}`;
|
||||
chunkSize?: number;
|
||||
fileId?: string;
|
||||
rawLink?: string;
|
||||
};
|
||||
|
||||
export type UpdateDatasetCollectionParams = {
|
||||
id: string;
|
||||
parentId?: string;
|
||||
|
@@ -1,5 +1,9 @@
|
||||
import { PushDatasetDataChunkProps } from '@fastgpt/global/core/dataset/api';
|
||||
import { DatasetSearchModeEnum, TrainingModeEnum } from '@fastgpt/global/core/dataset/constant';
|
||||
import {
|
||||
DatasetSearchModeEnum,
|
||||
DatasetTypeEnum,
|
||||
TrainingModeEnum
|
||||
} from '@fastgpt/global/core/dataset/constant';
|
||||
import {
|
||||
DatasetDataIndexItemType,
|
||||
SearchDataResponseItemType
|
||||
@@ -8,8 +12,9 @@ import {
|
||||
/* ================= dataset ===================== */
|
||||
export type CreateDatasetParams = {
|
||||
parentId?: string;
|
||||
type: `${DatasetTypeEnum}`;
|
||||
name: string;
|
||||
tags: string;
|
||||
intro: string;
|
||||
avatar: string;
|
||||
vectorModel?: string;
|
||||
agentModel?: string;
|
||||
|
@@ -27,57 +27,56 @@ export const Prompt_QuotePromptList: PromptTemplateItem[] = [
|
||||
{
|
||||
title: '标准模板',
|
||||
desc: '',
|
||||
value: `你的背景知识:
|
||||
value: `你的知识库:
|
||||
"""
|
||||
{{quote}}
|
||||
"""
|
||||
对话要求:
|
||||
1. 背景知识是最新的实时的信息,使用背景知识回答问题。
|
||||
2. 优先使用背景知识的内容回答我的问题,答案应与背景知识严格一致。
|
||||
3. 背景知识无法回答我的问题时,可以忽略背景知识,根据你的知识来自由回答。
|
||||
4. 使用对话的风格,自然的回答问题。包含markdown内容,需按markdown格式返回。
|
||||
回答要求:
|
||||
1. 优先使用知识库内容回答问题。
|
||||
2. 你可以回答我不知道。
|
||||
3. 不要提及你是从知识库获取的知识。
|
||||
4. 知识库包含 markdown 内容时,按 markdown 格式返回。
|
||||
我的问题是:"{{question}}"`
|
||||
},
|
||||
{
|
||||
title: '问答模板',
|
||||
desc: '',
|
||||
value: `你的背景知识:
|
||||
value: `你的知识库:
|
||||
"""
|
||||
{{quote}}
|
||||
"""
|
||||
对话要求:
|
||||
1. 背景知识是最新的实时的信息,使用背景知识回答问题,其中 instruction 是相关介绍,output 是预期回答或补充。
|
||||
2. 优先使用背景知识的内容回答我的问题,答案应与背景知识严格一致。
|
||||
3. 背景知识无法回答我的问题时,可以忽略背景知识,根据你的知识来自由回答。
|
||||
4. 使用对话的风格,自然的回答问题。包含markdown内容,需按markdown格式返回。
|
||||
回答要求:
|
||||
1. 优先使用知识库内容回答问题,其中 instruction 是相关介绍,output 是预期回答或补充。
|
||||
2. 你可以回答我不知道。
|
||||
3. 不要提及你是从知识库获取的知识。
|
||||
4. 知识库包含 markdown 内容时,按 markdown 格式返回。
|
||||
我的问题是:"{{question}}"`
|
||||
},
|
||||
{
|
||||
title: '标准严格模板',
|
||||
desc: '',
|
||||
value: `你的背景知识:
|
||||
value: `你的知识库:
|
||||
"""
|
||||
{{quote}}
|
||||
"""
|
||||
对话要求:
|
||||
1. 背景知识是最新的实时的信息,是你的唯一信息来源,使用背景知识回答问题。
|
||||
2. 优先使用背景知识回答我的问题,答案与背景知识完全一致,无需做其他回答。
|
||||
3. 背景知识与问题无关,或背景知识无法回答本次问题时,则拒绝回答本次问题:“我不太清除xxx”。
|
||||
4. 使用对话的风格,自然的回答问题。包含markdown内容,需按markdown格式返回。
|
||||
回答要求:
|
||||
1. 仅使用知识库内容回答问题。
|
||||
2. 与知识库无关的问题,你直接回答我不知道。
|
||||
3. 不要提及你是从知识库获取的知识。
|
||||
4. 知识库包含 markdown 内容时,按 markdown 格式返回。
|
||||
我的问题是:"{{question}}"`
|
||||
},
|
||||
{
|
||||
title: '严格问答模板',
|
||||
desc: '',
|
||||
value: `你的背景知识:
|
||||
value: `你的知识库:
|
||||
"""
|
||||
{{quote}}
|
||||
"""
|
||||
对话要求:
|
||||
1. 背景知识是最新的实时的信息,是你的唯一信息来源,使用背景知识回答问题。
|
||||
2. 在背景知识的 JSON 中,question 是相关问题,answer 是已知答案。
|
||||
3. 选择 answer 中的内容作为答案,要求答案与 answer 完全一致,无需做其他回答。
|
||||
4. answer 中的答案无法满足问题,直接回复:“我不太清除xxx”。
|
||||
回答要求:
|
||||
1. 从知识库中选择一个合适的答案进行回答,其中 instruction 是相关问题,answer 是已知答案。
|
||||
2. 与知识库无关的问题,你直接回答我不知道。
|
||||
3. 不要提及你是从知识库获取的知识。
|
||||
我的问题是:"{{question}}"`
|
||||
}
|
||||
];
|
||||
|
Reference in New Issue
Block a user