Inspired by Shubham Saboo's awesome-llm-apps
This project demonstrates how to build a ChatGPT-like code assistant using the Yi-Coder-9B model running locally on your computer. The application is built using Python and Streamlit, providing a user-friendly interface for interacting with the language model. Best of all, it's 100% free and doesn't require an internet connection!
- Runs locally on your computer without the need for an internet connection and completely free to use.
- Utilizes the Yi-Coder-9B coding model from Yi, supporting a staggering 52 programming language, and featuring a max context length of 128k, making it great for ingesting large codebases
- Provides a chat-like interface for seamless interaction
-
Clone the GitHub repository
git clone https://github.com/andreaceto/local-code-assistant.git
-
Create a virtual environment and activate it
python -m venv venv-name venv-name/Scripts/activate # On MacOS use `source venv-name/bin/activate`
-
Install the required dependencies
pip install -r requirements.txt
-
Download and install the LM Studio desktop app
-
Open LM Studio and download the Yi-Coder-9B model from the 'Discover' tab
-
Expose the Yi-Coder-9B model as an OpenAI API by starting the server in LM Studio. (Follow this video walkthrough).
-
Run the Streamlit App
streamlit run ai_code_assistant.py