You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+154Lines changed: 154 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -436,6 +436,157 @@ Process repeats until successful or max attempts reached
436
436
437
437
---
438
438
439
+
## 📊 Adding to the Vector Database
440
+
441
+
The system uses vector embeddings to find similar projects and error examples, which helps improve code generation quality. Here's how to add your own examples:
442
+
443
+
### 🔧 Creating Vector Collections
444
+
445
+
First, you need to create the necessary collections in Qdrant using these curl commands:
446
+
447
+
```bash
448
+
# Create project_examples collection with 1536 dimensions (default)
449
+
curl -X PUT "http://localhost:6333/collections/project_examples" \
450
+
-H "Content-Type: application/json" \
451
+
-d '{
452
+
"vectors": {
453
+
"size": 1536,
454
+
"distance": "Cosine"
455
+
}
456
+
}'
457
+
458
+
# Create error_examples collection with 1536 dimensions (default)
459
+
curl -X PUT "http://localhost:6333/collections/error_examples" \
460
+
-H "Content-Type: application/json" \
461
+
-d '{
462
+
"vectors": {
463
+
"size": 1536,
464
+
"distance": "Cosine"
465
+
}
466
+
}'
467
+
```
468
+
Note: If you've configured a different embedding size via ```LLM_EMBED_SIZE``` environment variable, replace 1536 with that value.
"error": "error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable",
520
+
"solution": "Ensure mutable and immutable borrows don't overlap by using separate scopes",
521
+
"context": "This error occurs when you try to borrow a value mutably while an immutable borrow exists",
522
+
"example": "// Before (error)\nfn main() {\n let mut v = vec![1, 2, 3];\n let first = &v[0];\n v.push(4); // Error: cannot borrow `v` as mutable\n println!(\"{}\", first);\n}\n\n// After (fixed)\nfn main() {\n let mut v = vec![1, 2, 3];\n {\n let first = &v[0];\n println!(\"{}\", first);\n } // immutable borrow ends here\n v.push(4); // Now it's safe to borrow mutably\n}"
```SKIP_VECTOR_SEARCH```=false (or not set) - Enables vector search
581
+
In your current .env file, you have:
582
+
```
583
+
SKIP_VECTOR_SEARCH=true
584
+
```
585
+
This means vector search is currently disabled. To enable it:
586
+
- Change this value to false or remove the line completely
587
+
- Ensure you have a running Qdrant instance (via Docker Compose or standalone)
588
+
- Create the collections as shown above
589
+
439
590
## 🤝 Contributing
440
591
Contributions are welcome! This project uses the Developer Certificate of Origin (DCO) to certify that contributors have the right to submit their code. Follow these steps:
441
592
@@ -458,3 +609,6 @@ This certifies that you wrote or have the right to submit the code you're contri
458
609
## 📜 License
459
610
Licensed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).
0 commit comments