Skip to content

Commit ebca28d

Browse files
committed
fix(cli): prioritize QDRANT_URL env var if config missing
1 parent eb22f4c commit ebca28d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cmd/simili/commands/process.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,16 @@ func runProcess() {
175175
// Vector Store
176176
// Check for Qdrant env vars or config
177177
qURL := cfg.Qdrant.URL
178-
if qURL == "" {
179-
qURL = os.Getenv("QDRANT_URL")
178+
if val := os.Getenv("QDRANT_URL"); val != "" && (qURL == "" || qURL == "localhost:6334") {
179+
qURL = val
180180
}
181181
if qURL == "" {
182182
qURL = "localhost:6334" // Default
183183
}
184184

185185
qKey := cfg.Qdrant.APIKey
186-
if qKey == "" {
187-
qKey = os.Getenv("QDRANT_API_KEY")
186+
if val := os.Getenv("QDRANT_API_KEY"); val != "" && qKey == "" {
187+
qKey = val
188188
}
189189

190190
qdrantClient, err := qdrant.NewClient(qURL, qKey)

0 commit comments

Comments
 (0)