chore: replace all cn comments to en version by volc api (#313)

This commit is contained in:
tecvan
2025-07-31 15:18:11 +08:00
committed by GitHub
parent 91d6cdb430
commit 5abc63fba6
254 changed files with 5899 additions and 5844 deletions

View File

@@ -7,45 +7,45 @@ include "../../resource/resource_common.thrift"
namespace go ocean.cloud.workflow
service WorkflowService {
// 创建流程
// Create process
workflow.CreateWorkflowResponse CreateWorkflow(1:workflow.CreateWorkflowRequest request) (api.post='/api/workflow_api/create', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 查询流程
// query process
workflow.GetCanvasInfoResponse GetCanvasInfo(1:workflow.GetCanvasInfoRequest request) (api.post='/api/workflow_api/canvas', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.GetHistorySchemaResponse GetHistorySchema(1:workflow.GetHistorySchemaRequest request) (api.post='/api/workflow_api/history_schema', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 保存流程
// save process
workflow.SaveWorkflowResponse SaveWorkflow(1:workflow.SaveWorkflowRequest request) (api.post='/api/workflow_api/save', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.UpdateWorkflowMetaResponse UpdateWorkflowMeta(1:workflow.UpdateWorkflowMetaRequest request) (api.post='/api/workflow_api/update_meta', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.DeleteWorkflowResponse DeleteWorkflow(1:workflow.DeleteWorkflowRequest request) (api.post='/api/workflow_api/delete', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.BatchDeleteWorkflowResponse BatchDeleteWorkflow(1:workflow.BatchDeleteWorkflowRequest request) (api.post='/api/workflow_api/batch_delete', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.GetDeleteStrategyResponse GetDeleteStrategy(1: workflow.GetDeleteStrategyRequest request)(api.post='/api/workflow_api/delete_strategy', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 发布流程。该接口的用途是发布非 project 内部的流程。
// Publish process. The purpose of this interface is to publish processes that are not internal to the project.
workflow.PublishWorkflowResponse PublishWorkflow(1:workflow.PublishWorkflowRequest request) (api.post='/api/workflow_api/publish', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.CopyWorkflowResponse CopyWorkflow(1:workflow.CopyWorkflowRequest request) (api.post='/api/workflow_api/copy', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.CopyWkTemplateApiResponse CopyWkTemplateApi(1:workflow.CopyWkTemplateApiRequest request) (api.post='/api/workflow_api/copy_wk_template', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.GetReleasedWorkflowsResponse GetReleasedWorkflows(1: workflow.GetReleasedWorkflowsRequest request) (api.post='/api/workflow_api/released_workflows', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.GetWorkflowReferencesResponse GetWorkflowReferences(1: workflow.GetWorkflowReferencesRequest request) (api.post='/api/workflow_api/workflow_references', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 获取示例流程列表
// Get a list of sample processes
workflow.GetExampleWorkFlowListResponse GetExampleWorkFlowList(1: workflow.GetExampleWorkFlowListRequest request)(api.post='/api/workflow_api/example_workflow_list', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 获取流程列表。
// Gets a list of processes.
workflow.GetWorkFlowListResponse GetWorkFlowList(1: workflow.GetWorkFlowListRequest request) (api.post='/api/workflow_api/workflow_list', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.QueryWorkflowNodeTypeResponse QueryWorkflowNodeTypes(1: workflow.QueryWorkflowNodeTypeRequest request)(api.post="/api/workflow_api/node_type", api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 画布
// Canvas
workflow.NodeTemplateListResponse NodeTemplateList(1: workflow.NodeTemplateListRequest request)(api.post='/api/workflow_api/node_template_list', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.NodePanelSearchResponse NodePanelSearch(1: workflow.NodePanelSearchRequest request)(api.post='/api/workflow_api/node_panel_search', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.GetLLMNodeFCSettingsMergedResponse GetLLMNodeFCSettingsMerged(1: workflow.GetLLMNodeFCSettingsMergedRequest req)(api.post='/api/workflow_api/llm_fc_setting_merged', api.category="workflow_api", api.gen_path="workflow_trace", agw.preserve_base = "true")
workflow.GetLLMNodeFCSettingDetailResponse GetLLMNodeFCSettingDetail(1: workflow.GetLLMNodeFCSettingDetailRequest req)(api.post='/api/workflow_api/llm_fc_setting_detail', api.category="workflow_api", api.gen_path="workflow_trace", agw.preserve_base = "true")
// 试运行流程(test run
// Practice running process (test run)
workflow.WorkFlowTestRunResponse WorkFlowTestRun(1:workflow.WorkFlowTestRunRequest request) (api.post='/api/workflow_api/test_run', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.WorkflowTestResumeResponse WorkFlowTestResume(1:workflow.WorkflowTestResumeRequest request) (api.post='/api/workflow_api/test_resume', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.CancelWorkFlowResponse CancelWorkFlow(1:workflow.CancelWorkFlowRequest request) (api.post='/api/workflow_api/cancel', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 查看试运行执行历史。
// View practice run history.
workflow.GetWorkflowProcessResponse GetWorkFlowProcess(1:workflow.GetWorkflowProcessRequest request)(api.get='/api/workflow_api/get_process', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.GetNodeExecuteHistoryResponse GetNodeExecuteHistory(1:workflow.GetNodeExecuteHistoryRequest request)(api.get='/api/workflow_api/get_node_execute_history', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.GetApiDetailResponse GetApiDetail(1: workflow.GetApiDetailRequest request) (api.get='/api/workflow_api/apiDetail', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.WorkflowNodeDebugV2Response WorkflowNodeDebugV2(1: workflow.WorkflowNodeDebugV2Request request) (api.post='/api/workflow_api/nodeDebug', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// 文件上传
// file upload
workflow.GetUploadAuthTokenResponse GetWorkflowUploadAuthToken(1: workflow.GetUploadAuthTokenRequest request)(api.post = '/api/workflow_api/upload/auth_token', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.SignImageURLResponse SignImageURL(1: workflow.SignImageURLRequest request)(api.post='/api/workflow_api/sign_image_url', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// conversation
@@ -54,7 +54,7 @@ service WorkflowService {
workflow.DeleteProjectConversationDefResponse DeleteProjectConversationDef(1: workflow.DeleteProjectConversationDefRequest request)(api.post = '/api/workflow_api/project_conversation/delete', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.ListProjectConversationResponse ListProjectConversationDef(1: workflow.ListProjectConversationRequest request)(api.get = '/api/workflow_api/project_conversation/list', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// Trace
// 列出历史执行的trace
// List traces of historical execution
trace.ListRootSpansResponse ListRootSpans (1: trace.ListRootSpansRequest req)(api.post='/api/workflow_api/list_spans', api.category="workflow_trace", api.gen_path="workflow_trace", agw.preserve_base = "true")
trace.GetTraceSDKResponse GetTraceSDK (1: trace.GetTraceSDKRequest req)(api.post='/api/workflow_api/get_trace', api.category="workflow_trace", api.gen_path="workflow_trace", agw.preserve_base = "true")
// App
@@ -65,7 +65,7 @@ service WorkflowService {
workflow.GetChatFlowRoleResponse GetChatFlowRole(1: workflow.GetChatFlowRoleRequest request) (api.get='/api/workflow_api/chat_flow_role/get', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.CreateChatFlowRoleResponse CreateChatFlowRole(1: workflow.CreateChatFlowRoleRequest request) (api.post='/api/workflow_api/chat_flow_role/create', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
workflow.DeleteChatFlowRoleResponse DeleteChatFlowRole(1: workflow.DeleteChatFlowRoleRequest request) (api.post='/api/workflow_api/chat_flow_role/delete', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// App 发布管理
// App Release Management
workflow.ListPublishWorkflowResponse ListPublishWorkflow(1: workflow.ListPublishWorkflowRequest request) (api.post='/api/workflow_api/list_publish_workflow', api.category="workflow_api", api.gen_path="workflow_api", agw.preserve_base = "true")
// Open API

View File

@@ -3,9 +3,9 @@ include "../../base.thrift"
namespace go ocean.cloud.workflow
enum FrontedTagType {
TEXT = 0 // 文本
TIME = 1 // 时间,用时间戳,单位是毫秒
TIME_DURATION = 2 // 时间间隔,单位是毫秒
TEXT = 0 // Text
TIME = 1 // Time, with timestamp, in milliseconds
TIME_DURATION = 2 // Time interval, in milliseconds
}
// Tag
@@ -39,15 +39,15 @@ enum SpanStatus{
}
struct ListRootSpansRequest {
2: required i64 StartAt (go.tag = "json:\"start_at\"", api.body = "start_at") // 单位是毫秒
3: required i64 EndAt (go.tag = "json:\"end_at\"", api.body = "end_at") // 单位是毫秒
2: required i64 StartAt (go.tag = "json:\"start_at\"", api.body = "start_at") // It's in milliseconds.
3: required i64 EndAt (go.tag = "json:\"end_at\"", api.body = "end_at") // It's in milliseconds.
4: optional i16 Limit (go.tag = "json:\"limit\"", api.body = "limit")
5: optional bool DescByStartTime (go.tag = "json:\"desc_by_start_time\"", api.body = "desc_by_start_time")
6: optional i32 Offset (go.tag = "json:\"offset\"", api.body = "offset")
7: required string WorkflowID(go.tag = "json:\"workflow_id\"", api.body = "workflow_id")
8: optional string Input(go.tag = "json:\"input\"", api.body = "input")
9: optional SpanStatus Status(go.tag = "json:\"status\"", api.body = "status")
10: optional i32 ExecuteMode (go.tag = "json:\"execute_mode\"", api.body = "execute_mode") // 正式运行/试运行/节点Debug
10: optional i32 ExecuteMode (go.tag = "json:\"execute_mode\"", api.body = "execute_mode") // Formal run/practice run/Node Debug
255: optional base.Base Base
}
@@ -62,8 +62,8 @@ struct Span {
7: string Type (go.tag = "json:\"type\"", agw.key = "type")
8: string Name (go.tag = "json:\"name\"", agw.key = "name")
9: string ParentID (go.tag = "json:\"parent_id\"", agw.key = "parent_id")
10: i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // 单位是毫秒
11: i64 StartTime (go.tag = "json:\"start_time\"", agw.key = "start_time") // 单位是毫秒
10: i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // It's in milliseconds.
11: i64 StartTime (go.tag = "json:\"start_time\"", agw.key = "start_time") // It's in milliseconds.
12: i32 StatusCode (go.tag = "json:\"status_code\"", agw.key = "status_code")
13: list<TraceTag> Tags (go.tag = "json:\"tags\"", agw.key = "tags")
}
@@ -93,8 +93,8 @@ struct ListRootSpansResponse {
struct GetTraceSDKRequest {
2: optional string LogID (go.tag = "json:\"log_id\"", api.query = "log_id")
4: optional i64 StartAt (go.tag = "json:\"start_at\"", api.query = "start_at") // 单位是毫秒
5: optional i64 EndAt (go.tag = "json:\"end_at\"", api.query = "end_at") // 单位是毫秒
4: optional i64 StartAt (go.tag = "json:\"start_at\"", api.query = "start_at") // It's in milliseconds.
5: optional i64 EndAt (go.tag = "json:\"end_at\"", api.query = "end_at") // It's in milliseconds.
6: optional i64 WorkflowID (go.tag = "json:\"workflow_id\"", api.query = "workflow_id")
7: optional i64 ExecuteID (go.tag = "json:\"execute_id\"", api.query = "execute_id")
@@ -102,9 +102,9 @@ struct GetTraceSDKRequest {
}
enum QueryScene {
ALICE_OP = 0 // doubao cici 全链路调试台
DOUBAO_CICI_DEBUG = 1 // doubao cici debug 功能
WORKFLOW_DEBUG = 2 // workflow debug 功能
ALICE_OP = 0 // Doubao cici full link debugging station
DOUBAO_CICI_DEBUG = 1 // Doubao cici debugging function
WORKFLOW_DEBUG = 2 // Workflow debugging
}
enum TenantLevel {
@@ -119,15 +119,15 @@ struct GetTraceSDKResponse {
struct KeyScene {
1: optional string Scene (go.tag = "json:\"scene\"", agw.key = "scene") // 场景,如"拆分搜索词"\"搜索"
2: optional string StatusMessage (go.tag = "json:\"status_message\"", agw.key = "status_message") // 状态信息
1: optional string Scene (go.tag = "json:\"scene\"", agw.key = "scene") // Scenarios such as "Split search terms"\ "Search"
2: optional string StatusMessage (go.tag = "json:\"status_message\"", agw.key = "status_message") // status information
3: optional string System (go.tag = "json:\"system\"", agw.key = "system")
4: optional list<MessageItem> HistoryMessages (go.tag = "json:\"history_messages\"", agw.key = "history_messages") // 历史消息
5: optional KeySceneInput Input (go.tag = "json:\"input\"", agw.key = "input") // 输入
6: optional KeySceneOutput Output (go.tag = "json:\"output\"", agw.key = "output") // 输出
7: optional i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // 单位是毫秒
8: optional i64 StartTime (go.tag = "json:\"start_time\"", api.body = "start_time") // 开始时间,用于排序,单位是毫秒
9: optional list<KeyScene> SubKeyScenes (go.tag = "json:\"sub_key_scenes\"", agw.key = "sub_key_scenes") // 子场景
4: optional list<MessageItem> HistoryMessages (go.tag = "json:\"history_messages\"", agw.key = "history_messages") // chat history
5: optional KeySceneInput Input (go.tag = "json:\"input\"", agw.key = "input") // input
6: optional KeySceneOutput Output (go.tag = "json:\"output\"", agw.key = "output") // output
7: optional i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // It's in milliseconds.
8: optional i64 StartTime (go.tag = "json:\"start_time\"", api.body = "start_time") // Start time, used for sorting, in milliseconds
9: optional list<KeyScene> SubKeyScenes (go.tag = "json:\"sub_key_scenes\"", agw.key = "sub_key_scenes") // subscene
}
struct KeySceneInput {
@@ -141,13 +141,13 @@ struct KeySceneOutput {
}
struct TraceSummaryContent {
1: optional string Key (go.tag = "json:\"key\"", agw.key = "key") //
2: optional string Content (go.tag = "json:\"content\"", agw.key = "content") // 内容
1: optional string Key (go.tag = "json:\"key\"", agw.key = "key") // key
2: optional string Content (go.tag = "json:\"content\"", agw.key = "content") // content
}
struct MessageItem {
1: optional string Role (go.tag = "json:\"role\"", agw.key = "role") // 角色
2: optional string Content (go.tag = "json:\"content\"", agw.key = "content") // 内容
1: optional string Role (go.tag = "json:\"role\"", agw.key = "role") // role
2: optional string Content (go.tag = "json:\"content\"", agw.key = "content") // content
}
struct SpanSummary {
@@ -157,31 +157,31 @@ struct SpanSummary {
struct FrontendTag {
1: required string Key (go.tag = "json:\"key\"", agw.key = "key")
2: optional string KeyAlias (go.tag = "json:\"key_alias\"", agw.key = "key_alias") // 多语,如无配置时值沿用 key
2: optional string KeyAlias (go.tag = "json:\"key_alias\"", agw.key = "key_alias") // Multilingual, if there is no configuration value, use the key
3: required TagType TagType (go.tag = "json:\"tag_type\"", agw.key = "tag_type")
4: optional Value Value (go.tag = "json:\"value\"", agw.key = "value")
5: optional FrontedTagType FrontendTagType (go.tag = "json:\"frontend_tag_type\"", agw.key = "frontend_tag_type") // 前端类型,用于前端处理
6: optional bool canCopy (go.tag = "json:\"can_copy\"", agw.key = "can_copy") // 是否可复制
5: optional FrontedTagType FrontendTagType (go.tag = "json:\"frontend_tag_type\"", agw.key = "frontend_tag_type") // Front-end type for front-end processing
6: optional bool canCopy (go.tag = "json:\"can_copy\"", agw.key = "can_copy") // Can it be copied?
}
struct TraceSummary{
1: optional string System (go.tag = "json:\"system\"", agw.key = "system") // 一级 System 的文本
2: optional list<MessageItem> HistoryMessages (go.tag = "json:\"history_messages\"", agw.key = "history_messages") // 一级历史消息
1: optional string System (go.tag = "json:\"system\"", agw.key = "system") // System 1 text
2: optional list<MessageItem> HistoryMessages (go.tag = "json:\"history_messages\"", agw.key = "history_messages") // Level 1 chat history
3: optional list<KeyScene> KeyScenes (go.tag = "json:\"key_scenes\"", agw.key = "key_scenes")
4: optional string Input (go.tag = "json:\"input\"", agw.key = "input") // 输入
5: optional string Output (go.tag = "json:\"output\"", agw.key = "output") // 输出
6: optional i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // 一级当前对话的耗时, 单位是毫秒
7: optional string UserID (go.tag = "json:\"user_id\"", agw.key = "user_id") // 用户ID
4: optional string Input (go.tag = "json:\"input\"", agw.key = "input") // input
5: optional string Output (go.tag = "json:\"output\"", agw.key = "output") // output
6: optional i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // The duration of the current conversation, in milliseconds
7: optional string UserID (go.tag = "json:\"user_id\"", agw.key = "user_id") // user ID
}
struct TraceHeader {
1: optional i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // 单位是毫秒
2: optional i32 Tokens (agw.key = "tokens") // 输入消耗token数
1: optional i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // It's in milliseconds.
2: optional i32 Tokens (agw.key = "tokens") // Enter the number of tokens consumed
3: optional i32 StatusCode (go.tag = "json:\"status_code\"", agw.key = "status_code")
4: optional list<FrontendTag> Tags (go.tag = "json:\"tags\"", agw.key = "tags")
5: optional string MessageID (go.tag = "json:\"message_id\"", agw.key = "message_id") // 消息ID
6: optional i64 StartTime (go.tag = "json:\"start_time\"", agw.key = "start_time") // 单位是毫秒
5: optional string MessageID (go.tag = "json:\"message_id\"", agw.key = "message_id") // Message ID
6: optional i64 StartTime (go.tag = "json:\"start_time\"", agw.key = "start_time") // It's in milliseconds.
}
@@ -196,7 +196,7 @@ struct TraceFrontendDoubaoCiciDebug {
3: optional TraceSummary summary (go.tag = "json:\"summary\"", agw.key = "summary")
}
enum InputOutputType {
TEXT = 0 // 文本类型
TEXT = 0 // Text type
}
struct SpanInputOutput {
@@ -212,16 +212,16 @@ struct TraceFrontendSpan {
5: string Name (go.tag = "json:\"name\"", agw.key = "name")
6: string AliasName (go.tag = "json:\"alias_name\"", agw.key = "alias_name")
7: string ParentID (go.tag = "json:\"parent_id\"", agw.key = "parent_id")
8: i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // 单位是毫秒
9: i64 StartTime (go.tag = "json:\"start_time\"", agw.key = "start_time") // 单位是毫秒
8: i64 Duration (go.tag = "json:\"duration\"", agw.key = "duration") // It's in milliseconds.
9: i64 StartTime (go.tag = "json:\"start_time\"", agw.key = "start_time") // It's in milliseconds.
10: i32 StatusCode (go.tag = "json:\"status_code\"", agw.key = "status_code")
11: optional list<TraceTag> Tags (go.tag = "json:\"tags\"", agw.key = "tags")
12: optional SpanSummary summary (go.tag = "json:\"summary\"", agw.key = "summary") // 节点详情
12: optional SpanSummary summary (go.tag = "json:\"summary\"", agw.key = "summary") // node details
13: optional SpanInputOutput Input (go.tag = "json:\"input\"", agw.key = "input")
14: optional SpanInputOutput Output (go.tag = "json:\"output\"", agw.key = "output")
15: optional bool IsEntry (go.tag = "json:\"is_entry\"", agw.key = "is_entry") // 是否是入口节点
16: optional string ProductLine (go.tag = "json:\"product_line\"", agw.key = "product_line") // 产品线
17: optional bool IsKeySpan (go.tag = "json:\"is_key_span\"", agw.key = "is_key_span") // 是否是关键节点
18: optional list<string> OwnerList (go.tag = "json:\"owner_list\"", agw.key = "owner_list") // 节点负责人列表, 邮箱前缀
19: optional string RundownDocURL (go.tag = "json:\"rundown_doc_url\"", agw.key = "rundown_doc_url") // 节点详情文档
15: optional bool IsEntry (go.tag = "json:\"is_entry\"", agw.key = "is_entry") // Is it an entry node?
16: optional string ProductLine (go.tag = "json:\"product_line\"", agw.key = "product_line") // product line
17: optional bool IsKeySpan (go.tag = "json:\"is_key_span\"", agw.key = "is_key_span") // Is it a key node?
18: optional list<string> OwnerList (go.tag = "json:\"owner_list\"", agw.key = "owner_list") // Node owner list, mailbox prefix
19: optional string RundownDocURL (go.tag = "json:\"rundown_doc_url\"", agw.key = "rundown_doc_url") // Node Details Document
}

File diff suppressed because it is too large Load Diff