Commercial baseurl (#697)

This commit is contained in:
Archer
2024-01-06 10:36:31 +08:00
committed by GitHub
parent dfa4c0831c
commit 84cc4baf21
44 changed files with 124 additions and 119 deletions

View File

@@ -1,24 +0,0 @@
import { MongoDatasetData } from '@fastgpt/service/core/dataset/data/schema';
/**
* Same value judgment
*/
export async function hasSameValue({
collectionId,
q,
a = ''
}: {
collectionId: string;
q: string;
a?: string;
}) {
const count = await MongoDatasetData.countDocuments({
q,
a,
collectionId
});
if (count > 0) {
return Promise.reject('已经存在完全一致的数据');
}
}