This repository provides necessary files and documentation to create your personal python coding assistant.
A detailed blog with instructions can be found here
- Download Ollama
- Download model to use (I am using llama3)
ollama pull llama3
. - Create a system message for Llama3 to help with only python coding
- Create Modelfile
# ./Modelfile FROM llama3 PARAMETER temperature 0 SYSTEM "Hey llama3, I need your help with Python code completion. I want you to analyze my current code and suggest the most likely and accurate completions based on my query, context and best practices. If you need any additional information to complete the task, feel free to ask me."
- Create a model from modelfile with
ollama create my-python-assistant -f ./Modelfile
- Download Continue VS Code extension to work with LLMs here
- Connect VS Code with Ollama and the model you created.
In the examples folder, there are some examples of llama3 capabilities and how it can massively improve your efficiency while coding. Since the temperature value in Modelfile is set to 0, the results should be reproducible.
- Integrated code generation
- Doc-Strings and Type Hinting
- Writing unit tests
- Optimize system prompt to include specific coding style, doc-string format
- Test the coding agent for other languages (JavaScript)
This blog was inspired from the LinkedIn post by Pau Bajo here