Skip to content

Commit

Permalink
feat: add a controller implementation of rag
Browse files Browse the repository at this point in the history
  • Loading branch information
0xff-dev committed Jan 24, 2024
1 parent fbc6952 commit 5739a2e
Show file tree
Hide file tree
Showing 4 changed files with 795 additions and 129 deletions.
21 changes: 21 additions & 0 deletions api/evaluation/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ limitations under the License.

package v1alpha1

import "reflect"

type MetricsKind string

const (
Expand Down Expand Up @@ -102,3 +104,22 @@ func RagStatusChanged(a, b RAGStatus) bool {
return ac[0].Type != bc[0].Type || ac[0].Status != bc[0].Status ||
ac[0].Reason != bc[0].Reason || ac[0].Message != bc[0].Message
}

func RAGSpecChanged(a, b RAGSpec) bool {
if !reflect.DeepEqual(*a.Application, *b.Application) {
return true
}
if !reflect.DeepEqual(a.Datasets, b.Datasets) {
return true
}
if !reflect.DeepEqual(a.JudgeLLM, b.JudgeLLM) {
return true
}
if !reflect.DeepEqual(*a.Storage, *b.Storage) {
return true
}
if a.ServiceAccountName != b.ServiceAccountName {
return true
}
return false
}
Loading

0 comments on commit 5739a2e

Please sign in to comment.