mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 22:03:54 +00:00
@@ -38,22 +38,22 @@ export const insertDatasetDataVector = async ({
|
||||
};
|
||||
};
|
||||
|
||||
// export const updateDatasetDataVector = async ({
|
||||
// id,
|
||||
// ...props
|
||||
// }: InsertVectorProps & {
|
||||
// id: string;
|
||||
// query: string;
|
||||
// model: VectorModelItemType;
|
||||
// }) => {
|
||||
// // insert new vector
|
||||
// const { charsLength, insertId } = await insertDatasetDataVector(props);
|
||||
export const updateDatasetDataVector = async ({
|
||||
id,
|
||||
...props
|
||||
}: InsertVectorProps & {
|
||||
id: string;
|
||||
query: string;
|
||||
model: VectorModelItemType;
|
||||
}) => {
|
||||
// insert new vector
|
||||
const { charsLength, insertId } = await insertDatasetDataVector(props);
|
||||
|
||||
// // delete old vector
|
||||
// await deleteDatasetDataVector({
|
||||
// teamId: props.teamId,
|
||||
// id
|
||||
// });
|
||||
// delete old vector
|
||||
await deleteDatasetDataVector({
|
||||
teamId: props.teamId,
|
||||
id
|
||||
});
|
||||
|
||||
// return { charsLength, insertId };
|
||||
// };
|
||||
return { charsLength, insertId };
|
||||
};
|
||||
|
Reference in New Issue
Block a user