Skip to content

Commit f1a80db

Browse files
committed
[Refactor] Update sync script and environment variables for Qdrant configuration
1 parent 202c34d commit f1a80db

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

Backend/.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,7 @@ MIGRATIONS_DIR=src/migrations
4242
JWT_SECRET=L35r5AyOj22+Ue4lRnAzFzUOjGeaMih1nAZjL1lqS90=
4343
JWT_EXPIRES_IN=24h
4444

45-
OPENAI_API_KEY=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
45+
OPENAI_API_KEY=your_api_key
46+
# Qdrant Vector DB configuration
47+
QDRANT_URL=your_api_url
48+
QDRANT_API_KEY=your_api_key

Backend/src/services/rag/utils/vectorStore.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ const { v4: uuidv4 } = require('uuid');
99
class QdrantVectorStore {
1010
constructor() {
1111
// Initialize Qdrant client with details from environment variables
12-
const qdrantUrl = process.env.QDRANT_URL || 'https://f7110744-a463-43c2-8a0e-797ebd51a033.eu-west-1-0.aws.cloud.qdrant.io:6333';
13-
const qdrantApiKey = process.env.QDRANT_API_KEY || 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3MiOiJtIn0.9HBhqpEm_urstyoYqROL-5rRbRaQo9_SH4ev3JmkfWo';
12+
const qdrantUrl = process.env.QDRANT_URL;
13+
const qdrantApiKey = process.env.QDRANT_API_KEY;
14+
15+
if (!qdrantUrl || !qdrantApiKey) {
16+
console.error('[LOG vector_store] ========= Missing Qdrant configuration. Please set QDRANT_URL and QDRANT_API_KEY in your .env file');
17+
}
1418

1519
this.client = new QdrantClient({
1620
url: qdrantUrl,

sync.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
# This script synchronizes the main branch from the origin repository to the client repository.
4+
# It performs a force push which will overwrite any divergent changes in the client repository.
5+
# Use with caution as this is a destructive operation.
6+
37
echo "Fetching latest changes..."
48
git fetch origin
59
git fetch client

0 commit comments

Comments
 (0)