Skip to content

Commit

Permalink
Merge pull request #440 from Cloud-Code-AI/10-add-rag-support
Browse files Browse the repository at this point in the history
nltk version patch for security
  • Loading branch information
sauravpanda authored Aug 17, 2024
2 parents 9165fd5 + c444b58 commit 3deaba4
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/ragify_codebase/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
analyzer = RepositoryAnalyzer()

# Set up the repository (do this when you first analyze a repo or when you want to update it)
# analyzer.setup_repository("./github_app/")
analyzer.setup_repository("./github_app/")

# Perform queries (you can do this as many times as you want without calling setup_repository again)
results = analyzer.query("Find functions that handle authentication")
Expand Down
1 change: 1 addition & 0 deletions kaizen/retriever/llama_index_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def store_abstraction_and_embedding(self, function_id: int, abstraction: str):
embedding, emb_usage = self.llm_provider.get_text_embedding(abstraction)
embedding = embedding[0]["embedding"]
# Store the embedding in the database
# TODO: DONT PUSH DUPLICATE
with self.engine.begin() as connection:
embedding_query = text(
"""
Expand Down
104 changes: 88 additions & 16 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ nest-asyncio = "^1.6.0"
pytest-playwright = "^0.4.4"
pip = "^24.0"
fuzzywuzzy = "^0.18.0"
llama-index-core = "^0.10.47"
llama-index-llms-openai = "^0.1.22"
llama-index-core = "0.10.65"
llama-index-readers-file = "^0.1.25"
llama-index-vector-stores-postgres = "^0.1.11"
sqlalchemy = "^2.0.31"
Expand Down

0 comments on commit 3deaba4

Please sign in to comment.