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
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -436,6 +436,75 @@ 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
+
### Method 1: Using Python API Directly
444
+
445
+
```python
446
+
from app.llm_client import LlamaEdgeClient
447
+
from app.vector_store import QdrantStore
448
+
449
+
# Initialize the components
450
+
llm_client = LlamaEdgeClient()
451
+
vector_store = QdrantStore()
452
+
453
+
# Ensure collections exist
454
+
vector_store.create_collection("project_examples") # or "error_examples"
455
+
456
+
# 1. Prepare your data
457
+
project_data = {
458
+
"query": "A command-line calculator in Rust",
459
+
"example": "Your full project example with code here..."
### Method 3: Using the ```parse_and_save_qna.py``` Script
499
+
For bulk importing from a Q&A format text file:
500
+
501
+
Place your Q&A pairs in a text file with format similar to ```QnA_pair.txt```
502
+
Modify the ```parse_and_save_qna.py``` script to point to your file
503
+
Run the script:
504
+
```
505
+
python parse_and_save_qna.py
506
+
```
507
+
439
508
## 🤝 Contributing
440
509
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
510
@@ -458,3 +527,6 @@ This certifies that you wrote or have the right to submit the code you're contri
458
527
## 📜 License
459
528
Licensed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).
0 commit comments