Update docs and response tag in share page (#694)

* perf: chunk index show

* share response

* perf: vector query

* web printFinger

* remove log

* fix: bucket name

* perf: training schema

* perf: sort index
This commit is contained in:
Archer
2024-01-05 18:02:37 +08:00
committed by GitHub
parent 331d18c88f
commit 3f088bce6a
23 changed files with 242 additions and 181 deletions

View File

@@ -295,7 +295,7 @@ export async function searchDatasetData(props: {
const embeddingRecall = async ({ query, limit }: { query: string; limit: number }) => {
const { vectors, tokens } = await getVectorsByText({
model,
input: [query]
input: query
});
const { results } = await recallFromVectorStore({

View File

@@ -26,6 +26,8 @@ export async function generateVector(): Promise<any> {
if (global.vectorQueueLen >= global.systemEnv.vectorMaxProcess) return;
global.vectorQueueLen++;
const start = Date.now();
// get training data
const {
data,
@@ -154,6 +156,8 @@ export async function generateVector(): Promise<any> {
await MongoDatasetTraining.findByIdAndDelete(data._id);
reduceQueue();
generateVector();
console.log(`embedding finished, time: ${Date.now() - start}ms`);
} catch (err: any) {
reduceQueue(true);
// log