Skip to content

GitLab Chat - FE GraphQL

Zack Cuddy requested to merge gitlab-chat-fe-graphql into master

What does this MR do and why?

Closes gitlab-org/enablement-section/tanuki-bot#40

This change converts the GitLab Chat feature to use GraphQL rather than REST. This allows us to subscribe to message responses and no longer need to keep long-living requests open. This change also added a small change to include markdown support.

Demo

Screen_Recording_2023-05-01_at_11.48.39_AM

How to set up and validate locally

You will need to setup the embedding database on your GDK if you haven't already. Thankfully it is pretty straightforward:

1. Ensure GDK has Ultimate License
2. gdk update
3. gdk config set gitlab.rails.databases.embedding.enabled true
4. gdk config set pgvector.enabled true
5. gdk reconfigure
6. cd gitlab
7. bin/rails db:migrate
8. rails c
9. Gitlab::CurrentSettings.update(openai_api_key: "${KEY}")
10. Feature.enable(:super_sidebar_nav)
11. Feature.enable(:openai_experimentation)
12. Feature.enable(:tanuki_bot)
13. Run [script](https://gitlab.com/gitlab-com/gl-infra/production/-/issues/10588#note_1373586079)

Then to test (be sure to enable all the Feature Flags in the above setup to see the UI elements)

  1. Ensure the New navigation is enabled. You can enable it by clicking your User profile photo in the top right and toggle the switch
  2. Click the help link in the bottom left of the new Sidebar navigation
  3. Click Ask GitLab Chat link
  4. Ask a question
  5. Ensure it works as intended (load times may be a bit long for the response)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Zack Cuddy

Merge request reports