Skip to content

Add support for GitLab Slash command

Hongtao Yang requested to merge slash-commands-new into main

What does this merge request do and why?

This is MR is a replacement of !363 (closed) This MR adds support to call GitLab /explain, /tests and /refactor command via GraphQL endpoint.

  • Add a new set of Slash command models.
  • Require a new code explanation dataset that provides code, file_path, code_after and code_before.

How to set up and validate locally

  1. Ensure GCP environment variables are setup.

  2. Check out to this merge request's branch.

  3. Copy the example config.

    cp data/config/duochat_eval_slash_code_explain_config.json{.example,}
  4. Run the follow command to kick off the pipeline with a small sample.

    poetry run promptlib duo-chat eval --config-file=data/config/duochat_eval_slash_code_explain_config.json --test-run --sample-size 2
  5. Verify the output CSVs containing good quality responses.

Merge request checklist

  • I've ran the affected pipeline(s) to validate that nothing is broken.
  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Tan Le

Merge request reports