mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 08:26:22 +02:00
18 lines
No EOL
594 B
TypeScript
18 lines
No EOL
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}`);
|
|
}
|
|
})(); |