Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2c506d4
feat: [Coda] 添加优化权益相关接口 - CheckAndDeductOptimizationBenefit和DeductOpt…
biwang75678 Sep 9, 2025
fb73151
feat: [Coda] 添加优化权益相关接口 - CheckAndDeductOptimizationBenefit和DeductOpt…
biwang75678 Sep 9, 2025
5c3d45a
Merge branch 'feat/optimize_task_prompt_pilot' of github.com:coze-dev…
tpfz Sep 11, 2025
5cb9857
feat: [Coda] add DisableTracing parameter to RunEvaluator for trace c…
tpfz Aug 27, 2025
6389abe
回复老接口
tpfz Sep 11, 2025
95b6b6b
[feat][backend]add DisableTracing parameter to ExecuteParam for promp…
xueyizheng Sep 11, 2025
1ec3247
feat: [Coda] 添加优化权益相关接口 - CheckAndDeductOptimizationBenefit和DeductOpt…
biwang75678 Sep 9, 2025
e479659
feat: [Coda] add DisableTracing parameter to RunEvaluator for trace c…
tpfz Aug 27, 2025
78de36d
回复老接口
tpfz Sep 11, 2025
045cb95
[feat][backend]add DisableTracing parameter to ExecuteParam for promp…
xueyizheng Sep 11, 2025
db42a97
Merge branch 'feat/optimize_task_prompt_pilot' of github.com:coze-dev…
tpfz Sep 12, 2025
ea002c3
增加BatchCheckOptimizeTaskFree
tpfz Sep 12, 2025
4449455
Revert "增加BatchCheckOptimizeTaskFree"
tpfz Sep 12, 2025
e3d2282
feat: [Coda] 添加优化权益相关接口 - CheckAndDeductOptimizationBenefit和DeductOpt…
biwang75678 Sep 9, 2025
0b1262e
feat: [Coda] add DisableTracing parameter to RunEvaluator for trace c…
tpfz Aug 27, 2025
4d3213b
回复老接口
tpfz Sep 11, 2025
9706889
[feat][backend]add DisableTracing parameter to ExecuteParam for promp…
xueyizheng Sep 11, 2025
b5fed59
feat: [Coda] add DisableTracing parameter to RunEvaluator for trace c…
tpfz Aug 27, 2025
b0b2648
回复老接口
tpfz Sep 11, 2025
a7b13e2
增加BatchCheckOptimizeTaskFree
tpfz Sep 12, 2025
63221e4
Revert "增加BatchCheckOptimizeTaskFree"
tpfz Sep 12, 2025
2d488da
Merge branch 'feat/optimize_task_prompt_pilot' of github.com:coze-dev…
tpfz Sep 16, 2025
0365f39
feat: [Coda] 添加优化权益相关接口 - CheckAndDeductOptimizationBenefit和DeductOpt…
biwang75678 Sep 9, 2025
3ec44c8
feat: [Coda] add DisableTracing parameter to RunEvaluator for trace c…
tpfz Aug 27, 2025
4da2f0f
回复老接口
tpfz Sep 11, 2025
75bd5b1
[feat][backend]add DisableTracing parameter to ExecuteParam for promp…
xueyizheng Sep 11, 2025
9fece00
feat: [Coda] add DisableTracing parameter to RunEvaluator for trace c…
tpfz Aug 27, 2025
8b8bb92
回复老接口
tpfz Sep 11, 2025
f2d5450
增加BatchCheckOptimizeTaskFree
tpfz Sep 12, 2025
2c78ede
Revert "增加BatchCheckOptimizeTaskFree"
tpfz Sep 12, 2025
68c0145
Merge branch 'feat/optimize_task_prompt_pilot' of github.com:coze-dev…
tpfz Sep 16, 2025
0ece7b4
test: [Coda] add comprehensive unit tests for DisableTracing paramete…
tpfz Sep 17, 2025
11922b9
refactor: [Coda] consolidate DisableTracing unit tests into main test…
tpfz Sep 17, 2025
e279f0e
test: [Coda] clean up temporary DisableTracing test files and update …
tpfz Sep 17, 2025
6a8010f
删除不相关代码
tpfz Sep 17, 2025
f9fc18f
[feat][backend]fix 更改实验执行prompt逻辑,内部接口只支持单步调试
xueyizheng Sep 17, 2025
09aeb1a
[feat][backend]fix format
xueyizheng Sep 17, 2025
3a4d0a0
fix fmt
tpfz Sep 17, 2025
c7ac669
Merge branch 'feat/optimize_task_prompt_pilot' of github.com:coze-dev…
tpfz Sep 17, 2025
2e7cda4
fix fmt
tpfz Sep 17, 2025
7a75279
fix fmt
tpfz Sep 17, 2025
17244d2
merge main
tpfz Sep 19, 2025
e696342
feat:opt_benefit_update
biwang75678 Sep 21, 2025
0352aaa
update: amount int -> float
biwang75678 Sep 21, 2025
2294ca7
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Sep 30, 2025
eee6f7e
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Sep 30, 2025
b7c69bb
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 10, 2025
c5921f3
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 11, 2025
d0862ba
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 13, 2025
eb60536
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 13, 2025
8cd2452
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 16, 2025
4d799b0
[feat][backend]增加智能优化的读写控制key
xueyizheng Oct 16, 2025
766b1af
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 17, 2025
6b621a8
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 21, 2025
87433ed
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 21, 2025
ae15c8c
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 21, 2025
d69eb18
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 22, 2025
072e7c6
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 22, 2025
aa7ff2b
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 22, 2025
d57f015
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 23, 2025
bb1f8c8
[feat][backend]fix fmt
xueyizheng Oct 23, 2025
c72bdce
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 23, 2025
2bb31bb
Merge branch 'main' into feat/opt_benefit_1
xueyizheng Oct 23, 2025
b6c239a
[feat][backend]fix comments
xueyizheng Oct 23, 2025
a073b53
[feat][backend]modify gitignore
xueyizheng Oct 23, 2025
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ release/deployment/helm-chart/umbrella/Chart.lock
.coda/
backend/script/errorx/.env
.cursor/
AGENTS.md
20 changes: 15 additions & 5 deletions backend/infra/external/benefit/benifit.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type IBenefitService interface {
BatchCheckEnableTypeBenefit(ctx context.Context, param *BatchCheckEnableTypeBenefitParams) (result *BatchCheckEnableTypeBenefitResult, err error)
// CheckAndDeductOptimizationBenefit 校验扣减优化权益
CheckAndDeductOptimizationBenefit(ctx context.Context, param *CheckAndDeductOptimizationBenefitParams) (result *CheckAndDeductOptimizationBenefitResult, err error)
// DeductOptimizationBenefit 上报优化资源点
// Deprecated: DeductOptimizationBenefit is deprecated. Use CheckAndDeductOptimizationBenefit(...) instead.
DeductOptimizationBenefit(ctx context.Context, param *DeductOptimizationBenefitParams) (err error)
}

Expand Down Expand Up @@ -111,6 +111,14 @@ func (h *DenyReason) ToErr() error {
}
}

type When int64

const (
WhenStart When = 1
WhenRunning When = 2
WhenFinish When = 3
)

type CheckAndDeductEvalBenefitParams struct {
ConnectorUID string `json:"connector_uid"` // Coze登录ID
SpaceID int64 `json:"space_id"` // 空间ID
Expand Down Expand Up @@ -146,10 +154,12 @@ type BatchCheckEnableTypeBenefitResult struct {
}

type CheckAndDeductOptimizationBenefitParams struct {
ConnectorUID string `json:"connector_uid"` // Coze登录ID
SpaceID int64 `json:"space_id"` // 空间ID
PromptID int64 `json:"prompt_id"` // prompt id,用于唯一标识
TaskID int64 `json:"task_id"` // task id
ConnectorUID string `json:"connector_uid"` // Coze登录ID
SpaceID int64 `json:"space_id"` // 空间ID
PromptID int64 `json:"prompt_id"` // prompt id,用于唯一标识
TaskID int64 `json:"task_id"` // task id
Amount float64 `json:"amount"` // 消耗的资源点数
When When `json:"when"` // 适用场景:1-启动时校验,2-运行时校验,3-结束时校验
}

type CheckAndDeductOptimizationBenefitResult struct {
Expand Down
1 change: 1 addition & 0 deletions backend/infra/platestwrite/latest_write_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const (
ResourceTypePromptCommit ResourceType = "prompt_commit"
ResourceTypePromptLabel ResourceType = "prompt_label"
ResourceTypePromptCommitLabelMapping ResourceType = "prompt_commit_label_mapping"
ResourceTypeCozeloopOptimizeTask ResourceType = "cozeloop_optimize_task" // 外场智能优化

ResourceTypeExperiment ResourceType = "experiment"
ResourceTypeEvalSet ResourceType = "eval_set"
Expand Down
Loading