Skip to content

Commit dabc068

Browse files
author
tpfz
committed
fix license
1 parent 42eceed commit dabc068

7 files changed

Lines changed: 17 additions & 5 deletions

File tree

‎backend/infra/limiter/dist/plain_limiter.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) 2025 coze-dev Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package dist
25

36
import (

‎backend/modules/evaluation/domain/entity/evaluator_tag.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) 2025 coze-dev Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package entity
25

36
type EvaluatorTagLangType string

‎backend/modules/evaluation/domain/entity/evaluator_template.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) 2025 coze-dev Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package entity
25

36
type EvaluatorTemplate struct {

‎backend/modules/evaluation/domain/service/evaluator_source_code_impl.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ func (c *EvaluatorSourceCodeServiceImpl) createErrorOutputFromError(err error, s
460460
// Debug 调试Code评估器
461461
func (c *EvaluatorSourceCodeServiceImpl) Debug(ctx context.Context, evaluator *entity.Evaluator, input *entity.EvaluatorInputData, exptSpaceID int64) (output *entity.EvaluatorOutputData, err error) {
462462
// 调试模式下直接调用Run方法
463-
output, runStatus, _ := c.Run(ctx, evaluator, input, exptSpaceID, true)
463+
output, runStatus, _ := c.Run(ctx, evaluator, input, exptSpaceID, true)
464464
if runStatus == entity.EvaluatorRunStatusFail {
465465
if output.EvaluatorRunError != nil {
466466
return output, errorx.NewByCode(errno.CodeExecutionFailedCode, errorx.WithExtraMsg(output.EvaluatorRunError.Message))

‎backend/modules/evaluation/domain/service/evaluator_source_prompt_impl.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ func (p *EvaluatorSourcePromptServiceImpl) Run(ctx context.Context, evaluator *e
136136
modelID = strconv.FormatInt(evaluator.PromptEvaluatorVersion.ModelConfig.ModelID, 10)
137137
}
138138

139-
p.metric.EmitRun(exptSpaceID, err, startTime, modelID)
139+
p.metric.EmitRun(exptSpaceID, err, startTime, modelID)
140140
}()
141141
// 渲染变量
142-
err = renderTemplate(ctx, evaluator.PromptEvaluatorVersion, input, exptSpaceID, disableTracing)
142+
err = renderTemplate(ctx, evaluator.PromptEvaluatorVersion, input, exptSpaceID, disableTracing)
143143
if err != nil {
144144
logs.CtxError(ctx, "[RunEvaluator] renderTemplate fail, err: %v", err)
145145
runStatus = entity.EvaluatorRunStatusFail

‎backend/modules/evaluation/infra/repo/evaluator/evaluator_impl_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3037,7 +3037,7 @@ func TestEvaluatorRepoImpl_ListEvaluatorTags(t *testing.T) {
30373037
{
30383038
name: "成功 - 过滤空值",
30393039
tagType: entity.EvaluatorTagKeyType_Evaluator,
3040-
ctx: context.WithValue(context.Background(), "locale", "zh-CN"),
3040+
ctx: contexts.WithLocale(context.Background(), "zh-CN"),
30413041
mockSetup: func() {
30423042
mockTagDAO.EXPECT().
30433043
AggregateTagValuesByType(gomock.Any(), int32(entity.EvaluatorTagKeyType_Evaluator), "zh-CN", gomock.Any()).
@@ -3058,7 +3058,7 @@ func TestEvaluatorRepoImpl_ListEvaluatorTags(t *testing.T) {
30583058
{
30593059
name: "失败 - DAO错误",
30603060
tagType: entity.EvaluatorTagKeyType_Evaluator,
3061-
ctx: context.WithValue(context.Background(), "locale", "zh-CN"),
3061+
ctx: contexts.WithLocale(context.Background(), "zh-CN"),
30623062
mockSetup: func() {
30633063
mockTagDAO.EXPECT().
30643064
AggregateTagValuesByType(gomock.Any(), int32(entity.EvaluatorTagKeyType_Evaluator), "zh-CN", gomock.Any()).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
// Copyright (c) 2025 coze-dev Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
package convertor

0 commit comments

Comments
 (0)