Implement Abstraction Layer Code Competition model
What does this MR do and why?
As we are working on implementing Code Suggestion using Abstraction layer, we need to bring code_completion
model in our code base.
This MR is utilizing code-gecko
model by adding the code_completion
method to the VertexAI::Client
.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Run the rails console
rails c
- Initialize the Vertex client
client = Gitlab::Llm::VertexAi::Client.new(my_user)
- Call the
code_completion
method with the valid content, e.g.
client.code_completion(content: { prefix: "def is_palindrome(string)", suffix: ""})
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #415581
Edited by Bojan Marjanovic