GraphQL API for AI requests
What does this MR do and why?
Related to https://gitlab.com/gitlab-org/gitlab/-/issues/410521
Adds API for accessing cached AI requests/responses.
How to set up and validate locally
- Enable caching of AI requests
Feature.enable(:ai_redis_cache)
- Trigger an AI action (for example "summarize comments" on issue show page)
- Check that request and response are returned with following query:
query {
aiMessages {
nodes {
id
requestId
content
role
errors
}
}
}
Or get only bot
response for a specific request id:
query {
aiMessages(requestIds: ["999dac16-0893-4d11-9e01-2ab2a3c9128b"], roles: [BOT]) {
nodes {
id
requestId
content
role
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 Jan Provaznik