Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 26 additions & 59 deletions backend/api/handler/coze/loop/apis/experiment_service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions backend/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,18 @@ func newComponent(ctx context.Context) (*component, error) {
}

db, err := db.NewDBFromConfig(&db.Config{
DBHostname: getMysqlDomain(),
DBPort: getMysqlPort(),
User: getMysqlUser(),
Password: getMysqlPassword(),
DBName: getMysqlDatabase(),
Loc: "Local",
DBCharset: "utf8mb4",
Timeout: time.Minute,
ReadTimeout: time.Minute,
WriteTimeout: time.Minute,
DSNParams: url.Values{"clientFoundRows": []string{"true"}},
DBHostname: getMysqlDomain(),
DBPort: getMysqlPort(),
User: getMysqlUser(),
Password: getMysqlPassword(),
DBName: getMysqlDatabase(),
Loc: "Local",
DBCharset: "utf8mb4",
Timeout: time.Minute,
ReadTimeout: time.Minute,
WriteTimeout: time.Minute,
DSNParams: url.Values{"clientFoundRows": []string{"true"}},
WithReturning: true,
})
if err != nil {
return nil, err
Expand Down
2 changes: 2 additions & 0 deletions backend/modules/evaluation/domain/entity/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,6 @@ type ExportCSVEvent struct {
ExportID int64
ExperimentID int64
SpaceID int64

Session *Session
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ func DefaultExptExportWhiteList() *ExptExportWhiteList {
}

type ExptExportWhiteList struct {
UserIDs []int64 `json:"user_ids" mapstructure:"user_ids"`
UserIDs []int64 `json:"user_ids" mapstructure:"user_ids"`
AllowAll bool `json:"allow_all" mapstructure:"allow_all"`
}

func (e *ExptExportWhiteList) IsUserIDInWhiteList(userID string) bool {
if e == nil {
return false
}
if e.AllowAll {
return true
}
uid, err := strconv.ParseInt(userID, 10, 64)
if err != nil {
return false
Expand Down
2 changes: 1 addition & 1 deletion backend/modules/evaluation/domain/repo/expt.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type IExptAnnotateRepo interface {
GetExptTurnResultTagRefs(ctx context.Context, exptID, spaceID int64) ([]*entity.ExptTurnResultTagRef, error)
BatchGetExptTurnResultTagRefs(ctx context.Context, exptIDs []int64, spaceID int64) ([]*entity.ExptTurnResultTagRef, error)
GetTagRefByTagKeyID(ctx context.Context, exptID, spaceID, tagKeyID int64) (*entity.ExptTurnResultTagRef, error)
UpdateCompleteCount(ctx context.Context, exptID, spaceID, tagKeyID int64, opts ...db.Option) (int32, int32, error)
UpdateCompleteCount(ctx context.Context, exptID, spaceID, tagKeyID int64, opts ...db.Option) error
DeleteExptTurnResultTagRef(ctx context.Context, exptID, spaceID, tagKeyID int64, opts ...db.Option) error

SaveAnnotateRecord(ctx context.Context, exptTurnResultID int64, record *entity.AnnotateRecord, opts ...db.Option) error
Expand Down
Loading
Loading