Add chat aiAction mutation
What does this MR do and why?
This introduces the chat
action as part of the aiAction
mutation. It directly calls the ZeroShot
agent.
It is a very basic mutation and the output of the Agent is not helpful yet as we're still missing other tools.
There will be more work in the follow-up to improve the response from the chat. It should just cover the basics of having a chat mutation available.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Set up AI feature locally https://docs.gitlab.com/ee/development/ai_features.html#test-ai-features-locally with Vertex enabled
- Enable the feature flag
Feature.enable(:gitlab_duo)
- Test it with the GraphQL mutation and message history:
query messages {
aiMessages {
nodes {
id
requestId
content
errors
role
}
}
}
mutation chat {
aiAction(input:{chat:{resourceId:"gid://gitlab/Issue/645", content:"Summarize the comments"}}) {
requestId
errors
}
}
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.
Edited by Nicolas Dular