Skip to content

A multi-agent python application that assists users in programming in Python

Notifications You must be signed in to change notification settings

zurielsingh/Python-Code-Assistant

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Code-Assistant

A multi-agent Python application that assists users in programming in Python.
It generates code given a query, validates it, runs it in a sandbox environment, and retrieves relevant documentation to help you understand or expand upon your query.


Features

  • Plan Generation: Uses the Mistral-Instruct agent to optionally generate a structured JSON plan that is passed to the Coder for better accuracy and context.
  • Code Generation: Uses the DeepSeek-Coder agent to generate Python code based on your query.
  • Validation: Checks the generated code for errors or inconsistencies.
  • Research & Documentation: Fetches relevant documentation or examples to support your query.
  • Logging: Tracks all queries and agent interactions for analysis.
  • Memory: Will remember the projects and tasks you have been working on (powered by Mem0).

Requirements

  • Python 3.11 or higher
  • Ollama with deepseek-coder:6.7b, mistral:7b-instruct and for memory purposes phi3:3.8b, nomic-embed-text:latest models
  • Additional Python dependencies listed in requirements.txt

⚠️ System requirements may vary depending on the model usage.


Installation & Running (Windows)

Option 1: Configure yourself

  1. Create a virtual environment

    python -m venv venv
  2. Bypass PowerShell execution policy (if needed)

    Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
  3. Activate the virtual environment

    venv\Scripts\Activate
  4. Install dependencies

    pip install -r requirements.txt
  5. Run the application with Streamlit

    streamlit run app.py
  6. Close the application
    Press Ctrl + C in your terminal.


Option 2: Faster run option

  1. Run the application in your terminal

    python run.py

    This will open a terminal to run the streamlit interface with all packages installed instantly.

  2. Close the application
    Press Ctrl + C in your terminal.

Notes

  • Make sure your Python interpreter is set to the virtual environment.
  • Streamlit must be installed within the virtual environment to run the app successfully.
  • Please ensure Ollama is running in the background

About

A multi-agent python application that assists users in programming in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.4%
  • Jupyter Notebook 1.6%