AI features update for "glab_ask_git_command" is on self managed
What does this MR do and why?
Adds support for glab duo ask
for self-managed customers. This changes past references of ai_git_command
to glab_ask_git_command
to make it more descriptive, adds some feature logic, and adds a feature flag to skip sending the request through workhorse and call VertexAI directly.
More details can be found here: cli#7549 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Check out this MR
- Confirm the
move_git_service_to_ai_gateway
feature flag is enabled in the console - Confirm you have the AI Gateway setup correctly in https://docs.gitlab.com/ee/development/ai_features/#required-setup-ai-gateway-endpoint-in-gitlab-rails
- In your AI gateway directory, either checkout this MR which includes support for the new unit primitive or make the changes yourself
- Restart AI gateway
- Download
glab
https://gitlab.com/gitlab-org/cli/ - Setup
glab
to use your local GDK instance. You can useglab auth login
to set it up, but you'll probably need to generate a PAT in your GDK instance for a user that can use AI commands. You can confirm glab is setup correctly by checking~/.config/glab-cli/config.yml
and making sure you have an entry like:
gdk.test:3443:
api_protocol: https
api_host: gdk.test:3443
token: [snip]
-
FINALLY: run
glab duo ask "how do i undo a commit"
. Confirm you get an answer. Celebrate.
Edited by Gary Holtz