4.8.10 test (#2433)

* perf: node template ui

* perf: select tool path load error

* pay i18n

* i18n

* perf: oneapi code

* perf: doc

* node templates

* perf: usage table role

* feat: count vector total by datasetId

* perf: user select tip and tempalte market ui

* i18n

* perf: sso config tip
This commit is contained in:
Archer
2024-08-20 18:31:40 +08:00
committed by GitHub
parent 40b1d22d9d
commit 26d800981c
27 changed files with 345 additions and 160 deletions

View File

@@ -20,6 +20,7 @@ export const deleteDatasetDataVector = Vector.delete;
export const recallFromVectorStore = Vector.embRecall;
export const getVectorDataByTime = Vector.getVectorDataByTime;
export const getVectorCountByTeamId = Vector.getVectorCountByTeamId;
export const getVectorCountByDatasetId = Vector.getVectorCountByDatasetId;
export const insertDatasetDataVector = async ({
model,

View File

@@ -297,6 +297,20 @@ export class MilvusCtrl {
return total;
};
getVectorCountByDatasetId = async (teamId: string, datasetId: string) => {
const client = await this.getClient();
const result = await client.query({
collection_name: DatasetVectorTableName,
output_fields: ['count(*)'],
filter: `(teamId == "${String(teamId)}") and (dataset == "${String(datasetId)}")`
});
const total = result.data?.[0]?.['count(*)'] as number;
return total;
};
getVectorDataByTime = async (start: Date, end: Date) => {
const client = await this.getClient();
const startTimestamp = new Date(start).getTime();

View File

@@ -205,13 +205,6 @@ export class PgVectorCtrl {
});
}
};
getVectorCountByTeamId = async (teamId: string) => {
const total = await PgClient.count(DatasetVectorTableName, {
where: [['team_id', String(teamId)]]
});
return total;
};
getVectorDataByTime = async (start: Date, end: Date) => {
const { rows } = await PgClient.query<{
id: string;
@@ -230,4 +223,18 @@ export class PgVectorCtrl {
datasetId: item.dataset_id
}));
};
getVectorCountByTeamId = async (teamId: string) => {
const total = await PgClient.count(DatasetVectorTableName, {
where: [['team_id', String(teamId)]]
});
return total;
};
getVectorCountByDatasetId = async (teamId: string, datasetId: string) => {
const total = await PgClient.count(DatasetVectorTableName, {
where: [['team_id', String(teamId)], 'and', ['dataset_id', String(datasetId)]]
});
return total;
};
}

View File

@@ -112,7 +112,7 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
systemPrompt,
stringQuoteText
}),
(async () => {
(() => {
// censor model and system key
if (modelConstantsData.censor && !user.openaiAccount?.key) {
return postTextCensor({

View File

@@ -469,7 +469,7 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
// start process width initInput
const entryNodes = runtimeNodes.filter((item) => item.isEntry);
console.log(runtimeEdges);
// reset entry
// runtimeNodes.forEach((item) => {
// item.isEntry = false;