Skip to content

Provide ChatGLM support for "generate test"

Baodong请求将feat/ai/jh-generate-test合并到main-jh

Related Issue:

What does this MR do and why?

Integrate ChatGLM to support generate_test_file feature.

Take the test file generated by AI as an example, replace OpenAI with ChatGLM.

Screenshots or screen recordings

OpenAI ChatGLM
generate-test-in-JH-GitLab ChatGlm_generate_test_demo

How to set up and validate locally

Setup group:

project = Project.find(23)
namespace = project.root_ancestor

namespace.update!(experiment_features_enabled: true, third_party_ai_features_enabled: true)
namespace.gitlab_subscription.update!(plan_code: 'ultimate', trial: false, end_date: nil, seats: 100)

Setup ChatGLM Token:

export CHAT_GLM_API_KEY="<API-KEY>"
  • Simulate a SaaS instance
  • Feature.enable(:openai_experimentation)
  • Feature.enable(:ai_related_settings, namespace)
  • Feature.enable(:generate_test_file_flag, user)

MR acceptance checklist

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

Baodong 编辑于

合并请求报告

加载中