Skip to content

Create your personalised python code assistant using Llama3

Notifications You must be signed in to change notification settings

kraken24/smartypy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Your Own Python Assistant with Llama3 in Just 10 Minutes!

This repository provides necessary files and documentation to create your personal python coding assistant.

Blog

A detailed blog with instructions can be found here

Summary of Steps

  1. Download Ollama
  2. Download model to use (I am using llama3) ollama pull llama3.
  3. Create a system message for Llama3 to help with only python coding
    1. 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."
    1. Create a model from modelfile with ollama create my-python-assistant -f ./Modelfile
  4. Download Continue VS Code extension to work with LLMs here
  5. Connect VS Code with Ollama and the model you created.

Example

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

Next Steps

  • Optimize system prompt to include specific coding style, doc-string format
  • Test the coding agent for other languages (JavaScript)

Reference

This blog was inspired from the LinkedIn post by Pau Bajo here

About

Create your personalised python code assistant using Llama3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published