This commit is contained in:
Archer
2025-06-03 16:41:50 +08:00
committed by archer
parent 92c38d9d2f
commit 86f5a68d8c
7 changed files with 31 additions and 29 deletions

View File

@@ -286,3 +286,14 @@ export type SearchDataResponseItemType = Omit<
score: { type: `${SearchScoreTypeEnum}`; value: number; index: number }[];
// score: number;
};
export type DatasetCiteItemType = {
_id: string;
q: string;
a?: string;
imagePreivewUrl?: string;
history?: DatasetDataSchemaType['history'];
updateTime: DatasetDataSchemaType['updateTime'];
index: DatasetDataSchemaType['chunkIndex'];
updated?: boolean;
};

View File

@@ -1,6 +1,5 @@
import { getDatasetImagePreviewUrl } from '../image/utils';
import type { QuoteDataItemType } from '../../../../../projects/app/src/service/core/chat/constants';
import type { DatasetDataSchemaType } from '@fastgpt/global/core/dataset/type';
import type { DatasetCiteItemType, DatasetDataSchemaType } from '@fastgpt/global/core/dataset/type';
export const formatDatasetDataValue = ({
q,
@@ -41,7 +40,7 @@ export const formatDatasetDataValue = ({
};
export const getFormatDatasetCiteList = (list: DatasetDataSchemaType[]) => {
return list.map<QuoteDataItemType>((item) => ({
return list.map<DatasetCiteItemType>((item) => ({
_id: item._id,
...formatDatasetDataValue({
teamId: item.teamId,