kubebb / core

A declarative component lifecycle management platform
https://kubebb.github.io/website
Apache License 2.0
8 stars 9 forks source link

feat: enable AI evaluator for Rating #324

Closed bjwswang closed 1 year ago

bjwswang commented 1 year ago

What type of PR is this?

/kind feat

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #285 Fixes #286

Special notes for your reviewer

This PR enables AI Evaluator for Rating which includes below changes:

  1. Add a new field Evaluator in rating spec to configure AI LLM which shall be used in this Rating
  2. Add a new field Dimension in PipelineParam to make sure only one dimesion pipelinerun exists.
  3. Use dimension as the key in rating.status.pipelineruns
  4. Add a new pkg pkg/evaluator to implement a evaluator agent
  5. When pipelinerun succ, use evaluator agent to evaluate this rating dimesion with the help of kubeagi/arcadia
  6. Sync prompt status when it's done to rating.status.evaluations withdimesion` as the key

To use this Evaluator in Rating,user must install kubeagi/arcadia as well.

codecov[bot] commented 1 year ago

Codecov Report

Merging #324 (8406829) into main (785e857) will decrease coverage by 2.61%. The diff coverage is 10.73%.

@@            Coverage Diff             @@
##             main     #324      +/-   ##
==========================================
- Coverage   25.12%   22.51%   -2.61%     
==========================================
  Files          36       36              
  Lines        3240     3264      +24     
==========================================
- Hits          814      735      -79     
- Misses       2374     2491     +117     
+ Partials       52       38      -14     
Files Changed Coverage Δ
api/v1alpha1/rating_types.go 100.00% <ø> (ø)
controllers/rating_controller.go 0.00% <0.00%> (ø)
api/v1alpha1/rating.go 95.32% <86.36%> (+16.47%) :arrow_up:

... and 1 file with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

bjwswang commented 1 year ago

@0xff-dev any other comments?