Files
wehub-resource-sync 221778fa98
rowboat / apps/x Vitest suites (push) Has been cancelled
rowboat / apps/x Electron package smoke test (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:33:34 +08:00

18 lines
594 B
TypeScript

import '../lib/loadenv';
import { qdrantClient } from '../lib/qdrant';
const EMBEDDING_VECTOR_SIZE = Number(process.env.EMBEDDING_VECTOR_SIZE) || 1536;
(async () => {
try {
const result = await qdrantClient.createCollection('embeddings', {
vectors: {
size: EMBEDDING_VECTOR_SIZE,
distance: 'Dot',
},
});
console.log(`Create qdrant collection 'embeddings' completed with result: ${result}`);
} catch (error) {
console.error(`Unable to create qdrant collection 'embeddings': ${error}`);
}
})();