Skip to content

Draft: Show unsupported message of doc tool to on-premises Duo Chat users

Shinya Maeda requested to merge extend-llm-authorizer-for-on-prem into master

What does this MR do and why?

This MR solves Ensure on-premises Duo Chat work WITHOUT embedd... (#433470 - closed) that shows the unsupported message of GitLab Duo Chat documentation for on-premises users. They will see the following response in Duo Chat when they ask documentation related questions:

It seems your question relates to GitLab documentation. Unfortunately, this feature is not yet available for self-managed GitLab instances. Your feedback is welcome.

This MR also demonstrates how to fix SaaS specific check logic for on-premises users. This is currently being worked in !140352 (merged), which is tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/434802+. We'd wait for the upstream MR to be merged and then follow-up this MR.

Related to Ensure on-premises Duo Chat work WITHOUT embedd... (#433470 - closed) and https://gitlab.com/gitlab-org/gitlab/-/issues/434802+

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.

Screenshots or screen recordings

Send chat message via GraphQL explorer:

mutation {
  aiAction(
    input: {
      chat: {
        resourceId: "gid://gitlab/User/1",
        content: "How can I create an issue?"
      }
    }
  ){
    requestId
    errors
  }
}

Fetch the response via GraphQL query:

query {
  aiMessages {
    nodes {
      requestId
      content
      role
      timestamp
      chunkId
      errors
    }
  }
}

Response:

       {
          "requestId": "254091aa-3f79-4c1b-b807-fd995ff17a7a",
          "content": "It seems your question relates to GitLab documentation. Unfortunately, this feature is not yet available for self-managed GitLab instances. Your feedback is welcome.",
          "role": "ASSISTANT",
          "timestamp": "2023-12-27T10:27:51Z",
          "chunkId": null,
          "errors": []
        },

How to set up and validate locally

See !138274 (merged)

Edited by Shinya Maeda

Merge request reports