GitLab GenAI Capabilities — GitLab Duo — Code Suggestions

Dude blogs Tech
2 min readOct 12, 2023

--

In this post I will document my findings of GitLab’s GenAI capabilites. GitLab bundled all of its GenAI features under GitLab Duo.

Please note: GitLab can give Code Suggestions only when your repository is on GitLab and when you enable code suggestions under preferences.

  1. Create GitLab account here https://about.gitlab.com/gitlab-duo/
  2. Signup for free trial Ultimate licence.
  3. Create and Organization, and Project (I created an empty project).
organization name: azimsorg , project name: firstproject
  1. Clone your project to you a local machine
  2. On you local machine install Visual Studio Code
  3. Install GitHub Workflow extension in you Visual Studio Code

Enabling Code Suggestions in GitLab console

Go to preferences and Enable Code Suggestions.

You are now good to use GitLab code suggestions.

In the example below, I created index.py and

  1. I typed up somethin like “import pandas and write code for storing months of the year in pandas dataframe, print months with 31 days”
  2. Give it a second and you will see code suggestions below
  3. If you accept it, code gets copied into your file.

Languages supported

  • C++
  • C#
  • Go
  • Google SQL
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Rust
  • Scala
  • Swift
  • TypeScript

Supported IDEs:

  1. VS Code
  2. JetBrains
  3. Visual Studio
  4. Neovim

Well this is just start of it. I will try to document more as I understand GenAI capabilities of GitLab.

--

--