Skip to main content

Your own AI coding assistant based on your documentation using open models (like Ollama) + Streamlit

Project description

🧠 Doc2Code Assistant

Your own AI coding assistant powered by local language models — no internet, no OpenAI, just raw power on your machine 💻⚡


✨ Features

✅ Runs entirely locally using phi3:mini (or any Ollama-supported model)
✅ Uses your GPU for fast inference (if available)
✅ Clean and interactive Streamlit UI for querying docs and generating code
No dependencies on OpenAI, APIs, or external services
✅ Automatically checks for GPU usage 💪


🚀 Getting Started

1. 📦 Install Ollama

Linux/macOS

curl -fsSL https://ollama.com/install.sh | sh

Windows

Download the installer and follow the setup instructions.

2. 📥 Download a Model

Pull your preferred local model (default: phi3:mini):

ollama pull phi3:mini

You can also try others like codellama:7b or mistral:7b.

3. 🧪 (Optional) Test the Model in Terminal

ollama run phi3:mini

4. 🎛️ Run the App

streamlit run app.py

Then open your browser at http://localhost:8501

📝 Notes

Your documents should be placed in the docs/ folder. The assistant will index and learn from them automatically.

If you want to switch models, update the model name in app.py:

    llm = Ollama(model="your-model-name-here")

⚙️ Requirements

Python 3.10+ Ollama installed and running Streamlit:

pip install streamlit llama-index llama-index-llms-ollama llama-index-embeddings-huggingface

🤝 Contributing

Ideas, improvements, or bugs? Open an issue or submit a PR — contributions are welcome!

🔐 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doc2code_assistant-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doc2code_assistant-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file doc2code_assistant-0.1.0.tar.gz.

File metadata

  • Download URL: doc2code_assistant-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for doc2code_assistant-0.1.0.tar.gz
Algorithm Hash digest
SHA256 836cca21316330694cd3a47c18a5d065cddf483509e1ea653c98e106daa3002f
MD5 1c5a24e4f67c2a3856dea0805bf17bf7
BLAKE2b-256 a9fcb5dda4a5301ac63c39ccbc043ed65274c503f9802b3d86807660f2535969

See more details on using hashes here.

File details

Details for the file doc2code_assistant-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for doc2code_assistant-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9f5c040baff1aaee5ad355946df963ad5c0125792f4a6fd4316846182379880
MD5 219256837084e3b87bf886f49da94b93
BLAKE2b-256 26f122e006d15f0be7db287a077bf8797032f4650deeb9b4f4893178b0e09257

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page