Skip to content

Sarvesh-Kannan/SarvX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SarvX Code AI Assistant

A powerful AI-powered code assistant that uses Retrieval Augmented Generation (RAG) with local LLM processing for privacy and enhanced context-awareness.

Features

  • Local Code Understanding: Uses Ollama with the deepseek-r1:8b model for code explanations
  • Context-Aware Responses: Leverages RAG with CodeT5 embeddings and Pinecone vector database
  • Codebase Indexing: Intelligent chunking and embedding of your codebase
  • VS Code Extension: Seamlessly integrated into your development workflow
  • CLI Application: Also available as a command-line tool

Components

This project consists of two main components:

  1. VS Code Extension: Provides code explanation directly in your editor
  2. CLI Application: Command-line interface for code explanations

Setup and Installation

Prerequisites

  • Node.js (v14 or higher)
  • Ollama with the deepseek-r1:8b model installed
  • Pinecone account with an index created (dimension: 768)

VS Code Extension

  1. Install the extension from the VSIX file:

    code --install-extension fix-extension/sarvx-code-ai-assistant-0.1.0.vsix
    
  2. The extension provides the following commands:

    • Code AI Assistant: Test Connections - Test connections to Ollama and Pinecone
    • Code AI Assistant: Explain Selected Code (Simple) - Explain the selected code

CLI Application

  1. Run the CLI application:
    node cli-app-fixed.js explain "your code here"
    

Indexing Your Codebase

Before using the assistant, you need to index your codebase:

  1. Configure your Pinecone API key in index-repo.cjs
  2. Run the indexing script:
    node index-repo.cjs /path/to/your/codebase
    

Implementation Details

  • Embeddings: Uses CodeT5 model to create embeddings of code chunks
  • Vector Database: Pinecone stores code embeddings for retrieval
  • Local LLM: Ollama runs the deepseek-r1:8b model locally for privacy
  • Retrieval: Similar code context is retrieved to enhance explanations

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

Associated with Zoho Corp. SarvX Code AI Assistant is a privacy-first, RAG-based code assistant that combines local LLMs (DeepSeek-R1 via Ollama), CodeT5 embeddings, and Pinecone for smart code explanations—soon to be available as a VS Code extension and CLI tool with full codebase indexing support. Consists of all the experimented files as well.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors