-
Notifications
You must be signed in to change notification settings - Fork 762
Expand file tree
/
Copy patheval_target_service.go
More file actions
100 lines (80 loc) · 3.57 KB
/
eval_target_service.go
File metadata and controls
100 lines (80 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Copyright (c) 2025 coze-dev Authors
// SPDX-License-Identifier: Apache-2.0
// Code generated by hertz generator.
package apis
import (
"context"
"github.com/cloudwego/hertz/pkg/app"
"github.com/coze-dev/coze-loop/backend/kitex_gen/coze/loop/evaluation/evaltargetservice"
)
var localEvalTargetSvc evaltargetservice.Client
// CreateEvalTarget .
// @router /api/evaluation/v2/eval_targets [POST]
func CreateEvalTarget(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.CreateEvalTarget)
}
// BatchGetEvalTargetsBySource .
// @router /api/evaluation/v2/eval_targets/batch_get_by_source [POST]
func BatchGetEvalTargetsBySource(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.BatchGetEvalTargetsBySource)
}
// GetEvalTargetVersion .
// @router /api/evaluation/v2/eval_targets/versions/:eval_target_version_id [GET]
func GetEvalTargetVersion(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.GetEvalTargetVersion)
}
// BatchGetEvalTargetVersions .
// @router /api/evaluation/v2/eval_target_versions/batch_get [POST]
func BatchGetEvalTargetVersions(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.BatchGetEvalTargetVersions)
}
// ListSourceEvalTargets .
// @router /api/evaluation/v2/eval_targets/list_source [POST]
func ListSourceEvalTargets(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.ListSourceEvalTargets)
}
// ListSourceEvalTargetVersions .
// @router /api/evaluation/v2/eval_targets/list_source_version [POST]
func ListSourceEvalTargetVersions(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.ListSourceEvalTargetVersions)
}
// ExecuteEvalTarget .
// @router /api/evaluation/v2/eval_targets/execute [POST]
func ExecuteEvalTarget(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.ExecuteEvalTarget)
}
// GetEvalTargetRecord .
// @router /api/evaluation/v2/eval_targets/records/:eval_target_record_id [GET]
func GetEvalTargetRecord(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.GetEvalTargetRecord)
}
// BatchGetEvalTargetRecords
// @router /api/evaluation/v2/eval_targets/records/batch_get [POST]
func BatchGetEvalTargetRecords(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.BatchGetEvalTargetRecords)
}
// BatchGetSourceEvalTargets .
// @router /api/evaluation/v1/eval_targets/batch_get_source [POST]
func BatchGetSourceEvalTargets(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.BatchGetSourceEvalTargets)
}
// SearchCustomEvalTarget .
// @router /api/evaluation/v1/eval_targets/search_custom [POST]
func SearchCustomEvalTarget(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.SearchCustomEvalTarget)
}
// DebugEvalTarget .
// @router /api/evaluation/v1/eval_targets/debug [POST]
func DebugEvalTarget(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.DebugEvalTarget)
}
// AsyncDebugEvalTarget .
// @router /api/evaluation/v1/eval_targets/async_debug [POST]
func AsyncDebugEvalTarget(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.AsyncDebugEvalTarget)
}
// MockEvalTargetOutput .
// @router /api/evaluation/v1/eval_targets/mock_output [POST]
func MockEvalTargetOutput(ctx context.Context, c *app.RequestContext) {
invokeAndRender(ctx, c, localEvalTargetSvc.MockEvalTargetOutput)
}