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

@@ -13,20 +13,20 @@ struct AuthToken {
}
struct PromptInfo {
1: optional string Prompt (api.body="prompt"), // 文本prompt
1: optional string Prompt (api.body="prompt"), // Text prompt
}
struct ModelInfo {
1: optional i64 ModelId (agw.js_conv="str", api.js_conv="true", api.body="model_id"), // 模型id
2: optional double Temperature (api.body="temperature") , // 温度,模型输出随机性,值越大越随机,越小越保守(0-1]
3: optional i32 MaxTokens (api.body="max_tokens") , // 回复最大Token数
4: optional double TopP (api.body="top_p") , // 另一种模型的输出随机性,值越大越随机[0,1]
5: optional double FrequencyPenalty (api.body="frequency_penalty") , // 频率惩罚,调整生成内容中的单词频率,正值单词越少见[-1.0,1.0]
6: optional double PresencePenalty (api.body="presence_penalty") , // 存在惩罚,调整生成内容中新词语频率,正值避免重复单词,用新词[-1.0,1.0]
7: optional ShortMemoryPolicy ShortMemoryPolicy (api.body="short_memory_policy") , // 上下文策略
8: optional i32 TopK (api.body="top_k") , // 生成时,采样候选集的大小
9: optional ModelResponseFormat ResponseFormat (api.body="response_format") , // 模型回复内容格式
10: optional ModelStyle ModelStyle (api.body="model_style") , // 用户选择的模型风格
1: optional i64 ModelId (agw.js_conv="str", api.js_conv="true", api.body="model_id"), // Model ID
2: optional double Temperature (api.body="temperature") , // Temperature, model output randomness, the larger the value, the more random, the smaller the more conservative (0-1]
3: optional i32 MaxTokens (api.body="max_tokens") , // Maximum Token Reply
4: optional double TopP (api.body="top_p") , // Another model's output randomness, the larger the value, the more random [0, 1]
5: optional double FrequencyPenalty (api.body="frequency_penalty") , // Frequency penalty, adjust the frequency of words in the generated content, the fewer positive words are [-1.0, 1.0]
6: optional double PresencePenalty (api.body="presence_penalty") , // There is a penalty, adjust the frequency of new words in the generated content, avoid repeating words with positive values, and use new words [-1.0, 1.0]
7: optional ShortMemoryPolicy ShortMemoryPolicy (api.body="short_memory_policy") , // contextual policy
8: optional i32 TopK (api.body="top_k") , // When generating, sample the size of the candidate set
9: optional ModelResponseFormat ResponseFormat (api.body="response_format") , // model reply content format
10: optional ModelStyle ModelStyle (api.body="model_style") , // User-selected model style
}
enum ModelStyle {
@@ -41,7 +41,7 @@ enum ModelResponseFormat {
JSON = 2,
}
// 上下文允许传输的类型
// The type of transmission allowed by the context
enum ContextMode {
Chat = 0,
FunctionCall_1 = 1,
@@ -79,23 +79,23 @@ enum ModelFuncConfigStatus {
}
struct ShortMemoryPolicy {
1: optional ContextMode ContextMode (api.body="context_mode") , // 上下文允许传输的类型
2: optional i32 HistoryRound (api.body="history_round"), // 上下文带的轮数
1: optional ContextMode ContextMode (api.body="context_mode") , // The type of transmission allowed by the context
2: optional i32 HistoryRound (api.body="history_round"), // Number of rounds of context band
}
struct PluginInfo {
1: optional i64 PluginId (agw.js_conv="str", api.js_conv="true", api.body="plugin_id"), // 插件id
1: optional i64 PluginId (agw.js_conv="str", api.js_conv="true", api.body="plugin_id"), // Plugin ID
2: optional i64 ApiId (agw.js_conv="str", api.js_conv="true", api.body="api_id") , // api Id
3: optional string ApiName (api.body="api_name") , // api name O项目用
3: optional string ApiName (api.body="api_name") , // API name O project
100: optional i64 ApiVersionMs (agw.js_conv="str", api.js_conv="true", api.body="api_version_ms"), // api version
}
struct WorkflowInfo {
1: optional i64 WorkflowId (agw.js_conv="str", api.js_conv="true", api.body="workflow_id"), // WorkflowId
2: optional i64 PluginId (agw.js_conv="str", api.js_conv="true", api.body="plugin_id") , // 插件id
2: optional i64 PluginId (agw.js_conv="str", api.js_conv="true", api.body="plugin_id") , // Plugin ID
3: optional i64 ApiId (agw.js_conv="str", api.js_conv="true", api.body="api_id") , // api Id
4: optional WorkflowMode FlowMode (agw.js_conv="str", api.body="flow_mode") // workflow or imageflow, 默认为workflow
4: optional WorkflowMode FlowMode (agw.js_conv="str", api.body="flow_mode") // Workflow or imageflow, default to workflow
5: optional string WorkflowName (api.body="workflow_name") , // workflow name
6: optional string Desc (api.body="desc", api.body="desc"),
7: optional list<PluginParameter> Parameters (api.body="parameters", api.body="parameters"),
@@ -107,7 +107,7 @@ struct PluginParameter {
3: optional bool Required (api.body="required")
4: optional string Type (api.body="type")
5: optional list<PluginParameter> SubParameters (api.body="sub_parameters")
6: optional string SubType (api.body="sub_type") // 如果Type是数组,则有subtype
6: optional string SubType (api.body="sub_type") // If Type is an array, there is a subtype
}
enum WorkflowMode {
@@ -117,19 +117,19 @@ enum WorkflowMode {
ChatFlow = 3
All = 100
}
// onboarding内容生成模式
// onboarding content generation mode
enum OnboardingMode {
NO_NEED = 1, // 不需要
USE_MANUAL = 2, // 人工指定内容多语言支持由LLM兜底
USE_LLM = 3, // LLM生成
NO_NEED = 1, // No.
USE_MANUAL = 2, // Manually specify content (multi-language support is covered by LLM)
USE_LLM = 3, // Generated by LLM
}
struct OnboardingInfo { // 对应 Coze Opening Dialog
1: optional string Prologue (api.body="prologue") , // 开场白
2: optional list<string> SuggestedQuestions (api.body="suggested_questions") , // 建议问题
3: optional OnboardingMode OnboardingMode (api.body="onboarding_mode") , // 开场白模型
4: optional string CustomizedOnboardingPrompt (api.body="customized_onboarding_prompt"), // LLM生成,用户自定义 Prompt
5: optional SuggestedQuestionsShowMode SuggestedQuestionsShowMode (api.body="suggested_questions_show_mode") , // 开场白预设问题展示方式 默认0 随机展示
struct OnboardingInfo { // Coze Opening Dialog
1: optional string Prologue (api.body="prologue") , // opening statement
2: optional list<string> SuggestedQuestions (api.body="suggested_questions") , // suggestion question
3: optional OnboardingMode OnboardingMode (api.body="onboarding_mode") , // Opener model
4: optional string CustomizedOnboardingPrompt (api.body="customized_onboarding_prompt"), // LLM Generation, User-defined Prompt
5: optional SuggestedQuestionsShowMode SuggestedQuestionsShowMode (api.body="suggested_questions_show_mode") , // The opening statement presets the problem display method, and the default is 0 random display.
}
enum SuggestedQuestionsShowMode{
@@ -141,32 +141,32 @@ enum SuggestReplyMode{
System = 0,
Custom = 1,
Disable = 2,
OriBot = 3, // agent专用复用源Bot配置
OriBot = 3, // Agent specific, multiplexed source Bot configuration
}
// suggest
struct SuggestReplyInfo { // 对应 Coze Auto-Suggestion
1: optional SuggestReplyMode SuggestReplyMode (api.body="suggest_reply_mode") , // 建议问题模型
2: optional string CustomizedSuggestPrompt (api.body="customized_suggest_prompt"), // 用户自定义建议问题
3: optional string ChainTaskName (api.body="chain_task_name") , // 运行Prompt的ChainTask名称
struct SuggestReplyInfo { // Coze Auto-Suggestion
1: optional SuggestReplyMode SuggestReplyMode (api.body="suggest_reply_mode") , // suggestion problem model
2: optional string CustomizedSuggestPrompt (api.body="customized_suggest_prompt"), // user-defined suggestion questions
3: optional string ChainTaskName (api.body="chain_task_name") , // The name of the ChainTask that runs the Prompt
}
// tts Voices
struct VoicesInfo { // 对应 Coze Voices
1: optional bool Muted (api.body="muted") , // 是否开启声音 true:禁用 false:开启
2: optional map<string,i64> I18nLangVoice (api.body="i18n_lang_voice"), // 多语音音色配置
7: optional map<string,string> I18nLangVoiceStr (api.body="i18n_lang_voice_str"), // 多语音音色配置, string类型
3: optional bool Autoplay (api.body="autoplay") , // 是否自动播放
4: optional map<string,i64> AutoplayVoice (api.body="autoplay_voice") , // 自动播放的音色
5: optional bool CloseVoiceCall (api.body="voice_call") , // 是否关闭语音通话true:关闭 false:开启 默认为false
6: optional DefaultUserInputType DefaultUserInputType (api.body="default_user_input_type"), // 默认用户输入类型
struct VoicesInfo { // Coze Voices
1: optional bool Muted (api.body="muted") , // Whether to turn on sound true: disable false: turn on
2: optional map<string,i64> I18nLangVoice (api.body="i18n_lang_voice"), // Multi-voice voice configuration
7: optional map<string,string> I18nLangVoiceStr (api.body="i18n_lang_voice_str"), // Multi-voice tone configuration, string type
3: optional bool Autoplay (api.body="autoplay") , // Whether to play automatically
4: optional map<string,i64> AutoplayVoice (api.body="autoplay_voice") , // autoplay timbre
5: optional bool CloseVoiceCall (api.body="voice_call") , // Whether to turn off voice calls, true: turn off false: turn on, default is false
6: optional DefaultUserInputType DefaultUserInputType (api.body="default_user_input_type"), // Default user input type
}
enum DefaultUserInputType {
NotSet = 0, // 没设置
Text = 1, // 文字
Voice = 2, // 按住语音
Call = 3, // 语音通话
NotSet = 0, // Not set
Text = 1, // Text
Voice = 2, // Hold down the voice
Call = 3, // voice call
}
// AnswerActions
@@ -176,32 +176,32 @@ enum AnswerActionsMode {
}
enum AnswerActionTriggerType {
Direct = 1, // 平台预设Trigger action
WebView = 2, // 点击Action 显示自定义的H5页面
SendMessage = 3, // 点击Action 发送自定义的用户消息
Direct = 1, // Platform preset Trigger action
WebView = 2, // Click Action to display the custom H5 page
SendMessage = 3, // Click Action to send a custom user message
}
struct AnswerActionTriggerRule {
1: AnswerActionTriggerType Type (api.body="type") ,
2: bool NeedPreloading (api.body="need_preloading"),
3: map<string,string> TriggerData (api.body="trigger_data") , // 根据 AnswerActionTriggerType决定
3: map<string,string> TriggerData (api.body="trigger_data") , // According to AnswerActionTriggerType
}
struct ActionIcon {
1: string Type (api.body="type") , // 自定义的按钮 type 不用传
2: string DefaultUrl (api.body="default_url"), // 默认状态
3: string ActiveUrl (api.body="active_url") , // 按下按钮的状态
4: string DefaultUri (api.body="default_uri"), // 默认状态
5: string ActiveUri (api.body="active_uri") , // 按下按钮的状态
1: string Type (api.body="type") , // Customized button type does not need to be passed
2: string DefaultUrl (api.body="default_url"), // default state
3: string ActiveUrl (api.body="active_url") , // The state of pressing the button
4: string DefaultUri (api.body="default_uri"), // default state
5: string ActiveUri (api.body="active_uri") , // The state of pressing the button
}
struct AnswerActionConfig {
1: string Key (api.body="key") , // 预制的只需要传key
2: string Name (api.body="name") , // 默认
3: ActionIcon Icon (api.body="icon") , // 下发uri
4: map<string,string> NameI18n (api.body="name_i18n") , // 存储用户i18的name
5: AnswerActionTriggerRule TriggerRule (api.body="trigger_rule"), // Direct 没有值; WebView 包含 webview_url webview_callback_psm两个keySendMessage 包含send_message_prompt
6: i32 Position (api.body="position") , // 位置
1: string Key (api.body="key") , // The prefabricated one only needs to pass the key.
2: string Name (api.body="name") , // default
3: ActionIcon Icon (api.body="icon") , // Send uri.
4: map<string,string> NameI18n (api.body="name_i18n") , // Store the name of user i18
5: AnswerActionTriggerRule TriggerRule (api.body="trigger_rule"), // Direct has no value; WebView contains webview_url and webview_callback_psm keys; SendMessage contains send_message_prompt
6: i32 Position (api.body="position") , // location
}
struct AnswerActions {
@@ -217,31 +217,31 @@ struct BotExtInfo {
4: optional string BotTemplateName (api.body="bot_template_name"),
5: optional bool UseUGCVoice (api.body="use_ugc_voice") ,
6: optional i32 AppId (api.body="app_id") ,
7: optional bool BindingMp (api.body="binding_mp") , // 是否绑定小程序标识
7: optional bool BindingMp (api.body="binding_mp") , // Whether to bind the Mini Program logo
}
struct KnowledgeInfo {
1: optional string Id (api.body="id") , // 知识库id
2: optional string Name (api.body="name"), // 知识库名称
1: optional string Id (api.body="id") , // Knowledge ID
2: optional string Name (api.body="name"), // Knowledge base name
}
enum SearchStrategy {
SemanticSearch = 0, // 语义搜索
HybirdSearch = 1, // 混合搜索
FullTextSearch = 20, // 全文搜索
SemanticSearch = 0, // semantic search
HybirdSearch = 1, // Hybrid Search
FullTextSearch = 20, // Full Text Search
}
struct Knowledge {
1: optional list<KnowledgeInfo> KnowledgeInfo (api.body="knowledge_info") , // 知识库信息
2: optional i64 TopK (api.body="top_k") , // 召回最大数据量
3: optional double MinScore (api.body="min_score") , // 最小匹配度
4: optional bool Auto (api.body="auto") , // 自动召回
5: optional SearchStrategy SearchStrategy (api.body="search_strategy"), // 搜索策略
6: optional bool ShowSource (api.body="show_source"), // 是否展示来源
7: optional KnowledgeNoRecallReplyMode NoRecallReplyMode (api.body="no_recall_reply_mode"), // 无召回回复mode默认0
8: optional string NoRecallReplyCustomizePrompt (api.body="no_recall_reply_customize_prompt"), // 无召回回复时自定义promptNoRecallReplyMode=1时生效
9: optional KnowledgeShowSourceMode ShowSourceMode (api.body="show_source_mode"), // 来源展示方式 默认值0 卡片列表方式
10: optional RecallStrategy RecallStrategy (api.body="recall_strategy"), // 召回策略, 默认值为true
1: optional list<KnowledgeInfo> KnowledgeInfo (api.body="knowledge_info") , // Knowledge Base Information
2: optional i64 TopK (api.body="top_k") , // recall maximum data volume
3: optional double MinScore (api.body="min_score") , // minimum match
4: optional bool Auto (api.body="auto") , // automatic recall
5: optional SearchStrategy SearchStrategy (api.body="search_strategy"), // search strategy
6: optional bool ShowSource (api.body="show_source"), // Whether to show the source
7: optional KnowledgeNoRecallReplyMode NoRecallReplyMode (api.body="no_recall_reply_mode"), // No recall reply mode, default 0
8: optional string NoRecallReplyCustomizePrompt (api.body="no_recall_reply_customize_prompt"), // Custom prompt for no recall reply, effective when NoRecallReplyMode = 1
9: optional KnowledgeShowSourceMode ShowSourceMode (api.body="show_source_mode"), // Source display method, default value 0 card list method
10: optional RecallStrategy RecallStrategy (api.body="recall_strategy"), // Recall policy, default value is true
}
struct RecallStrategy {
@@ -262,54 +262,54 @@ enum KnowledgeNoRecallReplyMode{
}
enum SocietyVisibility {
Public = 1, // 对所有人可见
Anonymous = 2, // 仅对host可见
Custom = 3, // 自定义
Public = 1, // Visible to all
Anonymous = 2, // Visible to host only
Custom = 3, // custom
}
struct SocietyVisibiltyConfig {
1: SocietyVisibility VisibilityType (api.body="visibility_type", go.tag="json:\"visibility_type,omitempty\"") , // 社会场景中可见性: Public = 1,Anonymous = 2
2: list<string> VisibilityRoles (api.body="visibility_roles", go.tag="json:\"visibility_roles,omitempty\""), // 可见角色列表
1: SocietyVisibility VisibilityType (api.body="visibility_type", go.tag="json:\"visibility_type,omitempty\"") , // Visibility in Social Scene: Public = 1, Anonymous = 2
2: list<string> VisibilityRoles (api.body="visibility_roles", go.tag="json:\"visibility_roles,omitempty\""), // list of visible characters
}
struct Variable {
1: optional string Key (api.body="key") , // key, Field
2: optional string Description (api.body="description") , // 描述
3: optional string DefaultValue (api.body="default_value"), // 默认值
4: optional bool IsSystem (api.body="is_system"), // 是否系统值系统值
5: optional bool PromptDisabled (api.body="prompt_disabled"), // 是否支持在Prompt中调用 默认支持
6: optional SocietyVisibiltyConfig SocietyVisibilityConfig (api.body="society_visibility_config", go.tag="json:\"society_visibility_config,omitempty\""), // 社会场景中可见性: Public = 1,Anonymous = 2
7: optional bool IsDisabled (api.body="is_disabled"), // 是否禁用默认为false代表启用
2: optional string Description (api.body="description") , // describe
3: optional string DefaultValue (api.body="default_value"), // default value
4: optional bool IsSystem (api.body="is_system"), // Whether the system value is the system value
5: optional bool PromptDisabled (api.body="prompt_disabled"), // Whether to support calling in Prompt, the default is supported
6: optional SocietyVisibiltyConfig SocietyVisibilityConfig (api.body="society_visibility_config", go.tag="json:\"society_visibility_config,omitempty\""), // Visibility in Social Scene: Public = 1, Anonymous = 2
7: optional bool IsDisabled (api.body="is_disabled"), // Whether to disable, the default is false to enable
}
struct TaskInfo { // coze 上的 Scheduled Tasks
1: optional bool UserTaskAllowed (api.body="user_task_allowed") , // 用户开启task任务
2: optional i64 EnablePresetTask (api.body="enable_preset_task"), // 允许预设任务
struct TaskInfo { // Scheduled Tasks on Coze
1: optional bool UserTaskAllowed (api.body="user_task_allowed") , // User starts task
2: optional i64 EnablePresetTask (api.body="enable_preset_task"), // Allow preset tasks
}
enum FieldItemType {
Text = 1, // 文本 String
Number = 2, // 数字 Integer
Date = 3, // 时间 Time
Text = 1, // Text String
Number = 2, // Digital Integer
Date = 3, // Time Time
Float = 4, // float Number
Boolean = 5, // bool Boolean
}
struct FieldItem {
1: optional string Name (api.body="name") , // 字段名称
2: optional string Desc (api.body="desc") , // 字段描述
3: optional FieldItemType Type (api.body="type") , // 字段类型
4: optional bool MustRequired (api.body="must_required") , // 是否必填
5: optional i64 Id (agw.js_conv="str", api.js_conv="true", api.body="id"), // 字段Id 新增为0
6: optional string TypeStr (api.body="type_str") , // 字段类型 str
7: optional i64 AlterId (api.body="alterId") , // 字段类型 str
1: optional string Name (api.body="name") , // field name
2: optional string Desc (api.body="desc") , // Field description
3: optional FieldItemType Type (api.body="type") , // field type
4: optional bool MustRequired (api.body="must_required") , // Is it required?
5: optional i64 Id (agw.js_conv="str", api.js_conv="true", api.body="id"), // The field Id is added as 0.
6: optional string TypeStr (api.body="type_str") , // Field type str
7: optional i64 AlterId (api.body="alterId") , // Field type str
}
struct Database {
1: optional string TableId (api.body="table_id") , // table id
2: optional string TableName (api.body="table_name"), // table名称
3: optional string TableDesc (api.body="table_desc"), // table简介
4: optional list<FieldItem> FieldList (api.body="field_list"), // table字段信息
5: optional bool PromptDisabled (api.body="prompt_disabled"), // 是否支持在Prompt中调用 默认支持
2: optional string TableName (api.body="table_name"), // Table name
3: optional string TableDesc (api.body="table_desc"), // Table Introduction
4: optional list<FieldItem> FieldList (api.body="field_list"), // Table field information
5: optional bool PromptDisabled (api.body="prompt_disabled"), // Whether to support calling in Prompt, the default is supported
6: optional BotTableRWMode RWMode (api.body="rw_mode"),
}
@@ -328,7 +328,7 @@ enum AgentType {
Bot_Agent = 4,
}
//版本兼容0-旧版本 1-可回退的新版本 2-不可回退的新版本 3-可回退的新版本(不再提示)
//Version Compatibility: 0 - Old Version 1 - Rollback New Version 2 - Non-Rollback New Version 3 - Rollback New Version (no longer prompted)
enum AgentVersionCompat{
OldVersion = 0
MiddleVersion = 1
@@ -339,14 +339,14 @@ enum AgentVersionCompat{
struct Agent {
1 : i64 AgentId (agw.js_conv="str", api.js_conv="true", api.body="agent_id") ,
2 : string AgentName (api.body="agent_name") ,
3 : PromptInfo PromptInfo (api.body="prompt_info") , // prompt 信息
4 : list<PluginInfo> PluginInfoList (api.body="plugin_info_list") , // plugin列表
5 : Knowledge Knowledge (api.body="knowledge") , // 数据集
6 : list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") , // Workflow 列表
7 : ModelInfo ModelInfo (api.body="model_info") , // 模型配置
8 : list<Intent> Intents (api.body="intents") , // 意图信息
3 : PromptInfo PromptInfo (api.body="prompt_info") , // Prompt message
4 : list<PluginInfo> PluginInfoList (api.body="plugin_info_list") , // List of plugins
5 : Knowledge Knowledge (api.body="knowledge") , // dataset
6 : list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") , // Workflow List
7 : ModelInfo ModelInfo (api.body="model_info") , // model configuration
8 : list<Intent> Intents (api.body="intents") , // intent information
9 : AgentType AgentType (api.body="agent_type") ,
10: bool RootAgent (api.body="root_agent") , // 是否是rootagent
10: bool RootAgent (api.body="root_agent") , // Is it a rootagent?
11: i64 ReferenceId (agw.js_conv="str", api.js_conv="true", api.body="reference_id"),
12: string FirstVersion (api.body="first_version") ,
13: string LastVersion (api.body="last_version") ,
@@ -355,11 +355,11 @@ struct Agent {
16: JumpConfig JumpConfig (api.body="jump_config") ,
17: SuggestReplyInfo SuggestReplyInfo (api.body="suggest_reply_info") ,
18: string Description (api.body="description") ,
19: AgentVersionCompat VersionCompat (api.body="version_compat") , // multi_agent版本兼容字段
19: AgentVersionCompat VersionCompat (api.body="version_compat") , // multi_agent version compatibility field
20: optional HookInfo HookInfo (api.body="hook_info") ,
21: optional string CurrentVersion (api.body="current_version") , //子bot当前版本
22: optional ReferenceInfoStatus ReferenceInfoStatus (api.body="reference_info_status") , // 1:有可用更新 2:被删除
23: optional ReferenceUpdateType UpdateType (api.body="update_type") , //子bot更新类型
21: optional string CurrentVersion (api.body="current_version") , //The current version of the subbot
22: optional ReferenceInfoStatus ReferenceInfoStatus (api.body="reference_info_status") , // 1: Available update 2: Removed
23: optional ReferenceUpdateType UpdateType (api.body="update_type") , //Subbot update type
}
struct AgentPosition{
@@ -390,28 +390,28 @@ enum BotMode{
WorkflowMode = 2,
}
enum BotSpecies { // bot种类
Default = 0, // flow创建
Function = 1, // coze创建
enum BotSpecies { // Bot type
Default = 0, // Create from flow
Function = 1, // Created from coze
}
enum TimeCapsuleMode {
Off = 0, //
On = 1, //
Off = 0, // close
On = 1, // open
}
enum DisablePromptCalling {
Off = 0,
On = 1,
}
// 时间胶囊信息
// Time Capsule Information
struct TimeCapsuleInfo {
1: optional TimeCapsuleMode TimeCapsuleMode (api.body="time_capsule_mode"),
2: optional DisablePromptCalling DisablePromptCalling (api.body="disable_prompt_calling"),
}
struct BotTagInfo {
1: optional TimeCapsuleInfo TimeCapsuleInfo (api.body="time_capsule_info"), // 时间胶囊信息 tag key : time_capsule
1: optional TimeCapsuleInfo TimeCapsuleInfo (api.body="time_capsule_info"), // Time capsule information tag key: time_capsule
}
struct FileboxInfo{
@@ -433,100 +433,100 @@ enum BusinessType {
DouyinAvatar = 1
}
// bot信息
// bot information
struct BotInfo {
1 : i64 BotId (agw.js_conv="str", api.js_conv="true", api.body="bot_id") , // bot id
2 : string Name (api.body="name") , // bot名称
3 : string Description (api.body="description") , // bot描述
4 : string IconUri (api.body="icon_uri") , // bot 图标uri
5 : string IconUrl (api.body="icon_url") , // bot 图标url
6 : i64 CreatorId (agw.js_conv="str", api.js_conv="true", api.body="creator_id") , // 创建人id
7 : i64 CreateTime (agw.js_conv="str", api.js_conv="true", api.body="create_time") , // 创建时间
8 : i64 UpdateTime (agw.js_conv="str", api.js_conv="true", api.body="update_time") , // 更新时间
9 : i64 ConnectorId (agw.js_conv="str", api.js_conv="true", api.body="connector_id"), // 业务线
10: string Version (api.body="version") , // 版本,毫秒
11: ModelInfo ModelInfo (api.body="model_info") , // 模型配置
12: PromptInfo PromptInfo (api.body="prompt_info") , // prompt 信息
13: list<PluginInfo> PluginInfoList (api.body="plugin_info_list") , // plugin列表
14: list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") , // Workflow 列表
15: OnboardingInfo OnboardingInfo (api.body="onboarding_info") , // 开场白
16: Knowledge Knowledge (api.body="knowledge") , // 数据集
17: list<Variable> VariableList (api.body="variable_list") , // kv存储
18: TaskInfo TaskInfo (api.body="task_info") , // 任务管理/预设任务
19: list<Database> DatabaseList (api.body="database_list") , // 数据表
20: SuggestReplyInfo SuggestReplyInfo (api.body="suggest_reply_info") , // 推荐问题
21: VoicesInfo VoicesInfo (api.body="voices_info") , // 音色配置
22: BotExtInfo BotExtInfo (api.body="bot_ext_info") , // 额外信息,扩展字段
23: BotMode BotMode (api.body="bot_mode") , // bot 类型,single agent or multi agent
24: list<Agent> Agents (api.body="agents") , // multi agent mode agent信息
25: BotSpecies BotSpecies (api.body="bot_species") , // Bot种类
26: BotTagInfo BotTagInfo (api.body="bot_tag_info") , // bot tag 信息,用户新增字段
27: FileboxInfo FileboxInfo (api.body="filebox_info") , // filebox 信息
28: MultiAgentInfo MultiAgentInfo (api.body="multi_agent_info") , // multi_agent结构体
29: list<BackgroundImageInfo> BackgroundImageInfoList (api.body="background_image_info_list") , // 背景图列表结构体
2 : string Name (api.body="name") , // bot name
3 : string Description (api.body="description") , // Bot description
4 : string IconUri (api.body="icon_uri") , // Bot icon uri
5 : string IconUrl (api.body="icon_url") , // Bot icon url
6 : i64 CreatorId (agw.js_conv="str", api.js_conv="true", api.body="creator_id") , // creator id
7 : i64 CreateTime (agw.js_conv="str", api.js_conv="true", api.body="create_time") , // create_time
8 : i64 UpdateTime (agw.js_conv="str", api.js_conv="true", api.body="update_time") , // update time
9 : i64 ConnectorId (agw.js_conv="str", api.js_conv="true", api.body="connector_id"), // line of business
10: string Version (api.body="version") , // Version, ms
11: ModelInfo ModelInfo (api.body="model_info") , // model configuration
12: PromptInfo PromptInfo (api.body="prompt_info") , // Prompt message
13: list<PluginInfo> PluginInfoList (api.body="plugin_info_list") , // List of plugins
14: list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") , // Workflow List
15: OnboardingInfo OnboardingInfo (api.body="onboarding_info") , // opening statement
16: Knowledge Knowledge (api.body="knowledge") , // dataset
17: list<Variable> VariableList (api.body="variable_list") , // KV storage
18: TaskInfo TaskInfo (api.body="task_info") , // Task management/preset tasks
19: list<Database> DatabaseList (api.body="database_list") , // data table
20: SuggestReplyInfo SuggestReplyInfo (api.body="suggest_reply_info") , // referral question
21: VoicesInfo VoicesInfo (api.body="voices_info") , // Timbre Configuration
22: BotExtInfo BotExtInfo (api.body="bot_ext_info") , // Additional information, extended fields
23: BotMode BotMode (api.body="bot_mode") , // Bot type, single agent or multi agent
24: list<Agent> Agents (api.body="agents") , // Multi agent mode agent information
25: BotSpecies BotSpecies (api.body="bot_species") , // Bot type
26: BotTagInfo BotTagInfo (api.body="bot_tag_info") , // Bot tag information, user new field
27: FileboxInfo FileboxInfo (api.body="filebox_info") , // FileBox Information
28: MultiAgentInfo MultiAgentInfo (api.body="multi_agent_info") , // multi_agent structure
29: list<BackgroundImageInfo> BackgroundImageInfoList (api.body="background_image_info_list") , // Background cover list structure
30: list<string> ShortcutSort (api.body="shortcut_sort") ,
31: BotStatus Status (api.body="status") , // bot状态
32: optional HookInfo HookInfo (api.body="hook_info") , // hook信息
33: UserQueryCollectConf UserQueryCollectConf (api.body="user_query_collect_conf") , // 用户query收集配置
34: LayoutInfo LayoutInfo (api.body="layout_info") , // workflow模式的编排信息
31: BotStatus Status (api.body="status") , // bot state
32: optional HookInfo HookInfo (api.body="hook_info") , // Hook information
33: UserQueryCollectConf UserQueryCollectConf (api.body="user_query_collect_conf") , // User query collection configuration
34: LayoutInfo LayoutInfo (api.body="layout_info") , // Orchestration information for workflow patterns
35: BusinessType BusinessType (api.body="business_type")
}
struct CommonKnowledge {
1: list<KnowledgeInfo> knowledge_infos , // 知识库信息
1: list<KnowledgeInfo> knowledge_infos , // Knowledge Base Information
}
struct ShortcutCommandComponent { // panel参数
1 : string name //参数名字
2 : string description //参数描述
3 : string type // 输入类型 textselectfile
4 : optional string tool_parameter // 请求工具时参数的key 对应tool的参数名称没有则为不返回
5 : optional list<string> options // type为select时的可选项列表 or type为file时支持哪些类型 imagedoctableaudiovideozipcodetxtppt
6 : optional string default_value // 默认值 没配置时不返回
7 : bool is_hide // 是否隐藏不展示 线上bot tool类型的快捷指令不返回hide=true的component
struct ShortcutCommandComponent { // Panel parameters
1 : string name //parameter name
2 : string description //parameter description
3 : string type // Input type text, select, file
4 : optional string tool_parameter // When requesting a tool, the key of the parameter corresponds to the parameter name of the tool. If not, it will not be returned.
5 : optional list<string> options // Options list when type is select or what types are supported when type is file image, doc, table, audio, video, zip, code, txt, ppt
6 : optional string default_value // Default value, not returned when not configured
7 : bool is_hide // Whether to hide or not to show, the shortcut command of the online bot tool type does not return the component with hide = true
}
struct ShortcutCommandToolInfo {
1: string name //
2: string type // tool类型 workflow plugin
2: string type // Tool type workflow plugin
}
struct ShortcutCommandInfo {
1: i64 id (api.js_conv="true") // 快捷指令id
2: string name // 快捷指令按钮名称
3: string command // 快捷指令
4: string description // 快捷指令描述
5: string query_template // 指令query模版
6: string icon_url // 快捷指令icon
7: optional list<ShortcutCommandComponent> components // 组件列表(参数列表)
8: optional ShortcutCommandToolInfo tool // tool信息
9: optional i64 agent_id (api.js_conv="true") //multi的指令时该指令由哪个节点执行 没配置不返回
1: i64 id (api.js_conv="true") // Quick Command ID
2: string name // Shortcut button name
3: string command // Quick Instruction
4: string description // shortcut description
5: string query_template // Command query template
6: string icon_url // Quick command icon
7: optional list<ShortcutCommandComponent> components // Component list (parameter list)
8: optional ShortcutCommandToolInfo tool // Tool information
9: optional i64 agent_id (api.js_conv="true") //When the multi instruction is executed by which node, it will not be returned without configuration
}
struct OpenAPIBotInfo {
1 : i64 bot_id (api.js_conv="true") , // bot id
2 : string name, // bot名称
3 : string description, // bot描述
4 : string icon_url, // bot图像url
5 : i64 create_time, // 创建时间
6 : i64 update_time, // 更新时间
7 : string version, // 版本
8 : PromptInfo prompt_info, // prompt 信息
9 : OnboardingInfo onboarding_info, // 开场白
10: BotMode bot_mode, // bot 类型,single agent or multi agent
// 11: optional list<VoiceData> voice_data_list, // 选择的语音信息
12: optional ModelInfo model_info, // 模型信息
13: list<PluginInfo> plugin_info_list, // 插件信息列表
14: optional CommonKnowledge knowledge // 知识库信息
15: list<WorkflowInfo> workflow_info_list, // workflow信息列表
16: list<ShortcutCommandInfo> shortcut_commands, // 快捷指令信息列表
// 17: list<Voice> voice_info_list, // 音色配置
18: string default_user_input_type, // 默认用户输入类型
19: SuggestReplyInfo suggest_reply_info, // 用户问题建议
20: BackgroundImageInfo background_image_info, // 背景图片
21: list<Variable> variables, // 变量列表
2 : string name, // bot name
3 : string description, // Bot description
4 : string icon_url, // Bot image url
5 : i64 create_time, // create_time
6 : i64 update_time, // update time
7 : string version, // version
8 : PromptInfo prompt_info, // Prompt message
9 : OnboardingInfo onboarding_info, // opening statement
10: BotMode bot_mode, // Bot type, single agent or multi agent
// 11: optional list < VoiceData > voice_data_list,//selected voice message
12: optional ModelInfo model_info, // model information
13: list<PluginInfo> plugin_info_list, // Plugin information list
14: optional CommonKnowledge knowledge // Knowledge Base Information
15: list<WorkflowInfo> workflow_info_list, // Workflow information list
16: list<ShortcutCommandInfo> shortcut_commands, // Quick Command Information List
// 17: list < Voice > voice_info_list,//Tone Configuration
18: string default_user_input_type, // Default user input type
19: SuggestReplyInfo suggest_reply_info, // User Question Suggestions
20: BackgroundImageInfo background_image_info, // background image
21: list<Variable> variables, // Variable list
}
@@ -537,14 +537,14 @@ struct LayoutInfo {
}
struct UserQueryCollectConf {
1: bool IsCollected (api.body="is_collected") , // 是否开启收集开关
2: string PrivatePolicy (api.body="private_policy") , // 隐私协议链接
1: bool IsCollected (api.body="is_collected") , // Whether to turn on the collection switch
2: string PrivatePolicy (api.body="private_policy") , // Privacy Policy Link
}
struct MultiAgentInfo {
1: MultiAgentSessionType SessionType (api.body="session_type") , // multi_agent会话接管方式
2: AgentVersionCompatInfo VersionCompatInfo (api.body="version_compat_info") , // multi_agent版本兼容字段 前端用
3: MultiAgentConnectorType ConnectorType (api.body="connector_type") , // multi_agent连线类型 前端用
1: MultiAgentSessionType SessionType (api.body="session_type") , // multi_agent session takeover
2: AgentVersionCompatInfo VersionCompatInfo (api.body="version_compat_info") , // multi_agent version compatibility field, front-end use
3: MultiAgentConnectorType ConnectorType (api.body="connector_type") , // multi_agent connection type, front end
}
struct AgentVersionCompatInfo {
@@ -553,18 +553,18 @@ struct AgentVersionCompatInfo {
}
struct BackgroundImageInfo {
1: optional BackgroundImageDetail WebBackgroundImage (api.body="web_background_image") , // web端背景图
2: optional BackgroundImageDetail MobileBackgroundImage (api.body="mobile_background_image") , // 移动端背景图
1: optional BackgroundImageDetail WebBackgroundImage (api.body="web_background_image") , // Web background cover
2: optional BackgroundImageDetail MobileBackgroundImage (api.body="mobile_background_image") , // Mobile end background cover
}
struct BackgroundImageDetail {
1: optional string OriginImageUri (api.body="origin_image_uri") // 原始图片
1: optional string OriginImageUri (api.body="origin_image_uri") // original image
2: optional string OriginImageUrl (api.body="origin_image_url")
3: optional string ImageUri (api.body="image_uri") // 实际使用图片
3: optional string ImageUri (api.body="image_uri") // Actual use of pictures
4: optional string ImageUrl (api.body="image_url")
5: optional string ThemeColor (api.body="theme_color")
6: optional GradientPosition GradientPosition (api.body="gradient_position") // 渐变位置
7: optional CanvasPosition CanvasPosition (api.body="canvas_position") // 裁剪画布位置
6: optional GradientPosition GradientPosition (api.body="gradient_position") // Gradual change of position
7: optional CanvasPosition CanvasPosition (api.body="canvas_position") // Crop canvas position
}
struct GradientPosition {
@@ -581,54 +581,54 @@ struct CanvasPosition {
}
// bot信息 for 更新
// Update for bot information
struct BotInfoForUpdate {
1: optional i64 BotId (agw.js_conv="str", api.js_conv="true",api.body="bot_id") // bot id
2: optional string Name (api.body="name") // bot名称
3: optional string Description (api.body="description") // bot描述
4: optional string IconUri (api.body="icon_uri") // bot 图标uri
5: optional string IconUrl (api.body="icon_url") // bot 图标url
6: optional i64 CreatorId (agw.js_conv="str", api.js_conv="true", api.body="creator_id") // 创建人id
7: optional i64 CreateTime (agw.js_conv="str", api.js_conv="true", api.body="create_time") // 创建时间
8: optional i64 UpdateTime (agw.js_conv="str", api.js_conv="true", api.body="update_time") // 更新时间
9: optional i64 ConnectorId (agw.js_conv="str", api.js_conv="true", api.body="connector_id") // 业务线
10: optional string Version (api.body="version") // 版本,毫秒
11: optional ModelInfo ModelInfo (api.body="model_info") // 模型配置
12: optional PromptInfo PromptInfo (api.body="prompt_info") // prompt 信息
13: optional list<PluginInfo> PluginInfoList (api.body="plugin_info_list") // plugin列表
14: optional list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") // Workflow 列表
15: optional OnboardingInfo OnboardingInfo (api.body="onboarding_info") // 开场白
16: optional Knowledge Knowledge (api.body="knowledge") // 数据集
17: optional list<Variable> VariableList (api.body="variable_list") // kv存储
18: optional TaskInfo TaskInfo (api.body="task_info") // 任务管理/预设任务
19: optional list<Database> DatabaseList (api.body="database_list") // 数据表
20: optional SuggestReplyInfo SuggestReplyInfo (api.body="suggest_reply_info") // 推荐问题
21: optional VoicesInfo VoicesInfo (api.body="voices_info") // 音色配置
22: optional BotExtInfo BotExtInfo (api.body="bot_ext_info") // 额外信息,扩展字段
23: optional BotMode BotMode (api.body="bot_mode") // bot 类型,single agent or multi agent
24: optional list<AgentForUpdate> Agents (api.body="agents") // multi agent mode agent信息
25: BotSpecies BotSpecies (api.body="bot_species") // Bot种类
26: optional BotTagInfo BotTagInfo (api.body="bot_tag_info") // bot tag 信息,用户新增字段
27: optional FileboxInfo FileboxInfo (api.body="filebox_info") // filebox 信息
28: optional MultiAgentInfo MultiAgentInfo (api.body="multi_agent_info") // multi_agent结构体
29: optional list<BackgroundImageInfo> BackgroundImageInfoList (api.body="background_image_info_list") // 背景图列表结构体
2: optional string Name (api.body="name") // bot name
3: optional string Description (api.body="description") // Bot description
4: optional string IconUri (api.body="icon_uri") // Bot icon uri
5: optional string IconUrl (api.body="icon_url") // Bot icon url
6: optional i64 CreatorId (agw.js_conv="str", api.js_conv="true", api.body="creator_id") // creator id
7: optional i64 CreateTime (agw.js_conv="str", api.js_conv="true", api.body="create_time") // create_time
8: optional i64 UpdateTime (agw.js_conv="str", api.js_conv="true", api.body="update_time") // update time
9: optional i64 ConnectorId (agw.js_conv="str", api.js_conv="true", api.body="connector_id") // line of business
10: optional string Version (api.body="version") // Version, ms
11: optional ModelInfo ModelInfo (api.body="model_info") // model configuration
12: optional PromptInfo PromptInfo (api.body="prompt_info") // Prompt message
13: optional list<PluginInfo> PluginInfoList (api.body="plugin_info_list") // List of plugins
14: optional list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") // Workflow List
15: optional OnboardingInfo OnboardingInfo (api.body="onboarding_info") // opening statement
16: optional Knowledge Knowledge (api.body="knowledge") // dataset
17: optional list<Variable> VariableList (api.body="variable_list") // KV storage
18: optional TaskInfo TaskInfo (api.body="task_info") // Task management/preset tasks
19: optional list<Database> DatabaseList (api.body="database_list") // data table
20: optional SuggestReplyInfo SuggestReplyInfo (api.body="suggest_reply_info") // referral question
21: optional VoicesInfo VoicesInfo (api.body="voices_info") // Timbre Configuration
22: optional BotExtInfo BotExtInfo (api.body="bot_ext_info") // Additional information, extended fields
23: optional BotMode BotMode (api.body="bot_mode") // Bot type, single agent or multi agent
24: optional list<AgentForUpdate> Agents (api.body="agents") // Multi agent mode agent information
25: BotSpecies BotSpecies (api.body="bot_species") // Bot type
26: optional BotTagInfo BotTagInfo (api.body="bot_tag_info") // Bot tag information, user new field
27: optional FileboxInfo FileboxInfo (api.body="filebox_info") // FileBox Information
28: optional MultiAgentInfo MultiAgentInfo (api.body="multi_agent_info") // multi_agent structure
29: optional list<BackgroundImageInfo> BackgroundImageInfoList (api.body="background_image_info_list") // Background cover list structure
30: optional list<string> ShortcutSort (api.body="shortcut_sort")
31: optional HookInfo HookInfo (api.body="hook_info")
32: optional UserQueryCollectConf UserQueryCollectConf (api.body="user_query_collect_conf")// 用户query收集配置
33: optional LayoutInfo LayoutInfo(api.body="layout_info") // workflow模式的编排信息
32: optional UserQueryCollectConf UserQueryCollectConf (api.body="user_query_collect_conf")// User query collection configuration
33: optional LayoutInfo LayoutInfo(api.body="layout_info") // Orchestration information for workflow patterns
}
struct AgentForUpdate {
1: optional i64 AgentId (agw.js_conv="str", api.js_conv="true", api.body="id") // agw字段名做了特殊映射 注意
2: optional string AgentName (api.body="name") // agw字段名做了特殊映射 注意
3: optional PromptInfo PromptInfo (api.body="prompt_info") // prompt 信息
4: optional list<PluginInfo> PluginInfoList (api.body="plugin_info_list") // plugin列表
5: optional Knowledge Knowledge (api.body="knowledge") // 数据集
6: optional list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") // Workflow 列表
7: optional ModelInfo ModelInfo (api.body="model_info") // 模型配置
8: optional list<Intent> Intents (api.body="intents") // 意图信息
1: optional i64 AgentId (agw.js_conv="str", api.js_conv="true", api.body="id") // The agw field names are specially mapped, note that
2: optional string AgentName (api.body="name") // The agw field names are specially mapped, note that
3: optional PromptInfo PromptInfo (api.body="prompt_info") // Prompt message
4: optional list<PluginInfo> PluginInfoList (api.body="plugin_info_list") // List of plugins
5: optional Knowledge Knowledge (api.body="knowledge") // dataset
6: optional list<WorkflowInfo> WorkflowInfoList (api.body="workflow_info_list") // Workflow List
7: optional ModelInfo ModelInfo (api.body="model_info") // model configuration
8: optional list<Intent> Intents (api.body="intents") // intent information
9: optional AgentType AgentType (api.body="agent_type")
10: optional bool RootAgent (api.body="root_agent") // 是否是rootagent
10: optional bool RootAgent (api.body="root_agent") // Is it a rootagent?
11: optional i64 ReferenceId (agw.js_conv="str", api.js_conv="true", api.body="reference_id")
12: optional string FirstVersion (api.body="first_version")
13: optional string LastVersion (api.body="last_version")
@@ -637,16 +637,16 @@ struct AgentForUpdate {
16: optional JumpConfig JumpConfig (api.body="jump_config")
17: optional SuggestReplyInfo SuggestReplyInfo (api.body="suggest_reply_info")
18: optional string Description (api.body="description")
19: optional AgentVersionCompat VersionCompat (api.body="version_compat") // multi_agent版本兼容字段
19: optional AgentVersionCompat VersionCompat (api.body="version_compat") // multi_agent version compatibility field
20: optional HookInfo HookInfo (api.body="hook_info")
}
struct TableDetail {
1: optional string TableId // table id
2: optional string TableName // table名称
3: optional string TableDesc // table简介
4: optional list<FieldItem> FieldList // table字段信息
5: optional bool PromptDisabled (api.body="prompt_disabled"), // 是否支持在Prompt中调用 默认支持
2: optional string TableName // Table name
3: optional string TableDesc // Table Introduction
4: optional list<FieldItem> FieldList // Table field information
5: optional bool PromptDisabled (api.body="prompt_disabled"), // Whether to support calling in Prompt, the default is supported
}
struct TaskPluginInputField {
@@ -671,25 +671,25 @@ struct TaskWebhookOutput {
}
struct TaskInfoDetail { // Tasks Detail
1: optional string TaskId // 任务唯一标识
2: optional string UserQuestion // 定时器触发时执行的 query例如提醒我喝水. 二期:TriggerType == "Time"
3: optional string CreateTime // 定时任务创建时间
4: optional string NextTime // 定时任务下次执行的时间点
5: optional i64 Status // 任务状态:有效/无效
6: optional i32 PresetType // 1-草稿2-线上
7: optional string CronExpr // 定时任务的 crontab 表达式
8: optional string TaskContent // 处理过后的 UserQuestion,例如:喝水
9: optional string TimeZone // 时区
10: optional string TaskName // 任务名称
1: optional string TaskId // task unique identifier
2: optional string UserQuestion // The query executed when the timer fires, for example: Remind me to drink water. Phase 2: TriggerType == "Time"
3: optional string CreateTime // Timed task create_time
4: optional string NextTime // The time when the scheduled task will next execute
5: optional i64 Status // Task Status: Valid/Invalid
6: optional i32 PresetType // 1-Draft, 2-Online
7: optional string CronExpr // crontab expression for timed tasks
8: optional string TaskContent // Treated UserQuestions, such as Drinking Water
9: optional string TimeZone // Time Zone
10: optional string TaskName // task name
11: optional string TriggerType // "Time", "Event"
12: optional string Action // "Bot query", "Plugin", "Workflow"
13: optional string BotQuery // Action == "Bot query" 时的输入
14: optional string PluginName // plugin workflow 都用这个字段
15: optional TaskPluginInput PluginInput // plugin workflow 都用这个字段
13: optional string BotQuery // Action == "Bot query"
14: optional string PluginName // Both plugins and workflows use this field
15: optional TaskPluginInput PluginInput // Both plugins and workflows use this field
16: optional string WebhookUrl // TriggerType == "Event"
17: optional string WebhookBearerToken // TriggerType == "Event"
18: optional TaskWebhookOutput WebhookOutput // TriggerType == "Event"
19: optional string OriginId // 溯源 ID。创建时生成更新/发布不变
19: optional string OriginId // Traceability ID. Generated when created, updated/released unchanged
}
struct DraftBotInfoV2 {
@@ -720,16 +720,16 @@ struct JumpConfig {
}
enum IndependentTiming {
Pre = 1 // 判断用户输入(前置)
Post = 2 // 判断节点输出(后置)
PreAndPost = 3 // 前置模式和后置模式支持同时选择
Pre = 1 // Determine user input (front)
Post = 2 // Determine node output (postfix)
PreAndPost = 3 // Front mode and rear mode support simultaneous selection
}
enum IndependentRecognitionModelType {
SLM = 0 // 小模型
LLM = 1 // 大模型
SLM = 0 // Small model
LLM = 1 // Large model
}
struct IndependentModeConfig {
1: IndependentTiming judge_timing // 判断时机
1: IndependentTiming judge_timing // judge timing
2: i32 history_round
3: IndependentRecognitionModelType model_type
4: optional string model_id
@@ -737,9 +737,9 @@ struct IndependentModeConfig {
}
struct MessageFeedback {
1: MessageFeedbackType feedback_type // 反馈类型
2: list<MessageFeedbackDetailType> detail_types // 细分类型
3: string detail_content // 负反馈自定义内容,对应用户选择Others
1: MessageFeedbackType feedback_type // feedback type
2: list<MessageFeedbackDetailType> detail_types // segmentation type
3: string detail_content // Negative feedback custom content, corresponding to user selection Others
}
enum MessageFeedbackType {
@@ -750,10 +750,10 @@ enum MessageFeedbackType {
enum MessageFeedbackDetailType {
UnlikeDefault = 0
UnlikeHarmful = 1 // 有害信息
UnlikeIncorrect = 2 // 信息有误
UnlikeNotFollowInstructions = 3 // 未遵循指令
UnlikeOthers = 4 // 其他
UnlikeHarmful = 1 // Harmful information
UnlikeIncorrect = 2 // incorrect information
UnlikeNotFollowInstructions = 3 // Did not follow instructions
UnlikeOthers = 4 // other
}
enum Scene{
@@ -762,10 +762,10 @@ enum Scene{
BotStore = 2,
CozeHome = 3,
Playground = 4,
Evaluation = 5, // 评测平台
Evaluation = 5, // evaluation platform
AgentAPP = 6,
PromptOptimize = 7, //prompt优化
GenerateAgentInfo = 8 // createbotnl2bot功能
PromptOptimize = 7, //Prompt optimization
GenerateAgentInfo = 8 // Createbot's nl2bot features
}
struct UserLabel {
@@ -844,12 +844,12 @@ struct ChatV3MessageDetail {
}
struct HookInfo {
1: optional list<HookItem> pre_agent_jump_hook // pre agent跳转hook
2: optional list<HookItem> post_agent_jump_hook // post agent跳转hook
3: optional list<HookItem> flow_hook // 流程hook
4: optional list<HookItem> atomic_hook // 原子能力hook
5: optional list<HookItem> llm_call_hook // 模型调用hook
6: optional list<HookItem> res_parsing_hook // 对话结果hook
1: optional list<HookItem> pre_agent_jump_hook // Pre agent jump hook
2: optional list<HookItem> post_agent_jump_hook // Post agent jump hook
3: optional list<HookItem> flow_hook // Process hook
4: optional list<HookItem> atomic_hook // Atomic power hook
5: optional list<HookItem> llm_call_hook // Model call hook
6: optional list<HookItem> res_parsing_hook // Conversation result hook
7: optional list<HookItem> suggestion_hook // suggesion hook
}
struct HookItem {
@@ -874,21 +874,21 @@ struct HookItem {
// struct EnterMessage {
// 1: required string Role (api.body = "role")
// 2: string Content(api.body = "content") // 内容
// 2: string Content (api.body = "content")//content
// 3: map<string,string> MetaData(api.body = "meta_data")
// 4: string ContentType(api.body = "content_type")//text/card/object_string
// 5: string Type(api.body = "type")
// }
// struct OpenMessageApi {
// 1: string Id(api.body = "id") // 主键ID
// 2: string BotId(api.body = "bot_id") // bot id //TODO 所有的i64加注解str,入参和出参都要
// 1: string Id (api.body = "id")//primary key ID
// 2: string BotId (api.body = "bot_id")//bot id//TODO All i64 plus annotation str, imported parameters and exported parameters are required
// 3: string Role(api.body = "role")
// 4: string Content(api.body = "content") // 内容
// 4: string Content (api.body = "content")//content
// 5: string ConversationId(api.body = "conversation_id") // conversation id
// 6: map<string,string> MetaData(api.body = "meta_data")
// 7: string CreatedAt(api.body = "created_at") // 创建时间
// 8: string UpdatedAt(api.body = "updated_at") // 更新时间 //已TODO 时间改成int
// 7: string CreatedAt (api.body = "created_at")//create_time
// 8: string UpdatedAt (api.body = "updated_at")//Update time//Change TODO time to int
// 9: string ChatId(api.body = "chat_id")
// 10: string ContentType(api.body = "content_type")
// 11: string Type(api.body = "type")
@@ -900,6 +900,6 @@ enum ReferenceUpdateType {
}
enum ReferenceInfoStatus {
HasUpdates = 1 // 1:有可用更新
IsDelete = 2 // 2:被删除
HasUpdates = 1 // 1: Updates are available
IsDelete = 2 // 2: Deleted
}

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

View File

@@ -6,10 +6,10 @@ enum Scene{
Explore = 1,
BotStore = 2,
CozeHome = 3,
Playground = 4, //调试
Evaluation = 5, // 评测平台
Playground = 4, //debugging
Evaluation = 5, // evaluation platform
AgentAPP = 6,
PromptOptimize = 7, //prompt优化
GenerateAgentInfo = 8 // createbotnl2bot功能
PromptOptimize = 7, //Prompt optimization
GenerateAgentInfo = 8 // Createbot's nl2bot features
SceneOpenApi = 9, //openapi
}

View File

@@ -18,7 +18,7 @@ struct ClearConversationHistoryResponse {
struct ClearConversationCtxRequest {
1: required i64 conversation_id ( api.js_conv="true")
2: optional common.Scene scene
3: optional list<string> insert_history_message_list, // 存在需要插入聊天的情况
3: optional list<string> insert_history_message_list, // There is a situation that needs to be inserted into the chat.
}
struct ClearConversationCtxResponse {
@@ -39,7 +39,7 @@ struct ConversationData {
}
struct CreateConversationRequest {
1: optional map<string,string> MetaData (api.body = "meta_data") //自定义透传字段
1: optional map<string,string> MetaData (api.body = "meta_data") //custom passthrough field
3: optional i64 BotId (api.body = "bot_id", api.js_conv="true")
4: optional i64 ConnectorId (api.body= "connector_id", api.js_conv="true")
}
@@ -62,9 +62,9 @@ struct Section {
}
struct ClearConversationApiResponse {
1 : i64 code (api.body = "code", agw.key="code") // 错误code
2 : string msg (api.body = "msg", agw.key = "msg") // 错误消息
3 : Section data (api.body = "data", agw.key = "data") // section 信息
1 : i64 code (api.body = "code", agw.key="code") // Error code
2 : string msg (api.body = "msg", agw.key = "msg") // error message
3 : Section data (api.body = "data", agw.key = "data") // Section information
255: base.BaseResp BaseResp
}
@@ -72,8 +72,8 @@ struct ClearConversationApiResponse {
struct ListConversationsApiRequest {
1 : i64 page_num (api.query = "page_num", agw.key = "page_num")
2 : i64 page_size (api.query = "page_size", agw.key = "page_size")
3 : string sort_order (api.query = "sort_order", agw.key = "sort_order") // 可选值:ASCDESC
4 : string sort_field (api.query = "sort_field", age.key = "sort_field") // 可选值:created_at创建时间
3 : string sort_order (api.query = "sort_order", agw.key = "sort_order") // Optional values: ASC, DESC
4 : string sort_field (api.query = "sort_field", age.key = "sort_field") // Optional value: such as created_at
5 : required i64 bot_id (api.query = "bot_id", agw.key = "bot_id",api.js_conv="true")
6 : optional i64 connector_id (api.query = "connector_id", agw.key = "connector_id",api.js_conv="true")
@@ -81,8 +81,8 @@ struct ListConversationsApiRequest {
}
struct ListConversationsApiResponse {
1 : i64 code (api.body = "code", agw.key="code") // 错误code
2 : string msg (api.body = "msg", agw.key = "msg") // 错误消息
1 : i64 code (api.body = "code", agw.key="code") // Error code
2 : string msg (api.body = "msg", agw.key = "msg") // error message
3 : ListConversationData data (api.body = "data", agw.key = "data")
255: base.BaseResp BaseResp
}

View File

@@ -15,14 +15,14 @@ enum MsgParticipantType {
Bot = 1
User = 2
}
// follow copilot 定义的枚举
// Enumeration following copilot definition
enum ChatMessageMetaType {
Default_0 = 0; // Compatible value
Replaceable = 1; // 端侧直接替换
Insertable = 2; // 插入引用
DocumentRef = 3; // 文档引用
KnowledgeCard = 4; // 知识库引用卡片
EmbeddedMultimedia = 100; // 嵌入的多媒体信息只是alice给端上用的因为全链路复用这一个字段所以在这儿改了
Replaceable = 1; // End-to-side direct replacement
Insertable = 2; // insert reference
DocumentRef = 3; // document citation
KnowledgeCard = 4; // Knowledge Base Reference Card
EmbeddedMultimedia = 100; // The embedded multimedia information is only used by Alice for the end. Because full link multiplexing uses this field, it has been changed here.
}
struct ExtraInfo {
@@ -45,8 +45,8 @@ struct ExtraInfo {
17: string new_section_id,
18: string remove_query_id,
19: string execute_display_name,
20: string task_type, // 对应定时任务task_type1-预设任务2-用户任务3-Plugin后台任务
21: string refer_format //agent app使用引用格式
20: string task_type, // Corresponding to timed task task_type, 1-preset task, 2-user task, 3-Plugin background task
21: string refer_format //Agent app uses reference format
22: string call_id,
}
@@ -61,9 +61,9 @@ struct MsgParticipantInfo{
8: string user_name
9: bool allow_mention
10: string access_path
11: bool is_fav // 是否被收藏
// 12: shortcut_command.ShortcutStruct shortcuts //快捷指令
13: bool allow_share // 是否允许被分享
11: bool is_fav // Is collected
// 12: shortcut_command ShortcutStruct shortcuts//Shortcuts
13: bool allow_share // Is it allowed to be shared?
}
//struct InterruptFunction {
@@ -89,7 +89,7 @@ struct SubmitToolOutputs {
1: list<InterruptPlugin> tool_calls
}
// bot_connector_platform保持同步
// Keep up with bot_connector_platform
struct RequiredAction {
1 : string type
2 :SubmitToolOutputs submit_tool_outputs
@@ -110,50 +110,50 @@ struct ChatMessage {
6 : string reply_id ,
7 : string section_id ,
8 : ExtraInfo extra_info ,
9 : string status , // 正常、打断状态 拉消息列表时使用chat运行时没有这个字段
10: optional i32 broken_pos , // 打断位置
9 : string status , // Normal, interrupted state, used when pulling the message list, this field is not available when chat is running.
10: optional i32 broken_pos , // interrupt position
11: optional string sender_id,
12: optional list<MsgParticipantInfo> mention_list,
13: i64 content_time,
14: i64 message_index (api.js_conv='true' go.tag="json:\"message_index,string\""),
15: i32 source , // 消息来源0 普通聊天消息1 定时任务2 通知3 异步结果
16: optional ChatMessage reply_message, // 对应回复的query 找不到后端加一个兜底的
17: optional RequiredAction required_action // 打断信息
18: optional list<ChatMessageMetaInfo> meta_infos, // 引用、高亮等文本标记
19: optional map<string,string> card_status // 卡片状态
20: optional string reasoning_content //模型思维链
15: i32 source , // Sources, 0 normal chat messages, 1 scheduled task, 2 notifications, 3 asynchronous results
16: optional ChatMessage reply_message, // Corresponding to the replied query, the backend cannot be found, and a backend is added.
17: optional RequiredAction required_action // interrupt message
18: optional list<ChatMessageMetaInfo> meta_infos, // Text markup such as quoting, highlighting, etc
19: optional map<string,string> card_status // Card Status
20: optional string reasoning_content //Model Thinking Chain
}
struct GetMessageListRequest {
1: string conversation_id
2: required string cursor // 首次传0/-10-最后一页,-1-未读第一页
2: required string cursor // First pass 0/-1, 0 - last page, -1 - unread first page
3: required i32 count
4: string bot_id
5: optional bool draft_mode
6: optional string preset_bot // 使用的bot模版
6: optional string preset_bot // The bot template used
7: optional common.Scene scene
8: optional string biz_kind // 同一个bot和uid下面的不同业务情况
9: optional list<string> insert_history_message_list // 存在创建聊天记录前需要插入聊天的情况
8: optional string biz_kind // Different business situations under the same bot and uid
9: optional list<string> insert_history_message_list // There are situations where you need to insert a chat before creating a chat history
10: optional LoadDirection load_direction
11: optional bool must_append // 在已有conversation情况下是否强制append message
12: optional i64 share_id (api.js_conv='true' go.tag="json:\"share_id,string\"") // 分享ID
11: optional bool must_append // Whether to force an appended message in an existing conversation
12: optional i64 share_id (api.js_conv='true' go.tag="json:\"share_id,string\"") // Share ID
}
struct GetMessageListResponse {
1: required list<ChatMessage> message_list
2: required string cursor // 下一刷存在时的位置向上翻页与next_cursor翻页方向相反。兼容旧逻辑不加prev前缀
3: required bool hasmore // 下一刷是否存在向上翻页与next_has_more翻页方向相反。兼容旧逻辑不加prev前缀
2: required string cursor // The position when the next brush exists (page up), opposite to the next_cursor page turning direction. Compatible with old logic, no prev prefix
3: required bool hasmore // Whether the next swipe exists (page up), the opposite direction to the next_has_more page turning. Compatible with old logic, without prev prefix
4: required string conversation_id
5: optional string last_section_id // 会话最新的section_id 只有第一刷返回
5: optional string last_section_id // Session Latest section_id Only First Brush Back
6: i64 code
7: string msg
8: optional map<string, MsgParticipantInfo> participant_info_map
9: string next_cursor // 下一刷存在时的位置(向下翻页),
10: bool next_has_more // 下一刷是否存在(向下翻页)
9: string next_cursor // The position when the next swipe exists (page down),
10: bool next_has_more // Does the next swipe exist (page down)
11: i64 read_message_index (api.js_conv='true' go.tag="json:\"read_message_index,string\"")
12: string connector_conversation_id //botconnector对应的id
12: string connector_conversation_id //ID for botconnector
}
struct DeleteMessageRequest {
@@ -170,10 +170,10 @@ struct DeleteMessageResponse {
}
struct BreakMessageRequest {
1: required i64 conversation_id (api.js_conv='true') //会话id
2: required i64 query_message_id (api.js_conv='true')// 当前问题id
3: optional i64 answer_message_id (api.js_conv='true') // 当前问题下哪一条回复被打断了
4: optional i32 broken_pos // 打断位置
1: required i64 conversation_id (api.js_conv='true') //session id
2: required i64 query_message_id (api.js_conv='true')// Current issue id
3: optional i64 answer_message_id (api.js_conv='true') // Which reply was interrupted under the current question?
4: optional i32 broken_pos // interrupt position
5: optional common.Scene scene
}
struct BreakMessageResponse {
@@ -181,37 +181,37 @@ struct BreakMessageResponse {
2: string msg
}
//批量查询
//batch query
struct ListMessageApiRequest {
1: required i64 conversation_id (api.query = "conversation_id",api.js_conv='true') //会话id
2: optional i64 limit (api.body = "limit") // 限制条数
3: optional string order (api.body = "order") // 排序方式 desc/asc
4: optional i64 chat_id (api.body = "chat_id",api.js_conv='true') //一次对话的id
5: optional i64 before_id (api.body = "before_id",api.js_conv='true') // 向前翻页需要传的ID
6: optional i64 after_id (api.body = "after_id",api.js_conv='true') // 向后返回需要传的ID
1: required i64 conversation_id (api.query = "conversation_id",api.js_conv='true') //session id
2: optional i64 limit (api.body = "limit") // limit number of entries
3: optional string order (api.body = "order") // Sort by desc/asc
4: optional i64 chat_id (api.body = "chat_id",api.js_conv='true') //ID of a conversation
5: optional i64 before_id (api.body = "before_id",api.js_conv='true') // The ID you need to pass to turn the page forward.
6: optional i64 after_id (api.body = "after_id",api.js_conv='true') // Return the ID to be passed backwards.
255: base.Base Base
}
struct OpenMessageApi {
1: i64 id (api.js_conv='true')// 主键ID
1: i64 id (api.js_conv='true')// primary key ID
2: i64 bot_id (api.js_conv='true') // agent id
3: string role // user / assistant/tool
4: string content //消息内容
5: i64 conversation_id //会话id
6: map<string,string> meta_data // 自定义字段
7: i64 created_at //创建时间
8: i64 updated_at //更新时间
9: i64 chat_id // 一次对话的id
10: string content_type // content 类型 text/mix
11: string type //消息类型 answer/question/function_call/tool_response
12: string section_id // 会话的section_id
13: optional string reasoning_content //模型思维链
4: string content //message content
5: i64 conversation_id //session id
6: map<string,string> meta_data // custom field
7: i64 created_at //creation time
8: i64 updated_at //update time
9: i64 chat_id // ID of a conversation
10: string content_type // Content type, text/mix
11: string type //Message Type answer/question/function_call/tool_response
12: string section_id // The section_id of conversation
13: optional string reasoning_content //Model Thinking Chain
}
struct ListMessageApiResponse {
1: optional list<OpenMessageApi> messages (api.body = "data")
2: optional bool has_more (api.body = "has_more") // 是否还有数据true 有,false 没有
3: optional i64 first_id (api.body = "first_id",api.js_conv='true') // 第一条数据的id
4: optional i64 last_id (api.body = "last_id",api.js_conv='true') // 最后一条数据的id
2: optional bool has_more (api.body = "has_more") // Is there still data, true yes, false no
3: optional i64 first_id (api.body = "first_id",api.js_conv='true') // The ID of the first piece of data
4: optional i64 last_id (api.body = "last_id",api.js_conv='true') // The id of the last piece of data.
}

View File

@@ -83,24 +83,24 @@ struct AdditionalContent {
struct AgentRunRequest {
1 : i64 bot_id (api.js_conv='true') , //agent id
2 : required i64 conversation_id (api.js_conv='true') , // 会话id
2 : required i64 conversation_id (api.js_conv='true') , // session id
5 : required string query ,
7 : map<string,string> extra , // ext 透传字段
7 : map<string,string> extra , // ext pass-through field
9 : map<string,string> custom_variables ,
10: optional bool draft_mode , // 草稿bot or 线上bot
11: optional common.Scene scene , // explore场景
12: optional string content_type , // 文件 file 图片 image
13: optional i64 regen_message_id (api.js_conv='true') , // 重试消息id
14: optional string local_message_id , // 前端本地的message_id extra_info 里面透传返回
15: optional string preset_bot , // 使用的bot模版 代替bot_id bot_version draft_mode参数, coze home使用 preset_bot="coze_home"
10: optional bool draft_mode , // Draft bot or online bot
11: optional common.Scene scene , // Explore the scene
12: optional string content_type , // Files files pictures images etc
13: optional i64 regen_message_id (api.js_conv='true') , // Retry message id
14: optional string local_message_id , // The local message_id on the front end is passed back in the extra_info
15: optional string preset_bot , // The bot template used, instead of bot_id bot_version draft_mode parameters, coze home uses preset_bot = "coze_home"
16: optional list<string> insert_history_message_list,
17: optional string device_id,
18: optional i64 space_id (api.js_conv='true'),
19: optional list<message.MsgParticipantInfo> mention_list,
20: optional list<Tool> toolList
21: optional string commit_version
22: optional string sub_scene // scene粒度下进一步区分场景目前仅给bot模版使用 = bot_template
23: optional DiffModeIdentifier diff_mode_identifier // diff模式下的聊天配置仅草稿single bot
22: optional string sub_scene // Scene granularity further distinguish scenes, currently only used for bot templates = bot_template
23: optional DiffModeIdentifier diff_mode_identifier // Chat configuration in diff mode, draft only single bot
24: optional i64 shortcut_cmd_id (api.js_conv='true')
}
@@ -140,22 +140,22 @@ struct BotConfig{
}
struct ShortcutCommandDetail {
1: required i64 command_id (api.js_conv='true')
2: map<string,string> parameters // key=参数名 value=值 object_string object 数组序列化之后的 JSON String
2: map<string,string> parameters // Key = parameter name value = value object_string JSON String after object array serialization
}
struct ChatV3Request {
1: required i64 BotID (api.body = "bot_id",api.js_conv='true'), //agent_id
2: optional i64 ConversationID (api.query = "conversation_id", api.js_conv='true'), //conversation_id
3: required string User (api.body = "user_id"), //user_id,数据隔离标识,需要保证唯一
4: optional bool Stream (api.body = "stream"), //是否流式,当前仅支持流失
5: optional list<EnterMessage> AdditionalMessages (api.body = "additional_messages"), //本次对话消息,当前仅支持role=user
6: optional map<string,string> CustomVariables (api.body = "custom_variables"), //用户自定义变量
3: required string User (api.body = "user_id"), //user_id, data isolation identification, need to ensure unique
4: optional bool Stream (api.body = "stream"), //Whether to stream, currently only supports churn.
5: optional list<EnterMessage> AdditionalMessages (api.body = "additional_messages"), //In this conversation message, only role = user is currently supported.
6: optional map<string,string> CustomVariables (api.body = "custom_variables"), //user-defined variables
8: optional map<string, string> MetaData (api.body = "meta_data")
10:optional CustomConfig CustomConfig (api.body = "custom_config")
11:optional map<string, string> ExtraParams (api.body = "extra_params") // 透传参数到 plugin/workflow 等下游
12:optional i64 ConnectorID (api.body="connector_id", api.js_conv='true') // 手动指定渠道 id 聊天。目前仅支持 websdk(=999)
13:optional ShortcutCommandDetail ShortcutCommand (api.body="shortcut_command") // 指定快捷指令
11:optional map<string, string> ExtraParams (api.body = "extra_params") // Pass parameters to plugin/workflow etc downstream
12:optional i64 ConnectorID (api.body="connector_id", api.js_conv='true') // Manually specify channel id chat. Currently only supports websdk (= 999)
13:optional ShortcutCommandDetail ShortcutCommand (api.body="shortcut_command") // Specify shortcut instructions
}
struct ChatV3MessageDetail {
@@ -177,7 +177,7 @@ struct ChatV3MessageDetail {
struct EnterMessage {
1: string Role (api.body = "role"), // user / assistant
2: string Content (api.body = "content"), // 如果是非 text需要解析 JSON
2: string Content (api.body = "content"), // If it is not text, you need to parse JSON.
3: map<string,string> MetaData (api.body = "meta_data"),
4: string ContentType (api.body = "content_type"), // text, card, object_string
5: optional string Type (api.body = "type")

View File

@@ -1,23 +1,23 @@
namespace go flow.dataengine.dataset
// 类型
// type
enum FormatType {
Text = 0 // 文本
Table = 1 // 表格
Image = 2 // 图片
Database = 3 // 数据库
Text = 0 // Text
Table = 1 // table
Image = 2 // image
Database = 3 // database
}
struct ChunkStrategy {
1: string separator // 分隔符,如句号
2: i64 max_tokens // 分片的最大token数
3: bool remove_extra_spaces // 替换掉连续的空格、换行符和制表符
4: bool remove_urls_emails // 是否去除url和email
5: ChunkType chunk_type // 如果为0, 则不使用以上字段的配置
7: optional CaptionType caption_type // 图片类型,图片描述文字的标注方式
8: optional i64 overlap; //分段重叠度
9: optional i64 max_level; //最大层级数(按层级分段时生效)
10: optional bool save_title; //切片保留层级标题(按层级分段时生效)
1: string separator // A separator, such as a period
2: i64 max_tokens // Maximum number of tokens for sharding
3: bool remove_extra_spaces // Replace consecutive spaces, newlines, and tabs
4: bool remove_urls_emails // Remove URL and email
5: ChunkType chunk_type // If 0, the configuration of the above fields is not used
7: optional CaptionType caption_type // Image type, image description text annotation method
8: optional i64 overlap; //segmented overlap
9: optional i64 max_level; //Maximum number of levels (effective when segmented by level)
10: optional bool save_title; //Slice preserves level headers (effective when segmented by level)
}
enum ChunkType{
@@ -32,67 +32,67 @@ enum ContentSchema{
}
enum CaptionType {
Auto = 0 // 智能标注
Manual = 1 // 人工标注
Auto = 0 // intelligent annotation
Manual = 1 // manual annotation
}
enum DocumentStatus {
Processing = 0 // 上传中
Enable = 1 // 生效
Disable = 2 // 失效
Deleted = 3 // 删除
Resegment = 4 // 重新分片中,调用方不感知该状态
Refreshing = 5 // 刷新中(刷新成功后会删除)
Failed = 9 // 失败
Processing = 0 // Uploading
Enable = 1 // take effect
Disable = 2 // failure
Deleted = 3 // delete
Resegment = 4 // In rescaling, the caller is not aware of the state
Refreshing = 5 // Refreshing (will be deleted after successful refresh)
Failed = 9 // fail
}
enum DocumentSource {
Document = 0 // 本地文件上传
Custom = 2 // 自定义类型
Document = 0 // local file upload
Custom = 2 // custom type
}
struct ParsingStrategy{
1: optional ParsingType parsing_type; //解析类型
2: optional bool image_extraction; //是否开启图片元素提取(精准解析时生效)
3: optional bool table_extraction; //是否开启表格元素提取(精准解析时生效)
4: optional bool image_ocr; //是否开启图片OCR精准解析时生效
1: optional ParsingType parsing_type; //parse type
2: optional bool image_extraction; //Whether to enable image element extraction (effective when accurately parsing)
3: optional bool table_extraction; //Whether to enable table element extraction (effective when accurately parsing)
4: optional bool image_ocr; //Whether to turn on picture OCR (effective when accurate analysis)
}
enum ParsingType{
FastParsing = 0 //快速解析
AccurateParsing = 1 //精准解析
FastParsing = 0 //fast parse
AccurateParsing = 1 //accurate analysis
}
struct IndexStrategy{
1: optional bool vector_indexing; //是否开启向量索引(默认为true
2: optional bool keyword_indexing; //是否开启关键词索引(默认为true
3: optional bool hierarchical_indexing; //是否开启分层索引
4: optional string model; //向量模型
1: optional bool vector_indexing; //Whether to enable vector indexing (default is true)
2: optional bool keyword_indexing; //Whether to enable keyword indexing (default is true)
3: optional bool hierarchical_indexing; //Whether to enable hierarchical indexing
4: optional string model; //vector model
}
struct FilterStrategy{
1: optional list<i32> filter_page; //过滤页数
1: optional list<i32> filter_page; //filter pages
}
// 排序字段
// sort field
enum OrderField {
CreateTime = 1
UpdateTime = 2
}
// 排序规则
// OrderType
enum OrderType {
Desc = 1
Asc = 2
}
struct SinkStrategy {
1: bool check_index // 是否检查索引成功
1: bool check_index // Check whether the index was successful
}
enum ReviewStatus {
Processing = 0 // 处理中
Enable = 1 // 已完成
Failed = 2 // 失败
ForceStop = 3 // 失败
Processing = 0 // Processing
Enable = 1 // Completed.
Failed = 2 // fail
ForceStop = 3 // fail
}

View File

@@ -5,13 +5,13 @@ include "common.thrift"
namespace go flow.dataengine.dataset
struct CreateDatasetRequest {
1: string name // 知识库名称长度不超过100个字符
2: string description // 知识库描述
3: i64 space_id (agw.js_conv="str", api.js_conv="true") // 空间ID
4: string icon_uri // 知识库头像URI
1: string name // Knowledge base name, no more than 100 characters in length
2: string description // Knowledge Base Description
3: i64 space_id (agw.js_conv="str", api.js_conv="true") // Space ID
4: string icon_uri // Knowledge Base Avatar URI
5: common.FormatType format_type
6: i64 biz_id (agw.js_conv="str", api.js_conv="true") // 开放给第三方的业务标识, coze 传 0 或者不传
7: i64 project_id (agw.js_conv="str", api.js_conv="true") //新增project ID
6: i64 biz_id (agw.js_conv="str", api.js_conv="true") // Open to third-party business identity, coze pass 0 or no pass
7: i64 project_id (agw.js_conv="str", api.js_conv="true") //project ID
255: optional base.Base Base
}
@@ -25,7 +25,7 @@ struct CreateDatasetResponse {
}
struct DatasetDetailRequest {
1: list<string> DatasetIDs (agw.js_conv="str", api.body="dataset_ids")
3: i64 project_id (agw.js_conv="str", api.js_conv="true") //新增project ID
3: i64 project_id (agw.js_conv="str", api.js_conv="true") // project ID
2: i64 space_id (agw.js_conv="str", api.js_conv="true")
255: optional base.Base Base
@@ -42,38 +42,38 @@ struct DatasetDetailResponse {
enum DatasetStatus {
DatasetProcessing = 0
DatasetReady = 1
DatasetDeleted = 2 // 软删
DatasetForbid = 3 // 不启用
DatasetDeleted = 2 // soft delete
DatasetForbid = 3 // Do not enable
DatasetFailed = 9
}
struct Dataset {
1: i64 dataset_id(agw.js_conv="str", api.js_conv="true")
2: string name // 数据集名称
3: list<string> file_list // 文件列表
4: i64 all_file_size (agw.js_conv="str", api.js_conv="true") // 所有文件大小
5: i32 bot_used_count // 使用Bot
2: string name // Dataset name
3: list<string> file_list // file list
4: i64 all_file_size (agw.js_conv="str", api.js_conv="true") // All file sizes
5: i32 bot_used_count // Bot count
6: DatasetStatus status
7: list<string> processing_file_list // 处理中的文件名称列表,兼容老逻辑
8: i32 update_time // 更新时间,秒级时间戳
7: list<string> processing_file_list // List of file names in process, compatible with old logic
8: i32 update_time // Update time, second timestamp
9: string icon_url
10: string description
11: string icon_uri
12: bool can_edit // 是否可以编辑
13: i32 create_time // 创建时间,秒级时间戳
14: i64 creator_id (agw.js_conv="str", api.js_conv="true") // 创建者ID
15: i64 space_id (agw.js_conv="str", api.js_conv="true") // 空间ID
18: list<string> failed_file_list (agw.js_conv="str") // 处理失败的文件
12: bool can_edit // Can it be edited?
13: i32 create_time // create_time, second timestamp
14: i64 creator_id (agw.js_conv="str", api.js_conv="true") // creator ID
15: i64 space_id (agw.js_conv="str", api.js_conv="true") // Space ID
18: list<string> failed_file_list (agw.js_conv="str") // Processing failed files
19: common.FormatType format_type
20: i32 slice_count // 分段数量
21: i32 hit_count // 命中次数
22: i32 doc_count // 文档数量
23: common.ChunkStrategy chunk_strategy // 切片规则
20: i32 slice_count // number of segments
21: i32 hit_count // hit count
22: i32 doc_count // number of documents
23: common.ChunkStrategy chunk_strategy // slicing rule
24: list<string> processing_file_id_list // 处理中的文件ID列表
25: string project_id //新增project ID
24: list<string> processing_file_id_list // List of file IDs in process
25: string project_id //project ID
}
struct ListDatasetRequest {
@@ -82,12 +82,12 @@ struct ListDatasetRequest {
3: optional i32 page
4: optional i32 size
5: i64 space_id (agw.js_conv="str", api.js_conv="true")
6: optional common.OrderField order_field // 排序字段
7: optional common.OrderType order_type // 排序规则
8: optional string space_auth // 如果传了指定值, 就放开校验
9: optional i64 biz_id (agw.js_conv="str", api.js_conv="true") // 开放给第三方的业务标识
10: optional bool need_ref_bots // 是否需要拉取引用bots的数量会增加响应延时
11: optional string project_id //新增project ID
6: optional common.OrderField order_field // sort field
7: optional common.OrderType order_type // order_type
8: optional string space_auth // If the specified value is passed, the verification is released
9: optional i64 biz_id (agw.js_conv="str", api.js_conv="true") // Business identity open to third parties
10: optional bool need_ref_bots // Whether the number of reference bots needs to be pulled will increase the response delay
11: optional string project_id //project ID
255: optional base.Base Base
}
@@ -99,12 +99,12 @@ struct ListDatasetResponse {
255: required base.BaseResp BaseResp
}
struct DatasetFilter {
// 如果都设置了And 关系
1: optional string name // 关键字搜索, 按照名称模糊匹配
2: optional list<string> dataset_ids (agw.js_conv="str") // 知识库id列表
3: optional DatasetSource source_type // 来源
4: optional DatasetScopeType scope_type // 搜索类型
5: optional common.FormatType format_type // 类型
// The following conditions are related to and
1: optional string name // Keyword search, fuzzy match by name
2: optional list<string> dataset_ids (agw.js_conv="str") // Knowledge id list
3: optional DatasetSource source_type // source
4: optional DatasetScopeType scope_type // search type
5: optional common.FormatType format_type // type
}
enum DatasetScopeType {
@@ -131,10 +131,10 @@ struct DeleteDatasetResponse {
}
struct UpdateDatasetRequest {
1: i64 dataset_id (agw.js_conv="str", api.js_conv="true") // 知识库id
2: string name // 知识库名称,不能为空
3: string icon_uri // 知识库icon
4: string description // 知识库描述
1: i64 dataset_id (agw.js_conv="str", api.js_conv="true") // Knowledge ID
2: string name // Knowledge base name, cannot be empty
3: string icon_uri // Knowledge base icon
4: string description // Knowledge Base Description
5: optional DatasetStatus status
255: optional base.Base Base;

View File

@@ -8,7 +8,7 @@ struct ListDocumentRequest {
2: optional list<string> document_ids (agw.js_conv='str')
3: optional i32 page
4: optional i32 size
5: optional string keyword // 根据名称搜索
5: optional string keyword // Search by name
255: optional base.Base Base
}
@@ -25,59 +25,59 @@ struct ListDocumentResponse {
struct DocumentInfo {
1: string name
2: i64 document_id(agw.js_conv='str', api.js_conv='true')
3: optional string tos_uri // 文件链接
5: i32 create_time // 创建时间
6: i32 update_time // 更新时间
7: optional i64 creator_id (agw.js_conv="str", api.js_conv='true', api.body="creator_id") // 创建人
8: i32 slice_count // 包含分段数量
9: string type // 文件后缀 csv, pdf
10: i32 size // 文件大小 字节数
11: i32 char_count // 字符数
12: common.DocumentStatus status // 状态
13: i32 hit_count // 命中次数
14: common.DocumentSource source_type // 来源
18: common.FormatType format_type // 文件类型
19: optional list<TableColumn> table_meta // 表格类型元数据
20: optional string web_url // url 地址
21: optional string status_descript // 状态的详细信息;如果切片失败,返回失败信息
24: optional i64 space_id(agw.js_conv="str", api.js_conv="true") // 空间id
3: optional string tos_uri // file link
5: i32 create_time // create_time
6: i32 update_time // update time
7: optional i64 creator_id (agw.js_conv="str", api.js_conv='true', api.body="creator_id") // creator_id
8: i32 slice_count // number of segments included
9: string type // File suffix csv, pdf, etc
10: i32 size // File size, number of bytes
11: i32 char_count // character count
12: common.DocumentStatus status // status
13: i32 hit_count // hit count
14: common.DocumentSource source_type // source
18: common.FormatType format_type // file type
19: optional list<TableColumn> table_meta // Table type metadata
20: optional string web_url // URL address
21: optional string status_descript // Details of the status; if the slice fails, return the failure information
24: optional i64 space_id(agw.js_conv="str", api.js_conv="true") // Space ID
// 以下字段仅针对重构后的表格类型有用,用于前端判断
26: optional bool editable_append_content // 仅针对表格类型,是否允许添加内容、修改表结构
27: common.ChunkStrategy chunk_strategy // 切片规则
// The following fields are only useful for the reconstructed table type and are used for front-end judgment
26: optional bool editable_append_content // Only for table types, are you allowed to add content and modify the table structure?
27: common.ChunkStrategy chunk_strategy // slicing rule
28: optional string imagex_uri // imagex 存储的文件链接
29: optional string doc_outline // 层级分段文档树Json (未使用)
30: optional common.ParsingStrategy parsing_strategy // 解析策略
32: optional common.FilterStrategy filter_strategy // 过滤策略
33: optional string doc_tree_tos_url // 层级分段文档树 tos_url
34: optional string preview_tos_url // 预览用的原文档 tos_url
35: optional i64 review_id // 预览用的原文档 tos_url
28: optional string imagex_uri // File links stored by ImageX
29: optional string doc_outline // Hierarchical Segmentation Document Tree Json (unused)
30: optional common.ParsingStrategy parsing_strategy // parsing strategy
32: optional common.FilterStrategy filter_strategy // filtering strategy
33: optional string doc_tree_tos_url // Hierarchical segmented document tree tos_url
34: optional string preview_tos_url // Preview the original document tos_url
35: optional i64 review_id // Preview the original document tos_url
}
struct TableColumn {
1: i64 id(agw.js_conv="str", api.js_conv="true", api.body="id") // 列 id
2: string column_name // 列名
3: bool is_semantic // 是否为语义匹配列
4: i64 sequence(agw.js_conv="str", api.js_conv="true", api.body="sequence")// 列原本在 excel 的序号
5: optional ColumnType column_type // 列类型
1: i64 id(agw.js_conv="str", api.js_conv="true", api.body="id") // Column ID
2: string column_name // column_name
3: bool is_semantic // Is it a semantically matched column?
4: i64 sequence(agw.js_conv="str", api.js_conv="true", api.body="sequence")// List the serial number originally in excel
5: optional ColumnType column_type // column type
6: optional bool contains_empty_value
7: optional string desc // 描述
7: optional string desc // describe
}
enum ColumnType {
Unknown = 0
Text = 1 // 文本
Number = 2 // 数字
Date = 3 // 时间
Text = 1 // Text
Number = 2 // number
Date = 3 // time
Float = 4 // float
Boolean = 5 // bool
Image = 6 // 图片
Image = 6 // picture
}
struct DeleteDocumentRequest {
2: list<string> document_ids // 要删除的文档ID列表
2: list<string> document_ids // List of document IDs to delete
255: optional base.Base Base
}
@@ -91,12 +91,12 @@ struct DeleteDocumentResponse {
struct UpdateDocumentRequest{
1: i64 document_id (agw.js_conv="str", api.js_conv="true")
// 需要更新就传, 更新名称
// If you need to update, please upload it and update the name.
3: optional string document_name
// 更新表结构
5: optional list<TableColumn> table_meta // 表格元数据
// Update table structure
5: optional list<TableColumn> table_meta // Table metadata
255: optional base.Base Base
}
@@ -109,8 +109,8 @@ struct UpdateDocumentResponse {
struct UpdatePhotoCaptionRequest {
1: required i64 document_id(agw.js_conv='str', api.js_conv='true') // 文档ID
2: required string caption // 要更新的图片描述信息
1: required i64 document_id(agw.js_conv='str', api.js_conv='true') // Document ID
2: required string caption // Picture description information to be updated
255: optional base.Base Base
}
@@ -122,18 +122,18 @@ struct UpdatePhotoCaptionResponse {
}
struct ListPhotoRequest {
1: required i64 dataset_id(agw.js_conv='str', api.js_conv='true') // 知识库ID
2: optional i32 page // 页数,从 1 开始
3: optional i32 size // 每页大小
1: required i64 dataset_id(agw.js_conv='str', api.js_conv='true') // Knowledge ID
2: optional i32 page // Number of pages, starting from 1
3: optional i32 size // page size
4: optional PhotoFilter filter
255: optional base.Base Base
}
struct PhotoFilter {
1: optional bool has_caption // true 筛选 “已标注” 的图片false 筛选 “未标注” 的图片
2: optional string keyword // 搜索关键字,对图片名称和图片描述进行搜索
3: optional common.DocumentStatus status // 状态
1: optional bool has_caption // True to filter "marked" images, false to filter "unmarked" images
2: optional string keyword // Search keywords, search for image names and picture descriptions
3: optional common.DocumentStatus status // status
}
struct ListPhotoResponse {
@@ -145,44 +145,44 @@ struct ListPhotoResponse {
255: required base.BaseResp BaseResp(api.none="true")
}
struct PhotoInfo { // 图片型知识库一个图片对应一个文档
1: string name // 图片名称
2: i64 document_id(agw.js_conv='str', api.js_conv='true') // 文档ID
3: string url // 图片链接
4: string caption // 图片描述信息
5: i32 create_time // 创建时间
6: i32 update_time // 更新时间
7: i64 creator_id (agw.js_conv="str", api.js_conv='true', agw.key="creator_id", api.body="creator_id") // 创建人
8: string type // 图片后缀 jpg, png
9: i32 size // 图片大小
10: common.DocumentStatus status // 状态
11: common.DocumentSource source_type // 来源
struct PhotoInfo { // Picture Knowledge Base One picture corresponds to one document
1: string name // image name
2: i64 document_id(agw.js_conv='str', api.js_conv='true') // Document ID
3: string url // image link
4: string caption // picture description information
5: i32 create_time // create_time
6: i32 update_time // update time
7: i64 creator_id (agw.js_conv="str", api.js_conv='true', agw.key="creator_id", api.body="creator_id") // creator_id
8: string type // Image suffix jpg, png, etc
9: i32 size // image size
10: common.DocumentStatus status // status
11: common.DocumentSource source_type // source
}
struct PhotoDetailRequest {
1: required list<string> document_ids (agw.js_conv='str') // 文档ID列表
2: required i64 dataset_id(agw.js_conv='str', api.js_conv='true') // 知识库ID
1: required list<string> document_ids (agw.js_conv='str') // Document ID List
2: required i64 dataset_id(agw.js_conv='str', api.js_conv='true') // Knowledge ID
255: optional base.Base Base
}
struct PhotoDetailResponse {
1: map<string, PhotoInfo> photo_infos // 文档ID到图片信息的映射
1: map<string, PhotoInfo> photo_infos // Mapping document ID to image information
253: required i64 code
254: required string msg
255: required base.BaseResp BaseResp(api.none="true")
}
struct ResegmentRequest {
1: i64 dataset_id (agw.js_conv="str", api.js_conv="true") // 知识库ID
2: list<string> document_ids // 要重新分段的文档
3: common.ChunkStrategy chunk_strategy // 分段策略
5: optional common.ParsingStrategy parsing_strategy // 解析策略
7: optional common.FilterStrategy filter_strategy; // 过滤策略
1: i64 dataset_id (agw.js_conv="str", api.js_conv="true") // Knowledge ID
2: list<string> document_ids // Document to be re-segmented
3: common.ChunkStrategy chunk_strategy // segmentation strategy
5: optional common.ParsingStrategy parsing_strategy // parsing strategy
7: optional common.FilterStrategy filter_strategy; // filtering strategy
255: optional base.Base Base
}
struct ResegmentResponse {
1: list<DocumentInfo> document_infos // 老版需要. 仅返回id 和名称即可
1: list<DocumentInfo> document_infos // The old version requires. Just return the id and name.
253: required i64 code
254: required string msg
@@ -190,16 +190,16 @@ struct ResegmentResponse {
}
struct CreateDocumentRequest {
1: i64 dataset_id(agw.js_conv='str', api.js_conv='true') // 要插入文档的知识库id
1: i64 dataset_id(agw.js_conv='str', api.js_conv='true') // The knowledge base id of the document to insert.
4: common.FormatType format_type // 知识库的类型,目前支持文本、表格、图片三种知识库
4: common.FormatType format_type // Types of knowledge bases, currently supporting text, tables, and images
// 表格类型一次只能创建一个
6: list<DocumentBase> document_bases // 待创建的文档信息
// Only one table type can be created at a time
6: list<DocumentBase> document_bases // Document information to be created
17: optional common.ChunkStrategy chunk_strategy // 只在知识库中没有文档时需要传递,已有则从知识库获取.切片规则,为空则自动按段落切片
31: optional bool is_append // 为 true 时向已有的 document 追加内容。text 类型不能使用
32: optional common.ParsingStrategy parsing_strategy // 解析策略
17: optional common.ChunkStrategy chunk_strategy // Only when there is no document in the knowledge base, it needs to be passed, and if there is one, it will be obtained from the knowledge base. Slicing rules, if it is empty, it will be automatically sliced by paragraph
31: optional bool is_append // Appends content to an existing document when true. The text type cannot be used
32: optional common.ParsingStrategy parsing_strategy // parsing strategy
255: optional base.Base Base
}
@@ -212,37 +212,37 @@ struct CreateDocumentResponse {
255: required base.BaseResp BaseResp
}
// 用于创建文档的基本信息
// Basic information for creating a document
struct DocumentBase{
1: string name // 文档名称
1: string name // Document name
2: SourceInfo source_info
// 以下参数表格类型需要传递
4: optional list<TableColumn> table_meta // 表格元数据
5: optional TableSheet table_sheet // 表格解析信息
6: optional common.FilterStrategy filter_strategy // 过滤策略
7: optional string caption // 图片类型知识库,人工标注时的图片描述
// The following parameter table types need to be passed
4: optional list<TableColumn> table_meta // Table metadata
5: optional TableSheet table_sheet // Table parsing information
6: optional common.FilterStrategy filter_strategy // filtering strategy
7: optional string caption // Image type knowledge base, picture description when manually annotated
}
// 支持多种数据源
// Supports multiple data sources
struct SourceInfo {
1: optional string tos_uri (api.body="tos_uri"); // 本地上传返回的 uri
1: optional string tos_uri (api.body="tos_uri"); // Upload the returned URI locally.
4: optional common.DocumentSource document_source (api.body="document_source");
// document_source 自定义原始内容: 表格型知识库需要符合的格式json list<map<string, string>>
// document_source custom raw content: Format required for a tabular knowledge base: json list < map < string, string > >
5: optional string custom_content (api.body="custom_content")
// document_source 本地: 如果不传 tos 地址, 则需要传文件 base64, 类型
7: optional string file_base64 // 文件经过 base64 后的字符串
8: optional string file_type // 文件类型, 比如 pdf
// document_source local: If you don't send the tos address, you need to send the file base64, type
7: optional string file_base64 // File string after base64
8: optional string file_type // File type, such as PDF
// imagex_uri, tos_uri 二选一, imagex_uri 优先,需要通过 imagex 的方法获取数据和签发 url
// imagex_uri, and tos_uri choose one, imagex_uri priority, need to get data and sign url through imagex method
10: optional string imagex_uri
}
struct TableSheet {
1: i64 sheet_id (agw.js_conv="str", agw.key="sheet_id", api.js_conv="true", api.body="sheet_id") , // 用户选择的 sheet id
2: i64 header_line_idx (agw.js_conv="str", agw.key="header_line_idx", api.js_conv="true", api.body="header_line_idx"), // 用户选择的表头行数,从 0 开始编号
3: i64 start_line_idx (agw.js_conv="str", agw.key="start_line_idx", api.js_conv="true", api.body="start_line_idx") , // 用户选择的起始行号,从 0 开始编号
1: i64 sheet_id (agw.js_conv="str", agw.key="sheet_id", api.js_conv="true", api.body="sheet_id") , // User selected sheet id
2: i64 header_line_idx (agw.js_conv="str", agw.key="header_line_idx", api.js_conv="true", api.body="header_line_idx"), // The number of header rows selected by the user, numbered from 0
3: i64 start_line_idx (agw.js_conv="str", agw.key="start_line_idx", api.js_conv="true", api.body="start_line_idx") , // User-selected starting line number, numbered from 0
}
@@ -261,63 +261,63 @@ struct GetDocumentProgressResponse {
struct DocumentProgress {
1: i64 document_id(agw.js_conv="str", api.js_conv='true')
2: i32 progress // 知识库进度百分比
2: i32 progress // Knowledge Base Progress Percentage
3: common.DocumentStatus status
4: optional string status_descript // 状态的详细描述;如果切片失败,返回失败信息
4: optional string status_descript // A detailed description of the status; if the slice fails, a failure message is returned
5: string document_name
6: optional i64 remaining_time // 剩余时间单位秒
6: optional i64 remaining_time // Remaining time in seconds
7: optional i64 size
8: optional string type
9: optional string url
}
// 获取 database 上传的表格文件元信息
// Get the table file meta information uploaded by the database
struct GetTableSchemaRequest {
1: optional TableSheet table_sheet; // 表格解析信息, 默认初始值0,0,1表示第1个表格表头行为第1行数据行从第2行开始
2: optional TableDataType table_data_type; // 不传默认返回所有数据
3: optional i64 document_id(agw.js_conv="str", agw.key="document_id", api.js_conv="true", api.body="document_id"); // 兼容重构前的版本:如果需要拉取的是当前 document 的 schema 时传递该值
4: optional SourceInfo source_file; // source file 的信息,新增 segment / 之前逻辑迁移到这里
5: optional list<TableColumn> origin_table_meta; // 表格预览前端需要传递原始的数据表结构
6: optional list<TableColumn> preview_table_meta; // 表格预览前端需要传递用户编辑之后的数据表结构
1: optional TableSheet table_sheet; // Table parsing information, the default initial value is 0, 0, 1, which represents the first table, the first row of the table header, and the data row starts from the second row
2: optional TableDataType table_data_type; // All data is returned by default without passing it on.
3: optional i64 document_id(agw.js_conv="str", agw.key="document_id", api.js_conv="true", api.body="document_id"); // Compatible with pre-refactoring versions: pass this value if you need to pull the schema of the current document
4: optional SourceInfo source_file; // Source file information, add segment/before logic migrate here
5: optional list<TableColumn> origin_table_meta; // The table preview front end needs to pass the original data table structure
6: optional list<TableColumn> preview_table_meta; // The table preview front end needs to pass the data table structure edited by the user
255: optional base.Base Base
}
enum TableDataType {
AllData = 0 // schema sheets preview data
OnlySchema = 1 // 只需要 schema 结构 & Sheets
OnlyPreview = 2 // 只需要 preview data
AllData = 0 // Schema sheets and preview data
OnlySchema = 1 // Only need schema structure & Sheets
OnlyPreview = 2 // Just preview the data
}
struct DocTableSheet {
1: i64 id; // sheet 的编号
2: string sheet_name; // sheet
3: i64 total_row; // 总行数
1: i64 id; // Number of sheet
2: string sheet_name; // Sheet name
3: i64 total_row; // total number of rows
}
struct GetTableSchemaResponse {
1: required i32 code
2: required string msg
3: list<DocTableSheet> sheet_list
4: list<TableColumn> table_meta // 选中的 sheet 的 schema, 不选择默认返回第一个 sheet
5: list<map<string,string>> preview_data(api.body="preview_data") // knowledge table 场景中会返回
4: list<TableColumn> table_meta // The schema of the selected sheet, not selected to return the first sheet by default
5: list<map<string,string>> preview_data(api.body="preview_data") // The knowledge table will return
255: optional base.BaseResp BaseResp(api.none="true")
}
// 判断用户配置的 schema 是否和对应 document id 的一致
// Determine whether the schema configured by the user is consistent with the corresponding document id
struct ValidateTableSchemaRequest {
1: i64 space_id (agw.js_conv="str", agw.key="space_id", api.js_conv="true", api.body="space_id") // 空间ID
2: i64 document_id (agw.js_conv="str", agw.key="document_id", api.js_conv="true", api.body="document_id") // 要校验的文档ID
3: SourceInfo source_info (api.body="source_file") // source file 的信息
4: TableSheet table_sheet (api.body="table_sheet") // 表格解析信息, 默认初始值0,0,1表示第1个表格表头行为第1行数据行从第2行开始
1: i64 space_id (agw.js_conv="str", agw.key="space_id", api.js_conv="true", api.body="space_id") // Space ID
2: i64 document_id (agw.js_conv="str", agw.key="document_id", api.js_conv="true", api.body="document_id") // Document ID to verify
3: SourceInfo source_info (api.body="source_file") // Information from the source file
4: TableSheet table_sheet (api.body="table_sheet") // Table parsing information, the default initial value is 0, 0, 1, which represents the first table, the first row of the table header, and the data row starts from the second row
255: optional base.Base Base
}
struct ValidateTableSchemaResponse {
1: optional map<string,string> ColumnValidResult (api.body="column_valid_result");
// 如果失败会返回错误码
// If it fails, an error code will be returned.
253: required i64 code
254: required string msg
255: optional base.BaseResp BaseResp(api.none="true")
@@ -330,7 +330,7 @@ struct ExtractPhotoCaptionRequest {
}
struct ExtractPhotoCaptionResponse {
1: string caption // 图片描述
1: string caption // picture description
253: required i64 code
254: required string msg
255: required base.BaseResp BaseResp(api.none="true")

View File

@@ -7,14 +7,14 @@ include "review.thrift"
namespace go flow.dataengine.dataset
service DatasetService {
// 知识库相关
// Knowledge base related
dataset.GetIconResponse GetIconForDataset(1:dataset.GetIconRequest req) (api.post='/api/knowledge/icon/get', api.category="knowledge",agw.preserve_base="true")
dataset.CreateDatasetResponse CreateDataset(1:dataset.CreateDatasetRequest req) (api.post='/api/knowledge/create', api.category="knowledge",agw.preserve_base="true")
dataset.DatasetDetailResponse DatasetDetail(1:dataset.DatasetDetailRequest req) (api.post='/api/knowledge/detail', api.category="knowledge",agw.preserve_base="true")
dataset.ListDatasetResponse ListDataset(1:dataset.ListDatasetRequest req) (api.post='/api/knowledge/list', api.category="knowledge",agw.preserve_base="true")
dataset.DeleteDatasetResponse DeleteDataset(1:dataset.DeleteDatasetRequest req) (api.post='/api/knowledge/delete', api.category="knowledge",agw.preserve_base="true")
dataset.UpdateDatasetResponse UpdateDataset(1:dataset.UpdateDatasetRequest req) (api.post='/api/knowledge/update', api.category="knowledge",agw.preserve_base="true")
// Document相关
// Document related
document.CreateDocumentResponse CreateDocument(1:document.CreateDocumentRequest req) (api.post='/api/knowledge/document/create', api.category="knowledge",agw.preserve_base="true")
document.ListDocumentResponse ListDocument(1:document.ListDocumentRequest req) (api.post='/api/knowledge/document/list', api.category="knowledge",agw.preserve_base="true")
document.DeleteDocumentResponse DeleteDocument(1:document.DeleteDocumentRequest req) (api.post='/api/knowledge/document/delete', api.category="knowledge",agw.preserve_base="true")
@@ -28,12 +28,12 @@ service DatasetService {
document.GetTableSchemaResponse GetTableSchema(1:document.GetTableSchemaRequest req) (api.post='/api/knowledge/table_schema/get', api.category="knowledge",agw.preserve_base="true")
document.ValidateTableSchemaResponse ValidateTableSchema(1:document.ValidateTableSchemaRequest req) (api.post='/api/knowledge/table_schema/validate', api.category="knowledge",agw.preserve_base="true")
// slice相关
// Slice related
slice.DeleteSliceResponse DeleteSlice(1:slice.DeleteSliceRequest req) (api.post='/api/knowledge/slice/delete', api.category="knowledge",agw.preserve_base="true")
slice.CreateSliceResponse CreateSlice(1:slice.CreateSliceRequest req) (api.post='/api/knowledge/slice/create', api.category="knowledge",agw.preserve_base="true")
slice.UpdateSliceResponse UpdateSlice(1:slice.UpdateSliceRequest req) (api.post='/api/knowledge/slice/update', api.category="knowledge",agw.preserve_base="true")
slice.ListSliceResponse ListSlice(1:slice.ListSliceRequest req) (api.post='/api/knowledge/slice/list', api.category="knowledge",agw.preserve_base="true")
/** 预分片相关 **/
/** Pre-sharding related **/
review.CreateDocumentReviewResponse CreateDocumentReview(1:review.CreateDocumentReviewRequest req) (api.post='/api/knowledge/review/create', api.category="knowledge",agw.preserve_base="true")
review.MGetDocumentReviewResponse MGetDocumentReview(1:review.MGetDocumentReviewRequest req) (api.post='/api/knowledge/review/mget', api.category="knowledge",agw.preserve_base="true")
review.SaveDocumentReviewResponse SaveDocumentReview(1:review.SaveDocumentReviewRequest req) (api.post='/api/knowledge/review/save', api.category="knowledge",agw.preserve_base="true")

View File

@@ -15,7 +15,7 @@ struct Review {
2: string document_name
3: string document_type
4: string tos_url
5: optional common.ReviewStatus status // 状态
5: optional common.ReviewStatus status // status
6: optional string doc_tree_tos_url
7: optional string preview_tos_url
}

View File

@@ -4,7 +4,7 @@ include "common.thrift"
namespace go flow.dataengine.dataset
struct DeleteSliceRequest {
4: optional list<string> slice_ids (api.body="slice_ids") // 要删除的分片ID列表
4: optional list<string> slice_ids (api.body="slice_ids") // List of sharding IDs to delete
255: optional base.Base Base
}
@@ -15,14 +15,14 @@ struct DeleteSliceResponse {
}
struct CreateSliceRequest {
2: required i64 document_id(agw.js_conv="str", api.js_conv="true") // 新增分片插入的文档ID
5: optional string raw_text // 新增分片的内容
6: optional i64 sequence(agw.js_conv="str", api.js_conv="true") // 分片插入位置1表示文档开头最大值为最后一个分片位置+1
2: required i64 document_id(agw.js_conv="str", api.js_conv="true") // Add sharding inserted document ID
5: optional string raw_text // Add sharding content
6: optional i64 sequence(agw.js_conv="str", api.js_conv="true") // Sharding insertion position, 1 indicates the beginning of the document, and the maximum value is the last sharding position + 1
255: optional base.Base Base
}
struct CreateSliceResponse {
1: i64 slice_id (agw.js_conv="str", api.js_conv="true") // 新增分片ID
1: i64 slice_id (agw.js_conv="str", api.js_conv="true") // Add sharding ID
253: required i64 code
254: required string msg
@@ -30,15 +30,15 @@ struct CreateSliceResponse {
}
struct UpdateSliceRequest {
2: required i64 slice_id (agw.js_conv="str", api.js_conv="true") // 要更新的分片ID
7: optional string raw_text // 要更新的内容
2: required i64 slice_id (agw.js_conv="str", api.js_conv="true") // The sharding ID to update
7: optional string raw_text // Content to be updated
255: optional base.Base Base
}
enum SliceStatus {
PendingVectoring = 0 // 未向量化
FinishVectoring = 1 // 已向量化
Deactive = 9 // 禁用
PendingVectoring = 0 // unvectorized
FinishVectoring = 1 // vectorized
Deactive = 9 // disable
}
struct UpdateSliceResponse {
@@ -48,18 +48,18 @@ struct UpdateSliceResponse {
}
struct ListSliceRequest {
2: optional i64 document_id(agw.js_conv="str", api.js_conv="true") // 要list的分片所属的文档ID
3: optional i64 sequence(agw.js_conv="str", api.js_conv="true") // 分片序号表示从该序号的分片开始list
4: optional string keyword // 查询关键字
5: optional i64 dataset_id (agw.js_conv="str", api.js_conv="true") // 如果只传 dataset_id,则返回该知识库下的分片
21: i64 page_size(agw.js_conv="str", api.js_conv="true") // 每页大小
2: optional i64 document_id(agw.js_conv="str", api.js_conv="true") // The document ID of the sharding to list
3: optional i64 sequence(agw.js_conv="str", api.js_conv="true") // Sharding serial number, indicating that the list starts from the sharding of this serial number
4: optional string keyword // query keyword
5: optional i64 dataset_id (agw.js_conv="str", api.js_conv="true") // If only dataset_id, return sharding under that knowledge base
21: i64 page_size(agw.js_conv="str", api.js_conv="true") // page size
255: optional base.Base Base
}
struct ListSliceResponse {
1: list<SliceInfo> slices // 返回的分片列表
2: i64 total(agw.js_conv="str", api.js_conv="true") // 总分片数
3: bool hasmore // 是否还有更多分片
1: list<SliceInfo> slices // Returned list of shardings
2: i64 total(agw.js_conv="str", api.js_conv="true") // Total shardings
3: bool hasmore // Is there more sharding?
253: required i64 code
254: required string msg
@@ -67,12 +67,12 @@ struct ListSliceResponse {
}
struct SliceInfo {
1: i64 slice_id (agw.js_conv="str", api.js_conv="true") // 分片ID
2: string content // 分片内容
3: SliceStatus status // 分片状态
4: i64 hit_count(agw.js_conv="str", api.js_conv="true") // 命中次数
5: i64 char_count(agw.js_conv="str", api.js_conv="true") // 字符数
7: i64 sequence(agw.js_conv="str", api.js_conv="true") // 序号
8: i64 document_id(agw.js_conv="str", api.js_conv="true") // 分片所属的文档ID
9: string chunk_info // 分片相关的元信息, 透传 slice 表里的 extra->chunk_info 字段 (json)
1: i64 slice_id (agw.js_conv="str", api.js_conv="true") // Sharding ID
2: string content // Sharding content
3: SliceStatus status // Sharding state
4: i64 hit_count(agw.js_conv="str", api.js_conv="true") // hit count
5: i64 char_count(agw.js_conv="str", api.js_conv="true") // character count
7: i64 sequence(agw.js_conv="str", api.js_conv="true") // serial number
8: i64 document_id(agw.js_conv="str", api.js_conv="true") // The document ID to which sharding belongs
9: string chunk_info // Meta information related to sharding, extra- > chunk_info field in the transparent slice table (json)
}

View File

@@ -1,26 +1,26 @@
struct DocTableSheet {
1: i64 id; // sheet 的编号
2: string sheet_name; // sheet
3: i64 total_row; // 总行数
1: i64 id; // Number of sheet
2: string sheet_name; // Sheet name
3: i64 total_row; // total number of rows
}
enum ColumnType {
Unknown = 0
Text = 1 // 文本
Number = 2 // 数字
Date = 3 // 时间
Text = 1 // Text
Number = 2 // number
Date = 3 // time
Float = 4 // float
Boolean = 5 // bool
Image = 6 // 图片
Image = 6 // picture
}
// 表格的列信息
// Table column information
struct DocTableColumn {
1: i64 id(agw.js_conv="str", api.js_conv="true", api.body="id"); // 列 id
2: string column_name; // 列名
3: bool is_semantic; // 是否为语义匹配列
4: i64 sequence(agw.js_conv="str", api.js_conv="true", api.body="sequence"); // 列原本在 excel 的序号
5: optional ColumnType column_type; // 列类型
1: i64 id(agw.js_conv="str", api.js_conv="true", api.body="id"); // Column ID
2: string column_name; // column_name
3: bool is_semantic; // Is it a semantically matched column?
4: i64 sequence(agw.js_conv="str", api.js_conv="true", api.body="sequence"); // List the serial number originally in excel
5: optional ColumnType column_type; // column type
6: optional bool contains_empty_value
7: optional string desc; // 描述
7: optional string desc; // describe
}

View File

@@ -3,11 +3,11 @@ include "common.thrift"
namespace go knowledge.document
// 获取表格结构、预览数据
// Get table structure, preview data
struct GetDocumentTableInfoRequest {
2: optional string tos_uri; // 如果为第一次本地文件上传的表格,传递该值
3: optional i64 document_id(agw.js_conv="str", api.js_conv="true", api.body="document_id"); // 如果为已有 document 的表格,传递该值
4: i64 creator_id; // 创建人[http接口不需要传递]
2: optional string tos_uri; // If the table is uploaded for the first local file, pass the value
3: optional i64 document_id(agw.js_conv="str", api.js_conv="true", api.body="document_id"); // If it is a document with an existing table, pass the value
4: i64 creator_id; // Creator [http interface does not need to be passed]
255: optional base.Base Base
}
@@ -25,8 +25,8 @@ struct GetTableSchemaInfoResponse {
1: i32 code
2: string msg
3: list<common.DocTableSheet> sheet_list
4: list<common.DocTableColumn> table_meta // 选中的 sheet 的 schema, 不选择默认返回第一个 sheet
5: list<map<i64,string>> preview_data(agw.js_conv="str", agw.key="preview_data") // knowledge table 场景中会返回
4: list<common.DocTableColumn> table_meta // The schema of the selected sheet, not selected to return the first sheet by default
5: list<map<i64,string>> preview_data(agw.js_conv="str", agw.key="preview_data") // The knowledge table will return
255: optional base.BaseResp BaseResp(api.none="true")
}

View File

@@ -40,7 +40,7 @@ struct SetKvMemoryReq {
2: optional i64 user_id
3: required list<KVItem> data
4: optional i64 connector_id
5: optional table.RefInfo ref_info // 引用信息
5: optional table.RefInfo ref_info // citation information
6: optional string project_id
7: optional i64 ProjectVersion
@@ -79,7 +79,7 @@ struct DelProfileMemoryRequest {
2: i64 bot_id(agw.js_conv="str", api.js_conv="true", api.body="bot_id")
3: list<string> keywords
4: optional i64 connector_id
5: optional table.RefInfo ref_info // 引用信息
5: optional table.RefInfo ref_info // citation information
6: string project_id
255: optional base.Base Base
@@ -91,7 +91,7 @@ struct GetProfileMemoryRequest {
3: list<string> keywords
4: optional i64 connector_id
5: optional string version
6: optional table.RefInfo ref_info // 引用信息
6: optional table.RefInfo ref_info // citation information
7: optional string ext
8: optional string project_id
9: optional i64 ProjectVersion

View File

@@ -10,7 +10,7 @@ enum VariableChannel{
System = 2
Location = 3
Feishu = 4
APP = 5 // 项目变量
APP = 5 // project variable
}
struct Variable{
@@ -20,8 +20,8 @@ struct Variable{
4: VariableChannel Channel
5: string Description
6: bool Enable
7: optional list<string> EffectiveChannelList //生效渠道
8: string Schema //新老数据都会有schema除项目变量外其他默认为string
7: optional list<string> EffectiveChannelList //effective channel
8: string Schema //New and old data will have schemas, except for project variables, the default is string.
9: bool IsReadOnly
}
@@ -81,7 +81,7 @@ struct GetMemoryVariableMetaReq {
255: optional base.Base Base
}
//应该是给workflow用的rpc接口不需要鉴权VariableChannel
//It should be the rpc interface for workflow, no authentication is required, VariableChannel
struct GetMemoryVariableMetaResp {
1: map<VariableChannel, list<Variable>> VariableMap

View File

@@ -7,19 +7,19 @@ enum RefType {
}
struct RefInfo {
1: RefType ref_type // 引用类型
2: string ref_id // 引用 id
1: RefType ref_type // reference type
2: string ref_id // reference id
}
enum BotTableStatus {
Online = 1 // 已上线
Delete = 2 // 删除
Online = 1 // online
Delete = 2 // delete
}
enum FieldItemType {
Text = 1 // 文本
Number = 2 // 数字
Date = 3 // 时间
Text = 1 // Text
Number = 2 // number
Date = 3 // time
Float = 4 // float
Boolean = 5 // bool
}
@@ -29,16 +29,16 @@ struct FieldItem {
2: string desc
3: FieldItemType type
4: bool must_required
5: i64 id // 该字段只用来判断是否发布,不为 0 就是已发布的,前端对已发布的字段不能修改字段类型
6: i64 alterId // 修改字段时(alterpublish用来判断增删改0 表示新增,非 0 表示修改或删除
7: bool is_system_field // 是否是系统字段
5: i64 id // This field is only used to determine whether it is published. If it is not 0, it is published. The front end cannot modify the field type for the published field.
6: i64 alterId // When modifying a field (alter, publish), it is used to judge additions and deletions. 0 means new additions, and non-0 means modification or deletion.
7: bool is_system_field // Is it a system field?
}
enum BotTableRWMode {
LimitedReadWrite = 1 // 单用户模式
ReadOnly = 2 // 只读模式
UnlimitedReadWrite = 3 // 多用户模式
RWModeMax = 4 // Max 边界值
LimitedReadWrite = 1 // single user mode
ReadOnly = 2 // read-only mode
UnlimitedReadWrite = 3 // multi-user mode
RWModeMax = 4 // Max boundary value
}
struct OrderBy {
@@ -57,42 +57,42 @@ struct Criterion{
}
struct ListDatabaseRequest {
1: optional i64 creator_id (api.js_conv="str") // 获取创建者为某个用户的的数据库
2: optional i64 project_id (api.js_conv="str") // 获取project下的数据库
3: optional i64 space_id (api.js_conv="str") //获取空间下的可见数据库
4: optional i64 bot_id (api.js_conv="str") //对bot_id进行过滤过滤掉已经添加到bot中的database
5: optional string table_name // 表格名称,模糊搜索
6: required TableType table_type // 查草稿态database
7: optional list<OrderBy> order_by // 排序
1: optional i64 creator_id (api.js_conv="str") // Get a database created by a user
2: optional i64 project_id (api.js_conv="str") // Get the database under the project
3: optional i64 space_id (api.js_conv="str") //Get the visible database under space
4: optional i64 bot_id (api.js_conv="str") //Filter bot_id to filter out databases that have been added to the bot
5: optional string table_name // Table name, fuzzy search
6: required TableType table_type // Draft database
7: optional list<OrderBy> order_by // sort
8: optional i32 offset
9: optional i32 limit
10: optional Criterion filter_criterion //筛选条件
11: optional list<OrderBy> order_by_list //排序条件
10: optional Criterion filter_criterion //filter criteria
11: optional list<OrderBy> order_by_list //sort condition
255: optional base.Base Base
}
struct DatabaseInfo {
1: i64 id (api.js_conv="str", api.key="id") // online_database_info的主键id
2: i64 space_id (api.js_conv="str") // 空间的id
1: i64 id (api.js_conv="str", api.key="id") // online_database_info primary key id
2: i64 space_id (api.js_conv="str") // ID of space
3: i64 project_id (api.js_conv="str") // project id
4: string datamodel_table_id // datamodel侧的表id
5: string icon_url // 头像url
6: string icon_uri // 头像url
7: string table_name // 表名
8: string table_desc // 表描述
9: BotTableStatus status // 状态
10: i64 creator_id (api.js_conv="str") // 创建者id
11: i64 create_time // 创建时间
12: i64 update_time // 更新时间
13: list<FieldItem> field_list // 字段信息
14: string actual_table_name // 数据表实际名称
15: BotTableRWMode rw_mode // 读写模式
16: bool prompt_disabled // 是否支持prompt调用
17: bool is_visible // 是否可见
18: optional i64 draft_id (api.js_conv="str") // 对应草稿态的id
19: optional i64 bot_id (api.js_conv="str", api.key="bot_id") // 相关id. bot_id,老的有,新的没有
20: optional map<string,string> extra_info // 扩展信息
21: optional bool is_added_to_bot // 是否已经添加到bot中
4: string datamodel_table_id // Table ID on the datamodel side
5: string icon_url // avatar url
6: string icon_uri // avatar url
7: string table_name // table name
8: string table_desc // table description
9: BotTableStatus status // status
10: i64 creator_id (api.js_conv="str") // creator id
11: i64 create_time // create_time
12: i64 update_time // update time
13: list<FieldItem> field_list // Field information
14: string actual_table_name // Data table actual name
15: BotTableRWMode rw_mode // read and write mode
16: bool prompt_disabled // Whether to support prompt calls
17: bool is_visible // Is it visible?
18: optional i64 draft_id (api.js_conv="str") // ID corresponding to draft state
19: optional i64 bot_id (api.js_conv="str", api.key="bot_id") // Related id. bot_id, the old one is available, the new one is not.
20: optional map<string,string> extra_info // extended information
21: optional bool is_added_to_bot // Has it been added to the bot?
}
struct ListDatabaseResponse{
@@ -106,10 +106,10 @@ struct ListDatabaseResponse{
}
struct SingleDatabaseRequest{
1: i64 id (api.js_conv="str", api.key="id") // database_info的主键id
2: bool is_draft (api.key="is_draft") //传入的是否是草稿态数据,默认是false
3: bool need_sys_fields (api.key="need_sys_fields") //是否需要系统字段
4: i64 version (api.js_conv="str") // 版本号,不传默认是最新的
1: i64 id (api.js_conv="str", api.key="id") // database_info primary key id
2: bool is_draft (api.key="is_draft") //Whether the incoming data is in draft form, the default is false.
3: bool need_sys_fields (api.key="need_sys_fields") //Do you need system fields?
4: i64 version (api.js_conv="str") // The version number is not passed on, and the default is the latest.
255: optional base.Base Base
}
@@ -122,33 +122,33 @@ struct SingleDatabaseResponse{
}
struct AddDatabaseRequest{
1: i64 creator_id (api.js_conv="str") // 创建者id
2: i64 space_id (api.js_conv="str") // 空间的id
1: i64 creator_id (api.js_conv="str") // creator id
2: i64 space_id (api.js_conv="str") // ID of space
3: i64 project_id (api.js_conv="str") // project id
4: string icon_uri // 头像url
5: string table_name // 表名
6: string table_desc // 表描述
7: list<FieldItem> field_list // 字段信息
8: BotTableRWMode rw_mode // 读写模式,单用户模式/多用户模式
9: bool prompt_disabled // 是否支持prompt调用
10: optional map<string,string> extra_info // 扩展信息
4: string icon_uri // avatar url
5: string table_name // table name
6: string table_desc // table description
7: list<FieldItem> field_list // Field information
8: BotTableRWMode rw_mode // Read and write mode, single user mode/multi-user mode
9: bool prompt_disabled // Whether to support prompt calls
10: optional map<string,string> extra_info // extended information
255: optional base.Base Base
}
struct UpdateDatabaseRequest{
1: i64 id (api.js_conv="str", api.key="id") // database_info的主键id
2: string icon_uri // 头像url
3: string table_name // 表名
5: string table_desc // 表描述
6: list<FieldItem> field_list // 字段信息
7: BotTableRWMode rw_mode // 读写模式,单用户模式/多用户模式
8: bool prompt_disabled // 是否支持prompt调用
9: optional map<string,string> extra_info // 扩展信息
1: i64 id (api.js_conv="str", api.key="id") // database_info primary key id
2: string icon_uri // avatar url
3: string table_name // table name
5: string table_desc // table description
6: list<FieldItem> field_list // Field information
7: BotTableRWMode rw_mode // Read and write mode, single user mode/multi-user mode
8: bool prompt_disabled // Whether to support prompt calls
9: optional map<string,string> extra_info // extended information
255: optional base.Base Base
}
struct DeleteDatabaseRequest{
1: i64 id (api.js_conv="str", api.key="id") // database_info的主键id
1: i64 id (api.js_conv="str", api.key="id") // database_info primary key id
255: optional base.Base Base
}
@@ -159,7 +159,7 @@ struct DeleteDatabaseResponse {
}
struct BindDatabaseToBotRequest{
1: i64 database_id (api.js_conv="str") // 草稿态数据database表主键id注意是草稿态哈
1: i64 database_id (api.js_conv="str") // Draft data database table primary key id, note that it is draft state
2: i64 bot_id (api.js_conv="str") // bot_id
255: optional base.Base Base
}
@@ -172,31 +172,31 @@ struct BindDatabaseToBotResponse{
struct ListDatabaseRecordsRequest{
1: required i64 database_id (api.js_conv="str") // database_id
2: optional i64 bot_id (api.js_conv="str", api.key="bot_id") // bot id这里是查找bot关联的草稿态数据的时候填这个
3: optional i64 workflow_id (api.js_conv="str", api.key="workflow_id") // workflow_id这里是查找wk_flow关联的草稿态表的时候填这个
4: optional bool not_filter_by_user_id // true不根据user_id进行过滤Records
5: optional bool not_filter_by_connector_id // 为true不根据ConnectorID进行过滤Records
6: TableType table_type // 要查的是草稿态还是线上态
7: i64 limit // 别超过100建议50
8: i64 offset // 偏移量
9: optional i64 project_id (api.js_conv="str") // 同个project下数据不隔离
10: optional ComplexCondition filter_criterion //筛选条件
11: optional list<OrderBy> order_by_list //排序条件
2: optional i64 bot_id (api.js_conv="str", api.key="bot_id") // bot id, here is to fill in this when looking for the draft state data associated with the bot
3: optional i64 workflow_id (api.js_conv="str", api.key="workflow_id") // workflow_id,, here is to fill in this when looking up wk_flow associated draft status sheet
4: optional bool not_filter_by_user_id // Is true does not filter by user_id Records
5: optional bool not_filter_by_connector_id // Records not filtered by ConnectorID
6: TableType table_type // Do you want to check the draft state or the online state?
7: i64 limit // Do not exceed 100, 50 is recommended.
8: i64 offset // Offset
9: optional i64 project_id (api.js_conv="str") // Data is not isolated under the same project
10: optional ComplexCondition filter_criterion //filter criteria
11: optional list<OrderBy> order_by_list //sort condition
255: optional base.Base Base
}
struct ListDatabaseRecordsRequestRPC{
1: required i64 database_id (api.js_conv="str") // database_id
2: TableType table_type // 要查的是草稿态还是线上态
3: i64 limit // 别超过100建议50
4: i64 offset // 偏移量
5: string user_id // 用户id
2: TableType table_type // Do you want to check the draft state or the online state?
3: i64 limit // Do not exceed 100, 50 is recommended.
4: i64 offset // Offset
5: string user_id // user id
255: optional base.Base Base
}
struct ListDatabaseRecordsResponseRPC{
1: required list<map<string,string>> data
2: required bool HasMore=false
3: required i32 TotalNum
4: list<FieldItem> field_list // 字段信息
4: list<FieldItem> field_list // Field information
255: required base.BaseResp BaseResp
}
@@ -204,7 +204,7 @@ struct ListDatabaseRecordsResponse{
1: required list<map<string,string>> data
2: required bool HasMore=false
3: required i32 TotalNum
4: optional list<FieldItem> field_list // 字段信息
4: optional list<FieldItem> field_list // Field information
253: required i64 code
254: required string msg
@@ -213,11 +213,11 @@ struct ListDatabaseRecordsResponse{
struct UpdateDatabaseRecordsRequest{
1: required i64 database_id (api.js_conv="str") // database_id
2: optional list<map<string,string>> record_data_add // 新增的
3: optional list<map<string,string>> record_data_alter // 修改的
4: optional list<map<string,string>> record_data_delete // 删除的
5: optional TableType table_type // 要更新的的是草稿态还是线上态
6: optional string ori_connector_id // 更新时需穿入connector id
2: optional list<map<string,string>> record_data_add // new
3: optional list<map<string,string>> record_data_alter // modified
4: optional list<map<string,string>> record_data_delete // deleted
5: optional TableType table_type // Is the draft state or online state to be updated?
6: optional string ori_connector_id // The connector id needs to be inserted when updating.
255: optional base.Base Base
}
@@ -229,12 +229,12 @@ struct UpdateDatabaseRecordsResponse{
255: required base.BaseResp BaseResp
}
struct GetOnlineDatabaseIdRequest{
1: required i64 id (api.js_conv="str") // draft database_id
1: required i64 id (api.js_conv="str") // The draft database_id
255: optional base.Base Base
}
struct GetOnlineDatabaseIdResponse{
1: optional i64 id (api.js_conv="str") // 根据草稿的id查询线上的id
1: optional i64 id (api.js_conv="str") // Check the online id according to the id of the draft.
253: required i64 code
254: required string msg
@@ -243,23 +243,23 @@ struct GetOnlineDatabaseIdResponse{
struct BotTable {
1: i64 id (api.js_conv="str", api.key="id") // 自增idtable id
2: i64 bot_id (api.js_conv="str", api.key="bot_id") // 相关id. bot_id
1: i64 id (api.js_conv="str", api.key="id") // Autoincrement id, table id
2: i64 bot_id (api.js_conv="str", api.key="bot_id") // Related id bot_id
3: string table_id // table_id
4: string table_name // 表名
5: string table_desc // 表描述
6: BotTableStatus status // 状态
7: i64 creator_id // 创建着id
8: i64 create_time // 创建时间
9: i64 update_time // 更新时间
10: list<FieldItem> field_list // 字段信息
11: string actual_table_name // 数据表实际名称
12: BotTableRWMode rw_mode // 读写模式
13: optional map<string,string> extra_info // 扩展信息
4: string table_name // table name
5: string table_desc // table description
6: BotTableStatus status // status
7: i64 creator_id // Creating the ID.
8: i64 create_time // create_time
9: i64 update_time // update time
10: list<FieldItem> field_list // Field information
11: string actual_table_name // Data table actual name
12: BotTableRWMode rw_mode // read and write mode
13: optional map<string,string> extra_info // extended information
}
struct InsertBotTableRequest {
1: BotTable bot_table // 保存表信息
1: BotTable bot_table // Save table information
255: optional base.Base Base
}
@@ -271,7 +271,7 @@ struct InsertBotTableResponse {
}
struct AlterBotTableRequest {
1: BotTable bot_table // 修改表信息
1: BotTable bot_table // Modify table information
255: optional base.Base Base
}
@@ -314,8 +314,8 @@ struct GetBotTableResponse {
}
struct CopyDatabaseRequest {
1: required string IdempotentId //ID生成器生成
2: required list<i64> TableIds //原来的tableId
1: required string IdempotentId //ID generator generation
2: required list<i64> TableIds //Original tableId
3: required i64 ToSpaceId
4: required i64 ToUserId
5: required i64 ToBotId
@@ -331,8 +331,8 @@ struct CopyDatabaseResponse {
}
struct CopyDatabaseRollbackRequest {
1: required string IdempotentId // ID生成器生成
2: required map<i64, i64> TableIdsMapping // CopyDatabaseResponse返回的参数
1: required string IdempotentId // ID generator generation
2: required map<i64, i64> TableIdsMapping // Parameters returned CopyDatabaseResponse
255: optional base.Base Base
}
@@ -344,12 +344,12 @@ struct CopyDatabaseRollbackResponce {
}
struct GetNL2SQLRequest {
1: required string text // 数据库请求的自然语言描述
1: required string text // Natural language description of database requests
2: required i64 bot_id // bot id
3: optional i64 connector_id // 业务线id
4: optional string connector_uid // 业务线用户id
5: required TableType table_type // table类型,分 draft online 两种
6: optional i64 database_id (api.js_conv="str") // 数据库id
3: optional i64 connector_id // line of business id
4: optional string connector_uid // line of business user id
5: required TableType table_type // Table types, draft and online
6: optional i64 database_id (api.js_conv="str") // Database ID
255: optional base.Base Base
}
@@ -364,8 +364,8 @@ struct GetNL2SQLResponse {
struct GetModeConfigRequest {
1: required i64 bot_id // bot id
2: optional i64 connector_id // 业务线id
3: optional string connector_uid // 业务线用户id
2: optional i64 connector_id // line of business id
3: optional string connector_uid // line of business user id
255: optional base.Base Base
}
@@ -388,11 +388,11 @@ struct ResetBotTableRequest {
2: optional i64 bot_id (api.js_conv="str", api.key="bot_id")
3: optional i64 table_id (api.js_conv="str", api.key="table_id")
4: required TableType table_type
5: optional i64 connector_id // 业务线id
6: optional string connector_uid // 业务线用户id
7: optional i64 workflow_id (api.js_conv="str") // 工作流id
8: optional i64 database_info_id (api.js_conv="str") // 用户id
9: optional i64 project_id (api.js_conv="str") // 项目id
5: optional i64 connector_id // line of business id
6: optional string connector_uid // line of business user id
7: optional i64 workflow_id (api.js_conv="str") // Workflow ID
8: optional i64 database_info_id (api.js_conv="str") // user id
9: optional i64 project_id (api.js_conv="str") // Project ID
255: optional base.Base Base
}
@@ -407,10 +407,10 @@ struct ResetBotTableResponse {
/******** Bytedoc bot_table_info start ********/
struct BatchInsertBotTableInfoRequest {
1: string db_name // 数据库名称
2: string collection_name // 集合名
3: list<map<string,string>> data // 保存数据
4: i64 user_id // 用户id
1: string db_name // database name
2: string collection_name // collection name
3: list<map<string,string>> data // save data
4: i64 user_id // user id
5: i64 bot_id // bot id
255: optional base.Base Base
@@ -421,10 +421,10 @@ struct BatchInsertBotTableInfoResponse {
}
struct UpdateBotTableInfoRequest {
1: string db_name // 数据库名称
2: string collection_name // 集合名
3: list<map<string,string>> data_list // 更新数据
4: i64 user_id // 用户id
1: string db_name // database name
2: string collection_name // collection name
3: list<map<string,string>> data_list // update data
4: i64 user_id // user id
5: i64 bot_id // bot id
255: optional base.Base Base
@@ -435,10 +435,10 @@ struct UpdateBotTableInfoResponse {
}
struct DeleteBotTableInfoRequest {
1: string db_name // 数据库名称
2: string collection_name // 集合名
3: list<string> ids // 删除id 列表
4: i64 user_id // 用户id
1: string db_name // database name
2: string collection_name // collection name
3: list<string> ids // Delete id list
4: i64 user_id // user id
5: i64 bot_id // bot id
255: optional base.Base Base
@@ -449,15 +449,15 @@ struct DeleteBotTableInfoResponse {
}
struct SearchBotTableInfoRequest {
1: string key_word // 搜素词,目前忽略
1: string key_word // Search term, currently ignored
2: i64 limit
3: i64 offset
4: string connector_uid // 用户id
4: string connector_uid // user id
5: i64 connector_id
6: i64 bot_id(api.js_conv="str", api.key="bot_id") // bot id
7: string table_name // 目前忽略
7: string table_name // Currently ignored
8: i64 table_id(api.js_conv="str", api.key="table_id")
9: optional RefInfo ref_info // 引用信息
9: optional RefInfo ref_info // citation information
255: optional base.Base Base
}
@@ -471,22 +471,22 @@ struct SearchBotTableInfoResponse {
}
enum TableType {
DraftTable = 1 // 草稿
OnlineTable = 2 // 线上
DraftTable = 1 // draft
OnlineTable = 2 // online
}
struct ExecuteSqlRequest {
1: string sql // RunCommand 能执行的sql
1: string sql // SQL that RunCommand can execute
2: i64 bot_id // bot id
3: i64 connector_id // 业务线id
4: string connector_uid // 业务线用户id
5: TableType table_type // table类型
6: string wftest_id // workflow test run 标识
7: optional RefInfo ref_info // 引用信息
3: i64 connector_id // line of business id
4: string connector_uid // line of business user id
5: TableType table_type // Table type
6: string wftest_id // Workflow test run identification
7: optional RefInfo ref_info // citation information
8: optional list<SqlParamVal> SqlParams (api.key="sql_params") // SQL params
9: i64 database_info_id // database info id
9: i64 database_info_id // Database info id
10: i64 workflow_id // workflow id
11: i64 project_id // 项目id
11: i64 project_id // Project ID
255: optional base.Base Base
}
@@ -505,23 +505,23 @@ struct ExecuteSqlResponse {
struct BotTablePublishReq {
1: required i64 bot_id
2: optional i64 connector_id // 业务线id
3: optional string connector_uid // 业务线用户id
2: optional i64 connector_id // line of business id
3: optional string connector_uid // line of business user id
255: optional base.Base Base
}
struct BotTablePublishResp {
1: i64 status // 执行状态: 0-执行成功 1-执行全部失败 2-执行部分失败
2: string msg // 错误信息
1: i64 status // Execution status: 0-successful execution 1-failed execution all 2-failed execution part
2: string msg // error message
255: optional base.BaseResp BaseResp
}
struct NL2SQLRequest {
1: required string text // 数据库请求的自然语言描述
1: required string text // Natural language description of database requests
2: required i64 bot_id // bot id
3: optional i64 connector_id // 业务线id
4: optional string connector_uid // 业务线用户id
5: required TableType table_type // table类型,分 draft online 两种
3: optional i64 connector_id // line of business id
4: optional string connector_uid // line of business user id
5: required TableType table_type // Table types, draft and online
255: optional base.Base Base
}
@@ -534,13 +534,13 @@ struct NL2SQLResponse {
}
struct QueryTableByNLRequest {
1: required string text // 数据库请求的自然语言描述
1: required string text // Natural language description of database requests
2: required i64 bot_id // bot id
3: required i64 connector_id // 业务线id
4: required string connector_uid // 业务线用户id
5: required TableType table_type // table类型,分 draft online 两种
6: optional string x_aiplugin_tako_bot_history // chat history 透传到 nl2query 服务,由 nl2query 进行解析
7: optional string x_aiplugin_bot_system_message // bot_system_message 透传到 nl2query 服务,由 nl2query 进行解析
3: required i64 connector_id // line of business id
4: required string connector_uid // line of business user id
5: required TableType table_type // Table types, draft and online
6: optional string x_aiplugin_tako_bot_history // The chat history is passed to the nl2query service, which is parsed by nl2query
7: optional string x_aiplugin_bot_system_message // bot_system_message passed to the nl2query service, which is parsed by nl2query
255: optional base.Base Base
}
@@ -552,8 +552,8 @@ struct QueryTableByNLResponse {
}
enum SceneType {
BotPersona = 1 // bot 个性描述
ModelDesc = 2 // 开发者给的模型文本描述
BotPersona = 1 // bot personality description
ModelDesc = 2 // Text description of the model given by the developer
}
struct RecommendDataModelRequest {
@@ -599,9 +599,9 @@ struct MigrateDatabaseResponse{
}
struct MigrateOldDataRequest{
1: TableType bot_type // 迁移哪个表
2: i64 bot_id (api.js_conv="str") // 迁移哪个bot
3: list<i64> table_ids (api.js_conv="str") // 失败重试
1: TableType bot_type // Which table to migrate
2: i64 bot_id (api.js_conv="str") // Which bot to migrate?
3: list<i64> table_ids (api.js_conv="str") // Failed retry
255: optional base.Base Base
}
@@ -612,8 +612,8 @@ struct MigrateOldDataResponse{
}
struct MGetDisplayResourceInfoRequest {
1 : list<i64> ResIDs, // 最大传一页的数量,实现方可以限制最大100
2 : i64 CurrentUserID, // 当前的用户,实现方用于判断权限
1 : list<i64> ResIDs, // The maximum number of one page can be transferred, and the implementer can limit the maximum to 100.
2 : i64 CurrentUserID, // The current user, the implementation is used to determine the authority
255: base.Base Base ,
}
@@ -623,41 +623,41 @@ struct MGetDisplayResourceInfoResponse {
}
enum ActionKey{
Copy = 1, //复制
Delete = 2, //删除
EnableSwitch = 3, //启用/禁用
Edit = 4, //编辑
CrossSpaceCopy = 10, // 跨空间复制
Copy = 1, //copy
Delete = 2, //delete
EnableSwitch = 3, //enable/disable
Edit = 4, //edit
CrossSpaceCopy = 10, // Cross-space copy
}
enum PublishStatus{
UnPublished = 1, //未发布
Published = 2, //已发布
UnPublished = 1, //unpublished
Published = 2, //Published
}
// Library资源操作
// Library Resource Operations
struct ResourceAction{
// 一个操作对应一个唯一的keykey由资源侧约束
// An operation corresponds to a unique key, and the key is constrained by the resource side
1 : required ActionKey Key (go.tag = "json:\"key\"", api.key = "key"),
//ture=可以操作该Actionfalse=置灰
//ture = can operate this Action, false = grey out
2 : required bool Enable (go.tag = "json:\"enable\"", api.key = "enable"),
}
// 展示用,实现方提供展示信息
// For display, the implementer provides display information
struct DisplayResourceInfo{
1 : optional i64 ResID, // 资源id
5 : optional string Desc,// 资源描述
6 : optional string Icon,// 资源Icon完整url
12 : optional i32 BizResStatus, // 资源状态,各类型资源自身定义
13 : optional bool CollaborationEnable, // 是否开启多人编辑
16 : optional map<string, string> BizExtend, // 业务携带的扩展信息以res_type区分每个res_type定义的schema和含义不一样使用前需要判断res_type
17 : optional list<ResourceAction> Actions, // 不同类型的不同操作按钮,由资源实现方和前端约定。返回则展示,要隐藏某个按钮,则不要返回;
18 : optional bool DetailDisable, // 是否禁止进详情页
19 : optional string Name // 资源名称
20 : optional PublishStatus PublishStatus, // 资源发布状态1-未发布2-已发布
21 : optional i64 EditTime, // 最近编辑时间, unix秒级时间戳
1 : optional i64 ResID, // Resource ID
5 : optional string Desc,// resource description
6 : optional string Icon,// Resource Icon, full url
12 : optional i32 BizResStatus, // Resource status, each type of resource defines itself
13 : optional bool CollaborationEnable, // Whether to enable multi-person editing
16 : optional map<string, string> BizExtend, // Business carry extended information to res_type distinguish, each res_type defined schema and meaning is not the same, need to judge before use res_type
17 : optional list<ResourceAction> Actions, // Different types of different operation buttons are agreed upon by the resource implementer and the front end. Return is displayed, if you want to hide a button, do not return;
18 : optional bool DetailDisable, // Whether to ban entering the details page
19 : optional string Name // resource name
20 : optional PublishStatus PublishStatus, // Resource release status, 1 - unpublished, 2 - published
21 : optional i64 EditTime, // Last edited, unix timestamp
}
enum OperateType {
Insert = 1
@@ -671,7 +671,7 @@ struct SelectFieldList{
}
enum Operation {
EQUAL = 1, // "="
NOT_EQUAL = 2, // "<>" "!="
NOT_EQUAL = 2, // "< >" or "! ="
GREATER_THAN = 3, // ">"
LESS_THAN = 4, // "<"
GREATER_EQUAL = 5, // ">="
@@ -680,20 +680,20 @@ enum Operation {
NOT_IN = 8, // "NOT IN"
IS_NULL = 9, // "IS NULL"
IS_NOT_NULL = 10 // "IS NOT NULL"
LIKE = 11, // "LIKE" 模糊匹配字符串
NOT_LIKE = 12, // "NOT LIKE" 反向模糊匹配
LIKE = 11, // "LIKE" fuzzy match string
NOT_LIKE = 12, // "NOT LIKE" inverse fuzzy match
}
struct Condition {
1: required string left; // 左值填字段名
1: required string left; // Lvalue field name
2: required Operation operation;
3: required string right; // 右值
3: required string right; // rvalue
}
struct ComplexCondition {
1: optional list<Condition> conditions;
2: optional ComplexCondition nestedConditions; // 为了拓展,先不用
3: required string logic; // "AND" "OR"
2: optional ComplexCondition nestedConditions; // In order to expand, we don't need to
3: required string logic; // "AND" or "OR"
}
struct UpsertValues {
@@ -705,30 +705,30 @@ struct Row {
1: list<UpsertValues> values
}
struct CRUDDatabaseRequest {
1: required i64 database_info_id // databaseid
2: i64 workflow_id // workflow idwk flow纬度数据隔离
3: i64 project_id // 项目idproject下不隔离
1: required i64 database_info_id // Database id
2: i64 workflow_id // Workflow id, wk flow latitude data isolation
3: i64 project_id // Project id, not isolated under the same project
4: i64 bot_id // bot id
5: i64 connector_id // 业务线id
6: string connector_uid // 业务线用户id
7: required TableType table_type // table类型
8: string wftest_id // workflow test run 标识
9: optional RefInfo ref_info // 引用信息
5: i64 connector_id // line of business id
6: string connector_uid // line of business user id
7: required TableType table_type // Table type
8: string wftest_id // Workflow test run identification
9: optional RefInfo ref_info // citation information
10: optional list<SqlParamVal> sql_params (api.key="sql_params") // SQL params
11: required OperateType operate_type // 操作类型
12: optional SelectFieldList field_list // select时要查询的字段列表
13: optional list<OrderBy> order_by_list // order by 字段列表
11: required OperateType operate_type // operation type
12: optional SelectFieldList field_list // List of fields to query when selected
13: optional list<OrderBy> order_by_list // Order by field list
14: optional i64 limit // limit
15: optional i64 offset // offset
16: optional ComplexCondition condition // 查询条件
17: optional list<Row> rows // 需要upsert的数据
16: optional ComplexCondition condition // query condition
17: optional list<Row> rows // Data to upsert
}
struct SourceInfo {
// 本地文件上传的 tos 地址
// TOS address for local file upload
1: optional string tos_uri (api.key="tos_uri");
// imagex_uri, tos_uri 二选一, imagex_uri 优先,需要通过 imagex 的方法获取数据和签发 url
// imagex_uri, and tos_uri choose one, imagex_uri priority, need to get data and sign url through imagex method
2: optional string imagex_uri
}
@@ -736,68 +736,68 @@ struct SourceInfo {
struct ValidateTableSchemaRequest {
1: i64 space_id (api.js_conv="str", api.key="space_id")
2: i64 database_id (api.js_conv="str", api.key="database_id")
3: SourceInfo source_info (api.key="source_file", api.body="source_file") // source file 的信息
3: SourceInfo source_info (api.key="source_file", api.body="source_file") // Information from the source file
4: TableSheet table_sheet (api.key="table_sheet")
5: TableType table_type (api.key="table_type")
255: optional base.Base Base
}
struct TableSheet {
1: i64 sheet_id (api.js_conv="str", api.key="sheet_id") , // 用户选择的 sheet id
2: i64 header_line_idx (api.js_conv="str", api.key="header_line_idx"), // 用户选择的表头行数,从 0 开始编号
3: i64 start_line_idx (api.js_conv="str", api.key="start_line_idx") , // 用户选择的起始行号,从 0 开始编号
1: i64 sheet_id (api.js_conv="str", api.key="sheet_id") , // User selected sheet id
2: i64 header_line_idx (api.js_conv="str", api.key="header_line_idx"), // The number of header rows selected by the user, numbered from 0
3: i64 start_line_idx (api.js_conv="str", api.key="start_line_idx") , // User-selected starting line number, numbered from 0
}
struct ValidateTableSchemaResponse {
1: optional map<string,string> SchemaValidResult (api.key="schema_valid_result");
// 如果失败会返回错误码
// If it fails, an error code will be returned.
253: required i64 code
254: required string msg
255: optional base.BaseResp BaseResp(api.none="true")
}
struct GetTableSchemaRequest {
1: optional TableSheet table_sheet; // 表格解析信息, 默认初始值0,0,1
2: optional TableDataType table_data_type; // 不传默认返回所有数据
3: optional i64 database_id(api.js_conv="str", api.key="database_id"); // 兼容重构前的版本:如果需要拉取的是当前 document 的 schema 时传递该值
4: optional SourceInfo source_file; // source file 的信息,新增 segment / 之前逻辑迁移到这里
1: optional TableSheet table_sheet; // Table parsing information, default initial value 0, 0, 1
2: optional TableDataType table_data_type; // All data is returned by default without passing it on.
3: optional i64 database_id(api.js_conv="str", api.key="database_id"); // Compatible with pre-refactoring versions: pass this value if you need to pull the schema of the current document
4: optional SourceInfo source_file; // Source file information, add segment/before logic migrate here
255: optional base.Base Base
}
enum TableDataType {
AllData = 0 // schema sheets preview data
OnlySchema = 1 // 只需要 schema 结构 & Sheets
OnlyPreview = 2 // 只需要 preview data
AllData = 0 // Schema sheets and preview data
OnlySchema = 1 // Only need schema structure & Sheets
OnlyPreview = 2 // Just preview the data
}
struct DocTableSheet {
1: i64 id; // sheet 的编号
2: string sheet_name; // sheet
3: i64 total_row; // 总行数
1: i64 id; // Number of sheet
2: string sheet_name; // Sheet name
3: i64 total_row; // total number of rows
}
struct TableColumn {
1: i64 id(api.js_conv="str", api.key="id") // 列 id
2: string column_name // 列名
3: i64 sequence(api.js_conv="str", api.key="sequence")// 列原本在 excel 的序号
4: optional ColumnType column_type // 列类型
1: i64 id(api.js_conv="str", api.key="id") // Column ID
2: string column_name // column_name
3: i64 sequence(api.js_conv="str", api.key="sequence")// List the serial number originally in excel
4: optional ColumnType column_type // column type
5: optional bool contains_empty_value
6: optional string desc // 描述
6: optional string desc // describe
}
enum ColumnType {
Unknown = 0
Text = 1 // 文本
Number = 2 // 数字
Date = 3 // 时间
Text = 1 // Text
Number = 2 // number
Date = 3 // time
Float = 4 // float
Boolean = 5 // bool
Image = 6 // 图片
Image = 6 // picture
}
struct GetDatabaseFileProgressRequest {
1: i64 database_id (api.js_conv="str")
2: required TableType table_type // table类型
2: required TableType table_type // Table type
255: optional base.Base Base
}
struct GetDatabaseFileProgressResponse {
@@ -810,15 +810,15 @@ struct GetDatabaseFileProgressResponse {
struct DatabaseFileProgressData {
1: string file_name
2: i32 progress
3: optional string status_descript //描述信息,如果有代表文件处理失败
3: optional string status_descript //Describe the information if there is a representative file processing failure
}
struct SubmitDatabaseInsertRequest {
1: i64 database_id (api.js_conv="str")
2: string file_uri
3: TableType table_type // table类型要往草稿表插入还是线上表插入
3: TableType table_type // Table type, do you want to insert into the draft table or the online table?
4: optional TableSheet table_sheet
5: optional i64 connector_id (api.js_conv="str") // 要写入的渠道id
5: optional i64 connector_id (api.js_conv="str") // Channel ID to write to
255: optional base.Base Base
}
@@ -865,7 +865,7 @@ struct ConnectorInfo{
typedef GetDatabaseFileProgressRequest GetDatabaseTemplateRequest
struct GetDatabaseTemplateResponse {
1: string TosUrl // 下载地址
1: string TosUrl // Download address
253: required i64 code
254: required string msg
@@ -875,7 +875,7 @@ struct GetDatabaseTemplateResponse {
struct UpdateDatabaseBotSwitchRequest{
1: required i64 bot_id (api.js_conv="str")
2: required i64 database_id (api.js_conv="str")
3: required bool prompt_disable // 是否禁用prompt
3: required bool prompt_disable // Whether to disable prompt
255: optional base.Base Base
}

View File

@@ -12,7 +12,7 @@ struct DraftBotCreateRequest {
4: string icon_uri
5: VisibilityType visibility
6: optional MonetizationConf monetization_conf
7: optional string create_from, // 创建来源 navi:导航栏 space:空间
7: optional string create_from, // Create source navi: navbar space: space
9: optional bot_common.BusinessType business_type
}
@@ -21,14 +21,14 @@ struct MonetizationConf {
}
enum VisibilityType {
Invisible = 0 // 不可见
Visible = 1 // 可见
Invisible = 0 // invisible
Visible = 1 // visible
}
struct DraftBotCreateData {
1: i64 bot_id (agw.js_conv="str", api.js_conv="true")
2: bool check_not_pass // true机审校验不通过
3: optional string check_not_pass_msg // 机审校验不通过文案
2: bool check_not_pass // True: The machine audit verification failed
3: optional string check_not_pass_msg // The machine audit verification failed the copy.
}
struct DraftBotCreateResponse {
@@ -66,11 +66,11 @@ struct UserLabel {
struct Creator {
1: i64 id (agw.js_conv="str", api.js_conv="true")
2: string name // 昵称
2: string name // nickname
3: string avatar_url
4: bool self // 是否是自己创建的
5: string user_unique_name // 用户名
6: UserLabel user_label // 用户标签
4: bool self // Did you create it yourself?
5: string user_unique_name // user name
6: UserLabel user_label // user tag
}
struct DuplicateDraftBotData {
@@ -148,25 +148,25 @@ struct PublishDraftBotResponse {
}
struct PublishDraftBotData {
1: map<string,list<ConnectorBindResult>> connector_bind_result // key代表connector_name 枚举 飞书="feishu" -- 废弃
2: map<string,ConnectorBindResult> publish_result // key代表connector_idvalue是发布结果
3: bool check_not_pass // true机审校验不通过
4: optional SubmitBotMarketResult submit_bot_market_result // 上架bot market结果
5: optional bool hit_manual_check // 是否命中人审
6: optional list<string> not_pass_reason // 机审校验不通过原因的starlingKey列表
7: optional bool publish_monetization_result // 发布bot计费结果
1: map<string,list<ConnectorBindResult>> connector_bind_result // Key represents connector_name enumeration Feishu = "feishu" -- obsolete
2: map<string,ConnectorBindResult> publish_result // The key represents connector_id, and the value is the published result
3: bool check_not_pass // True: The machine audit verification failed
4: optional SubmitBotMarketResult submit_bot_market_result // Added bot marketing results
5: optional bool hit_manual_check // In human moderation
6: optional list<string> not_pass_reason // starlingKey list of reasons why the machine audit failed
7: optional bool publish_monetization_result // Publish bot billing results
}
struct ConnectorBindResult {
1: Connector connector
2: i64 code // 发布调用下游返回的状态码,前端不消费
3: string msg // 发布状态的附加文案,前端按照markdown格式解析
4: optional PublishResultStatus publish_result_status // 发布结果状态
2: i64 code // The status code returned downstream of the publish call is not consumed by the front end.
3: string msg // Additional copy of the release status, the front end is parsed in markdown format
4: optional PublishResultStatus publish_result_status // post result status
}
struct Connector {
1: string name // connector_name 枚举 飞书="feishu"
1: string name // connector_name enumeration Feishu = "feishu"
2: string app_id
3: string app_secret
4: string share_link
@@ -174,14 +174,14 @@ struct Connector {
}
enum PublishResultStatus {
Success = 1 // 成功
Failed = 2 // 失败
InReview = 3 // 审批中
Success = 1 // success
Failed = 2 // fail
InReview = 3 // in approval
}
struct SubmitBotMarketResult {
1: optional i64 result_code // 上架状态0-成功
2: optional string msg // 上架结果的文案
1: optional i64 result_code // Shelf status, 0-success
2: optional string msg // msg
}
@@ -204,15 +204,15 @@ struct AgentInfo {
8: optional string reference_id
9: optional string first_version
10: optional string current_version
11: optional ReferenceInfoStatus reference_info_status // 1:有可用更新 2:被删除
11: optional ReferenceInfoStatus reference_info_status // 1: Available update 2: Removed
12: optional string description
13: optional ReferenceUpdateType update_type
}
enum ReferenceInfoStatus {
HasUpdates = 1 // 1:有可用更新
IsDelete = 2 // 2:被删除
HasUpdates = 1 // 1: Updates are available
IsDelete = 2 // 2: Deleted
}
enum ReferenceUpdateType {
@@ -232,17 +232,17 @@ struct Intent {
3: optional string next_agent_id
}
// agent 工作区间各个模块的信息
// Information about each module in the agent workspace
struct AgentWorkInfo {
1: optional string prompt // agent prompt 前端信息server不需要感知
2: optional string other_info // 模型配置
3: optional string tools // plugin 信息
4: optional string dataset // dataset 信息
5: optional string workflow // workflow 信息
6: optional string system_info_all // 同bot的 system_info_all
7: optional JumpConfig jump_config // 回溯配置
8: optional string suggest_reply , // 推荐回复配置
9: optional string hook_info // hook配置
1: optional string prompt // The agent prompts the front-end information, the server does not need to perceive
2: optional string other_info // model configuration
3: optional string tools // Plugin information
4: optional string dataset // Dataset information
5: optional string workflow // Workflow information
6: optional string system_info_all // system_info_all with bot
7: optional JumpConfig jump_config // backtrack configuration
8: optional string suggest_reply , // Referral Configuration
9: optional string hook_info // Hook configuration
}
@@ -265,16 +265,16 @@ enum RecognitionMode {
}
enum IndependentTiming {
Pre = 1 // 判断用户输入(前置)
Post = 2 // 判断节点输出(后置)
PreAndPost = 3 // 前置模式和后置模式支持同时选择
Pre = 1 // Determine user input (front)
Post = 2 // Determine node output (postfix)
PreAndPost = 3 // Front mode and rear mode support simultaneous selection
}
enum IndependentRecognitionModelType {
SLM = 0 // 小模型
LLM = 1 // 大模型
SLM = 0 // Small model
LLM = 1 // Large model
}
struct IndependentModeConfig {
1: IndependentTiming judge_timing // 判断时机
1: IndependentTiming judge_timing // Judge timing
2: i32 history_round
3: IndependentRecognitionModelType model_type
4: optional string model_id
@@ -294,18 +294,18 @@ struct PublishDraftBotRequest {
1: required i64 space_id (agw.js_conv="str", api.js_conv="true")
2: required i64 bot_id (agw.js_conv="str", api.js_conv="true")
3: WorkInfo work_info
4: map<string,list<Connector>> connector_list // key代表connector_name 枚举 飞书="feishu" -- 废弃
5: map<string,map<string,string>> connectors // key代表connector_idvalue是发布的参数
6: optional BotMode botMode // 默认0
4: map<string,list<Connector>> connector_list // Key represents connector_name enumeration Feishu = "feishu" -- obsolete
5: map<string,map<string,string>> connectors // The key represents connector_id, and the value is the published parameter
6: optional BotMode botMode // Default 0
7: optional list<AgentInfo> agents
8: optional string canvas_data
9: optional list<BotTagInfo> bot_tag_info
10: optional SubmitBotMarketConfig submit_bot_market_config // 发布到market的配置
10: optional SubmitBotMarketConfig submit_bot_market_config // Configuration published to the market
11: optional string publish_id
12: optional string commit_version // 指定发布某个CommitVersion
13: optional PublishType publish_type // 发布类型,线上发布/预发布
14: optional string pre_publish_ext // 预发布其他信息
15: optional string history_info // 替换原workinfo中的 history_info
12: optional string commit_version // Specify the release of a CommitVersion
13: optional PublishType publish_type // Release type, online release/pre-release
14: optional string pre_publish_ext // Pre-release other information
15: optional string history_info // Replace the history_info in the original workinfo
}
enum PublishType {
@@ -314,9 +314,9 @@ enum PublishType {
}
struct SubmitBotMarketConfig {
1: optional bool need_submit // 是否发布到market
2: optional bool open_source // 是否开源
3: optional string category_id // 分类
1: optional bool need_submit // Whether to publish to the market
2: optional bool open_source // Is it open source?
3: optional string category_id // classification
}
enum BotMode {
@@ -325,7 +325,7 @@ enum BotMode {
WorkflowMode = 2
}
// 工作区间各个模块的信息
// Information for each module in the workspace
struct WorkInfo {
1: optional string message_info
2: optional string prompt
@@ -343,15 +343,15 @@ struct WorkInfo {
14: optional string suggest_reply
15: optional string tts
16: optional string background_image_info_list
17: optional shortcut_command.ShortcutStruct shortcuts // 快捷指令
18: optional string hook_info // hook配置
19: optional UserQueryCollectConf user_query_collect_conf // 用户query收集配置
20: optional LayoutInfo layout_info //workflow模式编排数据
17: optional shortcut_command.ShortcutStruct shortcuts // Quick Instruction
18: optional string hook_info // Hook configuration
19: optional UserQueryCollectConf user_query_collect_conf // User query collection configuration
20: optional LayoutInfo layout_info //Workflow pattern orchestration data
}
struct UserQueryCollectConf {
1: bool IsCollected (api.body="is_collected") , // 是否开启收集开关
2: string PrivatePolicy (api.body="private_policy") , // 隐私协议链接
1: bool IsCollected (api.body="is_collected") , // Whether to turn on the collection switch
2: string PrivatePolicy (api.body="private_policy") , // Privacy Policy Link
}
struct LayoutInfo {
@@ -360,10 +360,10 @@ struct LayoutInfo {
}
enum HistoryType {
SUBMIT = 1 // 废弃
FLAG = 2 // 发布
COMMIT = 4 // 提交
COMMITANDFLAG = 5 // 提交和发布
SUBMIT = 1 // abandoned
FLAG = 2 // publish
COMMIT = 4 // submit
COMMITANDFLAG = 5 // Submit and publish
}
@@ -387,16 +387,16 @@ struct ListDraftBotHistoryData {
2: i32 total
}
// 如果保存历史信息
// If historical information is preserved
struct HistoryInfo {
1: string version ,
2: HistoryType history_type ,
3: string info , // 对历史记录补充的其他信息
3: string info , // Additional information added to the historical record
4: string create_time ,
5: list<ConnectorInfo> connector_infos,
6: Creator creator ,
7: optional string publish_id ,
8: optional string commit_remark , // 提交时填写的说明
8: optional string commit_remark , // Instructions to fill in when submitting
}
struct ConnectorInfo {
@@ -473,14 +473,14 @@ struct GetUploadAuthTokenRequest {
}
struct UploadFileRequest {
1: CommonFileInfo file_head // 文件相关描述
2: string data // 文件数据
1: CommonFileInfo file_head // Document related description
2: string data // file data
}
// 上传文件,文件头
// Upload file, file header
struct CommonFileInfo {
1: string file_type // 文件类型,后缀
2: FileBizType biz_type // 业务类型
1: string file_type // File type, suffix
2: FileBizType biz_type // business type
}
enum FileBizType {
@@ -500,7 +500,7 @@ enum FileBizType {
struct UploadFileResponse {
1: i64 code
2: string msg
3: UploadFileData data // 数据
3: UploadFileData data // data
}
struct GetTypeListRequest {
@@ -508,9 +508,9 @@ struct GetTypeListRequest {
2: optional bool voice
3: optional bool raw_model
4: optional string space_id
5: optional string cur_model_id // 当前bot使用的模型ID用于处理cici/doubao同步过来的bot模型不能展示的问题
6: optional list<string> cur_model_ids // 兼容MultiAgent有多个cur_model_id
7: optional ModelScene model_scene // 模型场景
5: optional string cur_model_id // The model ID used by the current bot to handle issues that cannot be displayed by the bot model synchronized by cici/doubao
6: optional list<string> cur_model_ids // Compatible with MultiAgent, with multiple cur_model_id
7: optional ModelScene model_scene // model scenario
}
enum ModelScene {
@@ -526,34 +526,34 @@ enum ModelClass {
StableDiffusion = 6
ByteArtist = 7
Maas = 9
QianFan = 10 // 废弃:千帆(百度云)
QianFan = 10 // Abandoned: Qianfan (Baidu Cloud)
Gemini = 11 // nameGoogle Gemini
Moonshot = 12 // name: Moonshot
GLM = 13 // name:智谱
MaaSAutoSync = 14 // name: 火山方舟
QWen = 15 // name通义千问
GLM = 13 // Name: Zhipu
MaaSAutoSync = 14 // Name: Volcano Ark
QWen = 15 // Name: Tongyi Qianwen
Cohere = 16 // name: Cohere
Baichuan = 17 // name: 百川智能
Ernie = 18 // name:文心一言
DeekSeek = 19 // name: 幻方
Baichuan = 17 // Name: Baichuan Intelligent
Ernie = 18 // Name: ERNIE Bot
DeekSeek = 19 // Name: Magic Square
Llama = 20 // name: Llama
StepFun = 23
Other = 999
}
struct ModelQuota {
1: i32 token_limit // 最大总 token 数量
2: i32 token_resp // 最终回复最大 token 数量
3: i32 token_system // Prompt 系统最大 token 数量
4: i32 token_user_in // Prompt 用户输入最大 token 数量
5: i32 token_tools_in // Prompt 工具输入最大 token 数量
6: i32 token_tools_out // Prompt 工具输出最大 token 数量
7: i32 token_data // Prompt 数据最大 token 数量
8: i32 token_history // Prompt 历史最大 token 数量
9: bool token_cut_switch // Prompt 历史最大 token 数量
10: double price_in // 输入成本
11: double price_out // 输出成本
12: optional i32 system_prompt_limit // systemprompt输入限制,如果没有传,对输入不做限制
1: i32 token_limit // Maximum total number of tokens
2: i32 token_resp // Final reply maximum number of tokens
3: i32 token_system // Prompt system maximum number of tokens
4: i32 token_user_in // Prompt user to enter maximum number of tokens
5: i32 token_tools_in // Prompt tool to enter maximum number of tokens
6: i32 token_tools_out // Prompt tool output maximum number of tokens
7: i32 token_data // Prompt data maximum number of tokens
8: i32 token_history // Prompt history maximum number of tokens
9: bool token_cut_switch // Prompt history maximum number of tokens
10: double price_in // input cost
11: double price_out // output cost
12: optional i32 system_prompt_limit // Systemprompt input restrictions, if not passed, no input restrictions
}
enum ModelTagClass {
@@ -562,7 +562,7 @@ enum ModelTagClass {
ModelFeature = 3
ModelFunction = 4
Custom = 20 // 本期不做
Custom = 20 // Do not do this issue
Others = 100
}
@@ -586,21 +586,21 @@ struct ModelParamClass {
}
struct Option {
1: string label // option展示的值
2: string value // 填入的值
1: string label // The value displayed by the option
2: string value // Filled in value
}
struct ModelParameter {
1: required string name // 配置字段,如max_tokens
2: string label // 配置字段展示名称
3: string desc // 配置字段详情描述
4: required ModelParamType type // 类型
5: string min // 数值类型参数,允许设置的最小值
6: string max // 数值类型参数,允许设置的最大值
7: i32 precision // float类型参数的精度
8: required ModelParamDefaultValue default_val // 参数默认值{"default": xx, "creative":xx}
9: list<Option> options // 枚举值,如response_format支持text,markdown,json
10: ModelParamClass param_class // 参数分类,"Generation diversity", "Input and output length", "Output format"
1: required string name // Configuration fields, such as max_tokens
2: string label // Configure field display name
3: string desc // Configuration field detail description
4: required ModelParamType type // type
5: string min // Numerical type parameters, the minimum value allowed to be set
6: string max // Numerical type parameter, the maximum value allowed to be set
7: i32 precision // Precision of float type parameters
8: required ModelParamDefaultValue default_val // Parameter default {"default": xx, "creative": xx}
9: list<Option> options // Enumeration values such as response_format support text, markdown, json
10: ModelParamClass param_class // Parameter classification, "Generation diversity", "Input and output length", "Output format"
}
struct ModelDescGroup {
@@ -637,49 +637,49 @@ enum ModelTagValue {
}
struct ModelStatusDetails {
1: bool is_new_model, // 是否为新模型
2: bool is_advanced_model, // 是否是高级模型
3: bool is_free_model, // 是否是免费模型
1: bool is_new_model, // Is it a new model?
2: bool is_advanced_model, // Is it a high-level model?
3: bool is_free_model, // Is it a free model?
11: bool is_upcoming_deprecated, // 是否即将下架
12: string deprecated_date, // 下架日期
13: string replace_model_name, // 下架替换的模型
11: bool is_upcoming_deprecated, // Will it be removed from the shelves soon?
12: string deprecated_date, // removal date
13: string replace_model_name, // Remove the replacement model from the shelves.
21: string update_info, // 最近更新信息
22: ModelTagValue model_feature, // 模型特色
21: string update_info, // Recently updated information
22: ModelTagValue model_feature, // Model Features
}
struct ModelAbility {
1: optional bool cot_display // 是否展示cot
2: optional bool function_call // 是否支持function call
3: optional bool image_understanding // 是否支持图片理解
4: optional bool video_understanding // 是否支持视频理解
5: optional bool audio_understanding // 是否支持音频理解
6: optional bool support_multi_modal // 是否支持多模态
7: optional bool prefill_resp // 是否支持续写
1: optional bool cot_display // Do you want to show cot?
2: optional bool function_call // Supports function calls
3: optional bool image_understanding // Does it support picture understanding?
4: optional bool video_understanding // Does it support video understanding?
5: optional bool audio_understanding // Does it support audio understanding?
6: optional bool support_multi_modal // Does it support multimodality?
7: optional bool prefill_resp // Whether to support continuation
}
struct Model {
1: string name
2: i64 model_type
3: ModelClass model_class
4: string model_icon // model iconurl
4: string model_icon // Model icon url
5: double model_input_price
6: double model_output_price
7: ModelQuota model_quota
8: string model_name // model真实名前端计算token
8: string model_name // Model real name, front-end calculation token
9: string model_class_name
10: bool is_offline
11: list<ModelParameter> model_params
12: optional list<ModelDescGroup> model_desc
13: optional map<bot_common.ModelFuncConfigType, bot_common.ModelFuncConfigStatus> func_config, // 模型功能配置
14: optional string endpoint_name // 方舟模型节点名称
15: optional list<ModelTag> model_tag_list // 模型标签
16: optional bool is_up_required // user prompt是否必须有且不能为空
17: string model_brief_desc // 模型简要描述
18: ModelSeriesInfo model_series // 模型系列
19: ModelStatusDetails model_status_details // 模型状态
20: ModelAbility model_ability // 模型能力
13: optional map<bot_common.ModelFuncConfigType, bot_common.ModelFuncConfigStatus> func_config, // model function configuration
14: optional string endpoint_name // Ark model node name
15: optional list<ModelTag> model_tag_list // model label
16: optional bool is_up_required // User prompt must have and cannot be empty
17: string model_brief_desc // Model brief description
18: ModelSeriesInfo model_series // Model series
19: ModelStatusDetails model_status_details // model state
20: ModelAbility model_ability // model capability
}
struct VoiceType {
@@ -704,8 +704,8 @@ struct GetTypeListResponse {
}
struct UploadFileData {
1: string upload_url // 文件url
2: string upload_uri // 文件uri提交使用这个
1: string upload_url // File URL
2: string upload_uri // File URI, submit using this
}
struct UpdateUserProfileCheckRequest {
@@ -719,9 +719,9 @@ struct UpdateUserProfileCheckResponse {
enum CommitStatus {
Undefined = 0
Uptodate = 1 // 已是最新,同主草稿相同
Behind = 2 // 落后主草稿
NoDraftReplica = 3 // 无个人草稿
Uptodate = 1 // It is the latest, the same as the main draft
Behind = 2 // Behind the main draft
NoDraftReplica = 3 // No personal draft
}
struct Committer {
@@ -730,7 +730,7 @@ struct Committer {
3: optional string commit_time
}
// 检查草稿是否可以提交返回
// Check if the draft can be submitted and returned.
struct CheckDraftBotCommitResponse {
1: optional i64 code
2: optional string msg
@@ -739,12 +739,12 @@ struct CheckDraftBotCommitResponse {
struct CheckDraftBotCommitData {
1: optional CommitStatus status
2: optional string base_commit_version // 主草稿版本
3: optional Committer base_committer // 主草稿提交信息
4: optional string commit_version // 个人草稿版本
2: optional string base_commit_version // master draft version
3: optional Committer base_committer // Master Draft Submission Information
4: optional string commit_version // Personal draft version
}
// 检查草稿是否可以提交请求
// Check if the draft can be submitted to the request
struct CheckDraftBotCommitRequest {
1: required string space_id
2: required string bot_id
@@ -768,28 +768,28 @@ struct GetOnboardingResponse {
}
struct OnboardingContent {
1: optional string prologue // 开场白
2: optional list<string> suggested_questions // 建议问题
1: optional string prologue // opening statement
2: optional list<string> suggested_questions // suggestion question
}
enum ConfigStatus {
Configured = 1 // 已配置
NotConfigured = 2 // 未配置
Disconnected = 3 // Token发生变化
Configuring = 4 // 配置中,授权中
NeedReconfiguring = 5 // 需要重新配置
Configured = 1 // Configured
NotConfigured = 2 // Not configured
Disconnected = 3 // Token changes
Configuring = 4 // Configuring, authorizing
NeedReconfiguring = 5 // Need to reconfigure
}
enum BindType {
NoBindRequired = 1 // 无需绑定
AuthBind = 2 // Auth绑定
KvBind = 3 // Kv绑定=
KvAuthBind = 4 // Kv并Auth授权
ApiBind = 5 // api渠道绑定
NoBindRequired = 1 // No binding required
AuthBind = 2 // Auth binding
KvBind = 3 // Kv binding =
KvAuthBind = 4 // Kv and Auth authorization
ApiBind = 5 // API channel binding
WebSDKBind = 6
StoreBind = 7
AuthAndConfig = 8 // 授权和配置各一个按钮
AuthAndConfig = 8 // One button each for authorization and configuration
}
enum AllowPublishStatus {
Allowed = 0
@@ -807,14 +807,14 @@ struct AuthLoginInfo {
}
enum BotConnectorStatus {
Normal = 0 // 正常
InReview = 1 // 审核中
Offline = 2 // 已下线
Normal = 0 // Normal
InReview = 1 // Under review.
Offline = 2 // offline
}
enum UserAuthStatus {
Authorized = 1 // 已授权
UnAuthorized = 2 // 未授权
Authorizing = 3 // 授权中
Authorized = 1 // Authorized
UnAuthorized = 2 // unauthorized
Authorizing = 3 // Authorizing
}
struct PublishConnectorListRequest {
@@ -824,32 +824,32 @@ struct PublishConnectorListRequest {
}
struct PublishConnectorInfo {
1: required string id // 发布平台 connector_id
2: required string name // 发布平台名称
3: required string icon // 发布平台图标
4: required string desc // 发布平台描述
5: required string share_link // 分享链接
6: required ConfigStatus config_status // 配置状态 1:已绑定 2:未绑定
7: required i64 last_publish_time // 最近发布时间
8: required BindType bind_type // 绑定类型 1:无需绑定 2:Auth 3: kv
9: required map<string,string> bind_info // 绑定信息 key字段名 value是值
10: optional string bind_id // 绑定id信息用于解绑使用
11: optional AuthLoginInfo auth_login_info // 用户授权登陆信息
12: optional bool is_last_published // 是否为上次发布
13: optional BotConnectorStatus connector_status // bot渠道状态
14: optional string privacy_policy // 隐私政策
15: optional string user_agreement // 用户协议
16: optional AllowPublishStatus allow_punish // 渠道是否允许发布
17: optional string not_allow_reason // 不允许发布原因
18: optional string config_status_toast // 配置状态toast
19: optional i64 brand_id // 品牌 ID
20: optional bool support_monetization // 支持商业化
21: optional UserAuthStatus auth_status // 1: 已授权2:未授权. 目前仅 bind_type == 8 时这个字段才有
22: optional string to_complete_info_url // 补全信息按钮的 url
1: required string id // Publishing Platform connector_id
2: required string name // publishing platform name
3: required string icon // publishing platform icon
4: required string desc // Publish Platform Description
5: required string share_link // share link
6: required ConfigStatus config_status // Configuration Status 1: Bound 2: Unbound
7: required i64 last_publish_time // Last Post
8: required BindType bind_type // Binding type 1: No binding required 2: Auth 3: kv value
9: required map<string,string> bind_info // Binding information key field name value is value
10: optional string bind_id // Bind id information for unbinding and use
11: optional AuthLoginInfo auth_login_info // user authorization login information
12: optional bool is_last_published // Is it the last release?
13: optional BotConnectorStatus connector_status // bot channel status
14: optional string privacy_policy // Privacy Policy
15: optional string user_agreement // User Agreement
16: optional AllowPublishStatus allow_punish // Is the channel allowed to publish?
17: optional string not_allow_reason // Reason for not allowing posting
18: optional string config_status_toast // Configuration status toast
19: optional i64 brand_id // Brand ID
20: optional bool support_monetization // Support commercialization
21: optional UserAuthStatus auth_status // 1: Authorized, 2: Unauthorized. Currently this field is only available bind_type == 8
22: optional string to_complete_info_url // URL of the complete info button
}
struct SubmitBotMarketOption {
1: optional bool can_open_source // 是否可以公开编排
1: optional bool can_open_source // Is it possible to publicly orchestrate?
}
@@ -860,7 +860,7 @@ struct ConnectorBrandInfo {
}
struct PublishTips {
1: optional string cost_tips // 成本承担提醒
1: optional string cost_tips // cost-bearing reminder
}
struct PublishConnectorListResponse {
@@ -868,9 +868,9 @@ struct PublishConnectorListResponse {
2: string msg
3: list<PublishConnectorInfo> publish_connector_list
4: optional SubmitBotMarketOption submit_bot_market_option
5: optional SubmitBotMarketConfig last_submit_config // 上次提交market的配置
6: map<i64, ConnectorBrandInfo> connector_brand_info_map // 渠道品牌信息
7: optional PublishTips publish_tips // 发布提醒
5: optional SubmitBotMarketConfig last_submit_config // The configuration of the last submitted market
6: map<i64, ConnectorBrandInfo> connector_brand_info_map // Channel brand information
7: optional PublishTips publish_tips // post alert
}
service DeveloperApiService {

View File

@@ -1,54 +1,54 @@
namespace go flow.devops.debugger.domain.infra
// ComponentType 支持组件类型
// ComponentType Supports component types
enum ComponentType {
Undefined = 0
CozePlugin = 10000 // Coze Plugin
CozeTool = 10001 // Coze Tool
CozeWorkflow = 10002 // Coze Workflow
CozeSubWorkflow = 10003 // Coze SubWorkflow即在Workflow中被引用的子Workflow
CozeLLMNode = 10004 // Coze workflow中的LLM节点
CozeCodeNode = 10005 // Coze workflow中的Code节点
CozeKnowledgeNode = 10006 // Coze workflow中的Knowledge节点
CozeToolNode = 10007 // Coze workflow中的Tool节点
CozeStartNode = 10008 // Coze workflow中的start节点
CozeVariableNode = 10009 // Coze workflow中的variable节点
CozeSubWorkflow = 10003 // Coze SubWorkflow, which is referenced in Workflow.
CozeLLMNode = 10004 // LLM nodes in Coze workflow
CozeCodeNode = 10005 // Coding nodes in a Coze workflow
CozeKnowledgeNode = 10006 // Knowledge nodes in Coze workflow
CozeToolNode = 10007 // Tools nodes in Coze workflow
CozeStartNode = 10008 // Coze workflow start node
CozeVariableNode = 10009 // Cozing variable nodes in workflow
CozeVariableBot = 20000 // Coze 虚拟节点用于标识 variable 依赖的bot
CozeVariableChat = 20001 // Coze 虚拟节点用于标识 variable 依赖的chat
CozeVariableBot = 20000 // Coze virtual nodes to identify variable dependent bots
CozeVariableChat = 20001 // Coze virtual nodes to identify variable dependent chats
}
// TrafficScene 流量请求场景
// TrafficScene traffic request scenario
enum TrafficScene {
Undefined = 0
CozeSingleAgentDebug = 10000 // 单Agent调试页
CozeMultiAgentDebug = 10001 // 多Agent调试页
CozeToolDebug = 10002 // Tool调试页
CozeWorkflowDebug = 10003 // Workflow调试页
CozeSingleAgentDebug = 10000 // Single Agent Debug Page
CozeMultiAgentDebug = 10001 // Multi-Agent Debug Page
CozeToolDebug = 10002 // Tool Debug Page
CozeWorkflowDebug = 10003 // Workflow debugging page
}
// ComponentMappingType 组件映射类型
// ComponentMappingType Component Mapping Types
enum ComponentMappingType {
Undefined = 0
MockSet = 1
}
// BizCtx 业务上下文
// BizCtx Business Context
struct BizCtx {
1: optional string connectorID // connectorID
2: optional string connectorUID // connector下用户ID
3: optional TrafficScene trafficScene // 业务场景
4: optional string trafficCallerID // 业务场景组件ID比如Bot调试页trafficSceneIDBotID
5: optional string bizSpaceID // 业务线SpaceID用于访问控制
6: optional map<string,string> ext // 额外信息
2: optional string connectorUID // User ID under connector
3: optional TrafficScene trafficScene // business scenario
4: optional string trafficCallerID // Business Scenario Component ID, such as Bot Debug Page, where trafficSceneID is BotID
5: optional string bizSpaceID // Line of business SpaceID for access control
6: optional map<string,string> ext // Additional information
}
// ComponentSubject 业务组件的二级结构
// Secondary structure of the ComponentSubject business component
struct ComponentSubject {
1: optional string componentID // 组件ID例如Tool IDNode ID
2: optional ComponentType componentType // 组件类型
3: optional string parentComponentID // 父组件ID例如Tool->Plugin, Node->Workflow
4: optional ComponentType parentComponentType // 父组件类型
1: optional string componentID // Component IDs, such as Tool ID, Node ID, etc
2: optional ComponentType componentType // component type
3: optional string parentComponentID // Parent component ID, e.g. Tool- > Plugin, Node- > Workflow
4: optional ComponentType parentComponentType // Parent component type
}
enum OrderBy {
@@ -62,9 +62,9 @@ struct Creator {
}
enum DebugScene {
Debug = 0 // 默认play ground Debug场景
Debug = 0 // Default play ground Debug scene
}
enum CozeChannel {
Coze = 0 // 默认为Coze, 未来扩展到其他渠道
Coze = 0 // Default to Coze, expand to other channels in the future
}

View File

@@ -3,10 +3,10 @@ namespace go flow.devops.debugger.domain.testcase
include "infra.thrift"
struct CaseDataBase {
1: optional i64 caseID (go.tag="json:\"caseID,string\"")// 新增时不填,更新时填写
1: optional i64 caseID (go.tag="json:\"caseID,string\"")// Do not fill in when adding, fill in when updating
2: optional string name
3: optional string description
4: optional string input // json格式的输入信息
4: optional string input // Input information in JSON format
5: optional bool isDefault
}
@@ -16,6 +16,6 @@ struct CaseDataDetail{
2: optional string creatorID
3: optional i64 createTimeInSec
4: optional i64 updateTimeInSec
5: optional bool schemaIncompatible // schema不兼容
5: optional bool schemaIncompatible // Schema incompatibility
6: optional infra.Creator updater,
}

View File

@@ -6,9 +6,9 @@ include "./domain/testcase.thrift"
// ========== TestCase =========== //
struct SaveCaseDataReq {
1: optional infra.BizCtx bizCtx // 业务信息
1: optional infra.BizCtx bizCtx // business information
2: optional infra.ComponentSubject bizComponentSubject
3: optional testcase.CaseDataBase caseBase // case基本数据
3: optional testcase.CaseDataBase caseBase // Case basic data
255: optional base.Base Base
}
@@ -22,8 +22,8 @@ struct SaveCaseDataResp {
}
struct DeleteCaseDataReq {
1: optional infra.BizCtx bizCtx // 业务信息
2: optional list<i64> caseIDs // 单次上限20
1: optional infra.BizCtx bizCtx // business information
2: optional list<i64> caseIDs // A single maximum of 20
255: optional base.Base Base
}
@@ -38,7 +38,7 @@ struct DeleteCaseDataResp {
struct CheckCaseDuplicateReq {
1: optional infra.BizCtx bizCtx
2: optional string caseName // case名称
2: optional string caseName // Case name
3: optional infra.ComponentSubject bizComponentSubject
255: optional base.Base Base
@@ -46,7 +46,7 @@ struct CheckCaseDuplicateReq {
struct CheckCaseDuplicateResp {
1: optional bool isPass
2: optional string failReason // pass=false时,给出具体的校验不通过的原因
2: optional string failReason // When pass = false, give the specific reason why the check failed
3: optional i32 failCode
253: optional i32 code
@@ -55,14 +55,14 @@ struct CheckCaseDuplicateResp {
}
struct GetSchemaByIDReq {
1: optional infra.BizCtx bizCtx // 业务信息
1: optional infra.BizCtx bizCtx // business information
2: optional infra.ComponentSubject bizComponentSubject
255: optional base.Base Base
}
struct GetSchemaByIDResp {
1: optional string schemaJson // Json格式的组件input信息Input Json Schema保持一致不包含Value值信息
1: optional string schemaJson // Component input information in JSON format, consistent with Input JSON Schema, does not contain Value information
253: optional i32 code
254: optional string msg

View File

@@ -8,25 +8,25 @@ enum ProductEntityType {
// Workflow = 3 ,
SocialScene = 4,
Project = 6,
WorkflowTemplate = 13, // 历史工作流,后续不会再有(废弃)
ImageflowTemplate = 15, // 历史图像流模板,后续不会再有(废弃)
TemplateCommon = 20, // 模板通用标识,仅用于绑定模板相关的配置,不绑定商品
BotTemplate = 21, // Bot 模板
WorkflowTemplateV2 = 23, // 工作流模板
ImageflowTemplateV2 = 25, // 图像流模板(该类型已下线,合并入 workflow但历史数据会保留前端视作 workflow 展示)
ProjectTemplate = 26, // 项目模板
CozeToken = 50, // coze token 类商品,理论上只会有一个
MsgCredit = 55, // 订阅 credit 的流量包,理论上只会有一个
SubsMsgCredit = 60, // 消息订阅类商品,理论上只有一个
WorkflowTemplate = 13, // History workflow, no more in the future (abandoned)
ImageflowTemplate = 15, // Historical image stream template, no more in the future (obsolete)
TemplateCommon = 20, // Template universal identification, only used to bind template-related configurations, not bind products
BotTemplate = 21, // Bot template
WorkflowTemplateV2 = 23, // workflow template
ImageflowTemplateV2 = 25, // Image stream template (this type has been offline and merged into workflow, but historical data will be preserved, and the front end will be treated as workflow display)
ProjectTemplate = 26, // project template
CozeToken = 50, // Coze token products, theoretically there will only be one
MsgCredit = 55, // Subscribe to the traffic package of credit, theoretically there will only be one
SubsMsgCredit = 60, // There is only one subscription product in theory
Common = 99,
Topic = 101 // 专题(兼容之前的设计)
Topic = 101 // Special Topics (Compatible with previous designs)
}
enum SortType {
Heat = 1,
Newest = 2,
FavoriteTime = 3, // 收藏时间
Relative = 4, // 相关性,只用于搜索场景
FavoriteTime = 3, // collection time
Relative = 4, // Correlation, only for search scenarios
}
enum ProductPublishMode {
@@ -35,8 +35,8 @@ enum ProductPublishMode {
}
enum ProductListSource {
Recommend = 1, // 推荐列表页
CustomizedRecommend = 2, // 个性化推荐
Recommend = 1, // recommended list page
CustomizedRecommend = 2, // personalized recommendation
}
enum PluginType {
@@ -54,7 +54,7 @@ struct CommercialSetting {
}
enum ProductStatus {
NeverListed = 0, // 从未上架
NeverListed = 0, // NeverListed
Listed = 1,
Unlisted = 2,
Banned = 3,
@@ -83,16 +83,16 @@ struct ImageInfo {
}
enum ProductDraftStatus {
Default = 0, // 默认
Pending = 1, // 审核中
Approved = 2, // 审核通过
Rejected = 3, // 审核不通过
Abandoned = 4, // 已废弃
Default = 0, // default
Pending = 1, // Under review.
Approved = 2, // approved
Rejected = 3, // The review failed.
Abandoned = 4, // Abandoned
}
typedef ProductDraftStatus AuditStatus
struct OpeningDialog { // Bot开场白
struct OpeningDialog { // Bot OpeningDialog
1: string content (agw.key = "content", api.body= "content"),
}
@@ -110,17 +110,17 @@ enum PluginParamTypeFormat {
}
enum WorkflowNodeType {
Start = 1 , // 开始
End = 2 , // 结束
LLM = 3 , // 大模型
Api = 4 , // 插件
Code = 5 , // 代码
Dataset = 6 , // 知识库
If = 8 , // 选择器
SubWorkflow = 9 , // 工作流
Variable = 11, // 变量
Database = 12, // 数据库
Message = 13, // 消息
Start = 1 , // start
End = 2 , // end
LLM = 3 , // Large model
Api = 4 , // plugin
Code = 5 , // code
Dataset = 6 , // Knowledge Base
If = 8 , // selector
SubWorkflow = 9 , // Workflow
Variable = 11, // variable
Database = 12, // database
Message = 13, // message
}
enum SocialSceneRoleType {
@@ -129,9 +129,9 @@ enum SocialSceneRoleType {
Custom = 3
}
enum UIPreviewType { // UI 预览类型,定义对齐 UI Builder目前用于 Project
Web = 1, // 网页端
Client = 2, // 移动端
enum UIPreviewType { // UI preview type, defining alignment UI Builder, currently used in Project
Web = 1, // web page
Client = 2, // mobile end
}
struct ChargeSKUExtra{
@@ -140,7 +140,7 @@ struct ChargeSKUExtra{
}
enum FavoriteListSource {
CreatedByMe = 1, // 用户自己创建的
CreatedByMe = 1, // Created by users themselves
}
struct FavoriteEntity {
@@ -149,10 +149,10 @@ struct FavoriteEntity {
4 : string Name (agw.key = "name", api.body="name") ,
5 : string IconURL (agw.key = "icon_url", api.body="icon_url") ,
6 : string Description (agw.key = "description", api.body="description") ,
7 : SellerInfo Seller (agw.key = "seller", api.body="seller") , // 废弃,使用UserInfo
8 : i64 SpaceID (agw.js_conv="str", agw.cli_conv="str", agw.key = "space_id", api.body="space_id", api.js_conv="true") , // 用于跳转到Bot编辑页
9 : bool HasSpacePermission (agw.key = "has_space_permission", api.body="has_space_permission") , // 用户是否有该实体所在Space的权限
10: i64 FavoriteAt (agw.js_conv="str", agw.cli_conv="str", agw.key = "favorite_at", api.body="favorite_at", api.js_conv="true"), // 收藏时间
7 : SellerInfo Seller (agw.key = "seller", api.body="seller") , // Abandoned, using UserInfo
8 : i64 SpaceID (agw.js_conv="str", agw.cli_conv="str", agw.key = "space_id", api.body="space_id", api.js_conv="true") , // Use to jump to the bot edit page
9 : bool HasSpacePermission (agw.key = "has_space_permission", api.body="has_space_permission") , // Does the user have permissions to the space where the entity is located?
10: i64 FavoriteAt (agw.js_conv="str", agw.cli_conv="str", agw.key = "favorite_at", api.body="favorite_at", api.js_conv="true"), // collection time
11: optional FavoriteProductExtra ProductExtra (agw.key = "product_extra", api.body="product_extra") ,
12: UserInfo UserInfo (agw.key = "user_info", api.body="user_info") ,

View File

@@ -41,22 +41,22 @@ struct GetProductListRequest {
3 : required product_common.SortType SortType (api.body = "sort_type") ,
4 : required i32 PageNum (api.body = "page_num") ,
5 : required i32 PageSize (api.body = "page_size") ,
6 : optional string Keyword (api.body = "keyword") , // 不为空则搜索
7 : optional product_common.ProductPublishMode PublishMode (api.body = "publish_mode") , // 公开方式1-开源2-闭源 , // 公开方式
8 : optional list<i64> PublishPlatformIDs (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.source = "query", agw.key = "publish_platform_ids"), // 发布渠道
9 : optional product_common.ProductListSource Source (agw.key = "source", api.body= "source") , // 列表页 tab; 1-运营推荐
// 个性化推荐场景, 传入当前的实体信息, 获取推荐的商品
10: optional product_common.ProductEntityType CurrentEntityType (api.body = "current_entity_type") , // 当前实体类型
11: optional i64 CurrentEntityID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.query = "current_entity_id", agw.key="current_entity_id") , // 当前实体 ID
12: optional i64 CurrentEntityVersion (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.query = "current_entity_version", agw.key="current_entity_version") , // 当前实体版本
// 专题场景
6 : optional string Keyword (api.body = "keyword") , // non-empty search
7 : optional product_common.ProductPublishMode PublishMode (api.body = "publish_mode") , // Open mode: 1-open source; 2-closed source,//open mode
8 : optional list<i64> PublishPlatformIDs (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.source = "query", agw.key = "publish_platform_ids"), // publish platforms
9 : optional product_common.ProductListSource Source (agw.key = "source", api.body= "source") , // List tab; 1 - Operational recommendations
// Personalized recommendation scenarios, enter current entity information, and obtain recommended products
10: optional product_common.ProductEntityType CurrentEntityType (api.body = "current_entity_type") , // Current entity type
11: optional i64 CurrentEntityID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.query = "current_entity_id", agw.key="current_entity_id") , // Current entity ID
12: optional i64 CurrentEntityVersion (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.query = "current_entity_version", agw.key="current_entity_version") , // Current entity version
// thematic scenario
13 : optional i64 TopicID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.query = "topic_id", agw.key="topic_id") ,
14 : optional string PreviewTopicID (agw.key = "preview_topic_id", api.body= "preview_topic_id") ,
15 : optional bool IsOfficial (api.body = "is_official") , // 是否需要过滤出官方商品
16 : optional bool NeedExtra (api.body = "need_extra") , // 是否需要返回额外信息
17 : optional list<product_common.ProductEntityType> EntityTypes (api.body = "entity_types"), // 商品类型列表, 优先使用该参数,其次使用 EntityType
18 : optional bool IsFree (api.body = "is_free"), // true = 筛选免费的false = 筛选付费的;不传则不区分免费和付费
19 : optional product_common.PluginType PluginType (api.body = "plugin_type") , // 插件类型
15 : optional bool IsOfficial (api.body = "is_official") , // Do you need to filter out official products?
16 : optional bool NeedExtra (api.body = "need_extra") , // Do you need to return additional information?
17 : optional list<product_common.ProductEntityType> EntityTypes (api.body = "entity_types"), // List of product types, use this parameter first, followed by EntityType
18 : optional bool IsFree (api.body = "is_free"), // True = filter for free; false = filter for paid; if you don't pass it, you won't distinguish between free and paid.
19 : optional product_common.PluginType PluginType (api.body = "plugin_type") , // plugin type
101: optional string ClientIP (api.header="Tt-Agw-Client-Ip") ,
255: optional base.Base Base ,
}
@@ -106,57 +106,57 @@ struct ProductLabel{
struct ProductMetaInfo {
1 : i64 ID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "id", api.body= "id") ,
2 : string Name (agw.key = "name", api.body= "name") , // 商品/模板名称
3 : i64 EntityID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "entity_id", api.body= "entity_id") , // 素材 ID由 entity_type 来决定是 bot/plugin 的ID
4 : product_common.ProductEntityType EntityType (agw.key = "entity_type", api.body= "entity_type") , // 商品素材类型
5 : string IconURL (agw.key = "icon_url", agw.key="icon_url", api.body= "icon_url") , // 商品/模板头像
6 : i32 Heat (agw.key = "heat", api.body= "heat") , // 热度:模板热度=复制量(用于卡片展示/排序);商品热度=不同商品有独立的计算逻辑(仅用于排序)—— heat的计算有一定延迟
2 : string Name (agw.key = "name", api.body= "name") , // Product/Template Name
3 : i64 EntityID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "entity_id", api.body= "entity_id") , // Creature ID, determined by entity_type is the ID of the bot/plugin
4 : product_common.ProductEntityType EntityType (agw.key = "entity_type", api.body= "entity_type") , // Product material type
5 : string IconURL (agw.key = "icon_url", agw.key="icon_url", api.body= "icon_url") , // Product/template avatar
6 : i32 Heat (agw.key = "heat", api.body= "heat") , // Heat: Template heat = copy volume (used for card display/sorting); product heat = different products have independent calculation logic (only used for sorting) - the calculation of heat has a certain delay
7 : i32 FavoriteCount (agw.key = "favorite_count", api.body= "favorite_count") ,
8 : SellerInfo Seller (agw.key = "seller", api.body= "seller") , // 废弃,使用UserInfo代替
9 : string Description (agw.key = "description", api.body= "description") , // 商品描述
8 : SellerInfo Seller (agw.key = "seller", api.body= "seller") , // Obsolete, use UserInfo instead
9 : string Description (agw.key = "description", api.body= "description") , // Product description
10: i64 ListedAt (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "listed_at", api.body= "listed_at") ,
11: product_common.ProductStatus Status (agw.key = "status", api.body= "status") ,
12: optional ProductCategory Category (agw.key = "category", api.body= "category") , // 商品/模板分类信息
13: bool IsFavorited (agw.key = "is_favorited", api.body= "is_favorited") , // 是否收藏
12: optional ProductCategory Category (agw.key = "category", api.body= "category") , // Product/template classification information
13: bool IsFavorited (agw.key = "is_favorited", api.body= "is_favorited") , // Whether to collect
14: bool IsFree (agw.key = "is_free", api.body= "is_free") ,
15: string Readme (agw.key = "readme", api.body= "readme") , // 模板介绍/插件介绍(目前是富文本格式)
15: string Readme (agw.key = "readme", api.body= "readme") , // Template introduction/plugin introduction (currently in rich text format)
16: optional i64 EntityVersion (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "entity_version", api.body= "entity_version"),
17: optional list<ProductLabel> Labels (agw.key = "labels", api.body= "labels") ,
18: product_common.UserInfo UserInfo (agw.key = "user_info", api.body= "user_info") ,
19: string MediumIconURL (agw.key = "medium_icon_url", api.body= "medium_icon_url") ,
20: string OriginIconURL (agw.key = "origin_icon_url", api.body= "origin_icon_url") ,
21: optional list<product_common.ImageInfo> Covers (agw.key = "covers", api.body= "covers") , // 模板封面
22: optional bool IsProfessional (agw.key = "is_professional", api.body= "is_professional") , // 是否专业版特供
23: bool IsTemplate (agw.key = "is_template", api.body= "is_template") , // 是否为模板
24: bool IsOfficial (agw.key = "is_official", api.body= "is_official") , // 是否官方商品
25: optional marketplace_common.Price Price (agw.key = "price", api.body= "price") , // 价格,当前只有模板有
21: optional list<product_common.ImageInfo> Covers (agw.key = "covers", api.body= "covers") , // Template cover
22: optional bool IsProfessional (agw.key = "is_professional", api.body= "is_professional") , // Is the professional version specially available?
23: bool IsTemplate (agw.key = "is_template", api.body= "is_template") , // Is it a template?
24: bool IsOfficial (agw.key = "is_official", api.body= "is_official") , // Is it an official product?
25: optional marketplace_common.Price Price (agw.key = "price", api.body= "price") , // Price, currently only available in the template.
}
struct UserBehaviorInfo {
// 用户主页需要返回最近浏览/使用商品的时间
1: optional i64 ViewedAt (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "viewed_at", api.body= "viewed_at") , // 最近浏览时间戳
2: optional i64 UsedAt (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "used_at", api.body= "used_at") , // 最近使用时间戳
// The user homepage needs to return the most recently viewed/used product time.
1: optional i64 ViewedAt (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "viewed_at", api.body= "viewed_at") , // Latest Viewtimestamp
2: optional i64 UsedAt (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "used_at", api.body= "used_at") , // Recently used timestamp
}
enum PluginAuthMode {
NoAuth = 0, // 不需要授权
Required = 1, // 需要授权,但无授权配置
Configured = 2, // 需要授权,且已经配置
Supported = 3, // 需要授权,但授权配置可能是用户级别,可由用户自己配置
NoAuth = 0, // No authorization required.
Required = 1, // Authorization required, but no authorization configuration
Configured = 2, // Authorization is required and has been configured
Supported = 3, // Authorization is required, but the authorization configuration may be user-level and can be configured by the user himself
}
struct PluginExtraInfo {
1: optional list<PluginToolInfo> Tools (agw.key = "tools", api.body= "tools") ,
2: i32 TotalAPICount (agw.key = "total_api_count", api.body= "total_api_count") ,
3: i32 BotsUseCount (agw.key = "bots_use_count", api.body= "bots_use_count") ,
4: optional bool HasPrivacyStatement (agw.key = "has_private_statement", api.body= "has_private_statement"), // 是否有隐私声明, 目前只有 PublicGetProductDetail 会取数据
5: optional string PrivacyStatement (agw.key = "private_statement", api.body= "private_statement") , // 隐私声明, 目前只有 PublicGetProductDetail 会取数据
4: optional bool HasPrivacyStatement (agw.key = "has_private_statement", api.body= "has_private_statement"), // Is there a privacy statement, currently only PublicGetProductDetail will take the data
5: optional string PrivacyStatement (agw.key = "private_statement", api.body= "private_statement") , // Privacy statement, currently only PublicGetProductDetail will access data
6: i32 AssociatedBotsUseCount (agw.key = "associated_bots_use_count", api.body= "associated_bots_use_count"),
7: bool IsPremium (agw.key="is_premium", api.body= "is_premium"),
8: bool IsOfficial (agw.key="is_official", api.body= "is_official"),
9: optional i32 CallAmount (agw.key = "call_amount", api.body= "call_amount") // 调用量
10: optional double SuccessRate (agw.key = "success_rate", api.body= "success_rate") // 成功率
11: optional double AvgExecTime (agw.key = "avg_exec_time", api.body= "avg_exec_time") // 平均执行时长
9: optional i32 CallAmount (agw.key = "call_amount", api.body= "call_amount") // call amount
10: optional double SuccessRate (agw.key = "success_rate", api.body= "success_rate") // success rate
11: optional double AvgExecTime (agw.key = "avg_exec_time", api.body= "avg_exec_time") // average execution time
12: optional bool IsDefaultIcon (agw.key = "is_default_icon", api.body= "is_default_icon"),
13: optional i64 SpaceID (agw.key = "space_id", agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.body= "space_id"),
14: optional i64 MaterialID (agw.key = "material_id", agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.body= "material_id"),
@@ -177,7 +177,7 @@ struct ToolParameter {
struct CardInfo {
1: string CardURL (agw.key = "card_url", api.body= "card_url"),
// 以下只有详情页返回
// Only the details page returns
2: i64 CardID (agw.js_conv="str", api.js_conv="true" agw.cli_conv="str", agw.key = "card_id", api.body= "card_id"),
3: string MappingRule (agw.key = "mapping_rule"),
4: i64 MaxDisplayRows (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "max_display_rows", api.body= "max_display_rows"),
@@ -203,11 +203,11 @@ struct PluginToolInfo{
4: optional list<ToolParameter> Parameters (agw.key = "parameters", api.body= "parameters") ,
5: optional CardInfo CardInfo (agw.key = "card_info", api.body= "card_info"),
6: optional PluginToolExample Example (agw.key = "example", api.body= "example"),
7: optional i32 CallAmount (agw.key = "call_amount", api.body= "call_amount") // 调用量
8: optional double SuccessRate (agw.key = "success_rate", api.body= "success_rate") // 成功率
9: optional double AvgExecTime (agw.key = "avg_exec_time", api.body= "avg_exec_time") // 平均执行时长
10: optional i32 BotsUseCount (agw.key = "bots_use_count", api.body= "bots_use_count") // tool bot引用数
11: optional PluginRunMode RunMode (agw.key = "run_mode", api.body= "run_mode"), // 运行模式
7: optional i32 CallAmount (agw.key = "call_amount", api.body= "call_amount") // call amount
8: optional double SuccessRate (agw.key = "success_rate", api.body= "success_rate") // success rate
9: optional double AvgExecTime (agw.key = "avg_exec_time", api.body= "avg_exec_time") // average execution time
10: optional i32 BotsUseCount (agw.key = "bots_use_count", api.body= "bots_use_count") // Number of tool bot references
11: optional PluginRunMode RunMode (agw.key = "run_mode", api.body= "run_mode"), // operating mode
}
struct PluginConnectorInfo {
@@ -247,32 +247,32 @@ enum FileboxInfoMode {
On = 1
}
struct UserQueryCollectConf { // bot用户query收集配置
1: bool IsCollected (agw.key="is_collected", api.body= "is_collected") , // 是否开启收集开关
2: string PrivatePolicy (agw.key="private_policy", api.body= "private_policy") , // 隐私协议链接
struct UserQueryCollectConf { // Bot user query collection configuration
1: bool IsCollected (agw.key="is_collected", api.body= "is_collected") , // Whether to turn on the collection switch
2: string PrivatePolicy (agw.key="private_policy", api.body= "private_policy") , // Privacy Policy Link
}
struct BotConfig {
1: optional list<ProductMaterial> Models (agw.key = "models", api.body= "models") , // 模型
2: optional list<ProductMaterial> Plugins (agw.key = "plugins", api.body= "plugins") , // 插件
3: optional list<ProductMaterial> Knowledges (agw.key = "knowledges", api.body= "knowledges") , // 知识库
4: optional list<ProductMaterial> Workflows (agw.key = "workflows", api.body= "workflows") , // 工作流
5: optional i32 PrivatePluginsCount (agw.key = "private_plugins_count", api.body= "private_plugins_count") , // 私有插件数量
6: optional i32 PrivateKnowledgesCount (agw.key = "private_knowledges_count", api.body= "private_knowledges_count"), // 私有知识库数量
7: optional i32 PrivateWorkflowsCount (agw.key = "private_workflows_count", api.body= "private_workflows_count") , // 私有工作流数量
8: optional bool HasBotAgent (agw.key = 'has_bot_agent', api.body= "has_bot_agent") , // 判断 multiagent 是否有 bot 节点
9: optional list<BotVoiceInfo> BotVoices (agw.key = 'bot_voices', api.body= "bot_voices") , // bot 配置的声音列表
10: optional i32 TotalPluginsCount (agw.key = "total_plugins_count", api.body= "total_plugins_count") , // 所有插件数量
11: optional i32 TotalKnowledgesCount (agw.key = "total_knowledges_count", api.body= "total_knowledges_count"), // 所有知识库数量
12: optional i32 TotalWorkflowsCount (agw.key = "total_workflows_count", api.body= "total_workflows_count") , // 所有工作流数量
13: optional TimeCapsuleMode TimeCapsuleMode (agw.key = "time_capsule_mode", api.body= "time_capsule_mode") // 时间胶囊模式
14: optional FileboxInfoMode FileboxMode (agw.key = "filebox_mode", api.body= "filebox_mode") // 文件盒模式
15: optional i32 PrivateImageWorkflowCount (agw.key = "private_image_workflow_count", api.body= "private_image_workflow_count"), // 私有图片工作流数量
16: optional UserQueryCollectConf UserQueryCollectConf (agw.key = "user_query_collect_conf", api.body= "user_query_collect_conf") // 用户qeury收集配置
17: optional bool IsCloseVoiceCall (agw.key = "is_close_voice_call", api.body= "is_close_voice_call"), // 是否关闭语音通话(默认是打开)
1: optional list<ProductMaterial> Models (agw.key = "models", api.body= "models") , // model
2: optional list<ProductMaterial> Plugins (agw.key = "plugins", api.body= "plugins") , // plugin
3: optional list<ProductMaterial> Knowledges (agw.key = "knowledges", api.body= "knowledges") , // Knowledge Base
4: optional list<ProductMaterial> Workflows (agw.key = "workflows", api.body= "workflows") , // Workflow
5: optional i32 PrivatePluginsCount (agw.key = "private_plugins_count", api.body= "private_plugins_count") , // number of private plugins
6: optional i32 PrivateKnowledgesCount (agw.key = "private_knowledges_count", api.body= "private_knowledges_count"), // Number of private repositories
7: optional i32 PrivateWorkflowsCount (agw.key = "private_workflows_count", api.body= "private_workflows_count") , // number of private workflows
8: optional bool HasBotAgent (agw.key = 'has_bot_agent', api.body= "has_bot_agent") , // Determine if the multiagent has a bot node
9: optional list<BotVoiceInfo> BotVoices (agw.key = 'bot_voices', api.body= "bot_voices") , // List of sounds configured by bot
10: optional i32 TotalPluginsCount (agw.key = "total_plugins_count", api.body= "total_plugins_count") , // Number of all plugins
11: optional i32 TotalKnowledgesCount (agw.key = "total_knowledges_count", api.body= "total_knowledges_count"), // Number of all knowledge bases
12: optional i32 TotalWorkflowsCount (agw.key = "total_workflows_count", api.body= "total_workflows_count") , // Number of all workflows
13: optional TimeCapsuleMode TimeCapsuleMode (agw.key = "time_capsule_mode", api.body= "time_capsule_mode") // Time Capsule Mode
14: optional FileboxInfoMode FileboxMode (agw.key = "filebox_mode", api.body= "filebox_mode") // File box mode
15: optional i32 PrivateImageWorkflowCount (agw.key = "private_image_workflow_count", api.body= "private_image_workflow_count"), // Number of private image workflows
16: optional UserQueryCollectConf UserQueryCollectConf (agw.key = "user_query_collect_conf", api.body= "user_query_collect_conf") // User qeury collection configuration
17: optional bool IsCloseVoiceCall (agw.key = "is_close_voice_call", api.body= "is_close_voice_call"), // Whether to turn off voice calls (the default is on)
}
// 消息涉及的bot信息,在home分享场景,消息属于多个bot
// The bot information involved in the message, sharing the scene in the home, the message belongs to multiple bots
struct ConversationRelateBot {
1: i64 ID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "id", api.body= "id"),
2: string Name (agw.key = "name", api.body= "name") ,
@@ -280,34 +280,34 @@ struct ConversationRelateBot {
4: string IconURL (agw.key = "icon_url", api.body= "icon_url") ,
}
// 消息涉及的user信息,在home分享场景,消息属于多个user
// The user information involved in the message, sharing the scene in the home, the message belongs to multiple users
struct ConversationRelateUser {
1: optional product_common.UserInfo UserInfo (agw.key = "user_info", api.body= "user_info")
}
struct Conversation {
1: optional list<string> Snippets (agw.key = "snippets", api.body= "snippets") , // 对话示例
2: optional string Title (agw.key = "title", api.body= "title") , // 对话标题
3: optional i64 ID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key="id", api.body= "id"), // 对话IDidGen生成
4: optional bool GenTitle (agw.key = "gen_title", api.body= "gen_title") , // 是否需要生成对话
5: optional product_common.AuditStatus AuditStatus (agw.key = "audit_status", api.body= "audit_status") , // 对话审核状态
6: optional product_common.OpeningDialog OpeningDialog (agw.key = "opening_dialog", api.body= "opening_dialog") , // 开场白
7: optional map<string,ConversationRelateBot> RelateBots (agw.key = "relate_bots", api.body= "relate_bots") , // 消息涉及的bot信息,key bot_id
8: optional map<string,ConversationRelateUser> RelateUsers (agw.key = "relate_users", api.body= "relate_users") , // 消息涉及的user信息,key user_id
1: optional list<string> Snippets (agw.key = "snippets", api.body= "snippets") , // conversation example
2: optional string Title (agw.key = "title", api.body= "title") , // conversation title
3: optional i64 ID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key="id", api.body= "id"), // Conversation ID, generated by idGen
4: optional bool GenTitle (agw.key = "gen_title", api.body= "gen_title") , // Do you need to generate a conversation?
5: optional product_common.AuditStatus AuditStatus (agw.key = "audit_status", api.body= "audit_status") , // conversation moderation status
6: optional product_common.OpeningDialog OpeningDialog (agw.key = "opening_dialog", api.body= "opening_dialog") , // opening statement
7: optional map<string,ConversationRelateBot> RelateBots (agw.key = "relate_bots", api.body= "relate_bots") , // The bot information involved in the message, key bot_id
8: optional map<string,ConversationRelateUser> RelateUsers (agw.key = "relate_users", api.body= "relate_users") , // The user information involved in the message, key user_id
}
struct BotExtraInfo {
1: list<BotPublishPlatform> PublishPlatforms (agw.key = "publish_platforms", api.body= "publish_platforms") , // 发布渠道
2: i32 UserCount (agw.key = "user_count", api.body= "user_count") , // 用户数
3: product_common.ProductPublishMode PublishMode (agw.key = "publish_mode", api.body= "publish_mode") , // 公开方式
// 详情页特有
4: optional list<list<string>> ConversationSnippets (agw.key = "conversation_snippets", api.body= "conversation_snippets") , // 对话示例, 废弃
5: optional BotConfig Config (agw.key = "config", api.body= "config") , // 配置
6: optional bool IsInhouseUser (agw.key = "is_inhouse_user", api.body= "is_inhouse_user") , // 白名单
7: optional i32 DuplicateBotCount (agw.key = 'duplicate_bot_count', api.body= "duplicate_bot_count") , // 复制创建 bot 数量
8: optional list<Conversation> Conversations (agw.key = "conversations", api.body= "conversations") , // 分享对话
9: optional i64 ChatConversationCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "chat_conversation_count", api.body= "chat_conversation_count"), // 与 Bot 聊天的对话数
10: optional i64 RelatedProductCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "related_product_count", api.body= "related_product_count"), // 关联商品数
1: list<BotPublishPlatform> PublishPlatforms (agw.key = "publish_platforms", api.body= "publish_platforms") , // publish platforms
2: i32 UserCount (agw.key = "user_count", api.body= "user_count") , // user count
3: product_common.ProductPublishMode PublishMode (agw.key = "publish_mode", api.body= "publish_mode") , // public method
// Details page unique
4: optional list<list<string>> ConversationSnippets (agw.key = "conversation_snippets", api.body= "conversation_snippets") , // Dialogue example, abandoned
5: optional BotConfig Config (agw.key = "config", api.body= "config") , // configuration
6: optional bool IsInhouseUser (agw.key = "is_inhouse_user", api.body= "is_inhouse_user") , // whitelist
7: optional i32 DuplicateBotCount (agw.key = 'duplicate_bot_count', api.body= "duplicate_bot_count") , // Number of copy-created bots
8: optional list<Conversation> Conversations (agw.key = "conversations", api.body= "conversations") , // Share the conversation
9: optional i64 ChatConversationCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "chat_conversation_count", api.body= "chat_conversation_count"), // Number of conversations with Bot
10: optional i64 RelatedProductCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "related_product_count", api.body= "related_product_count"), // number of related products
}
struct WorkflowParameter {
@@ -316,21 +316,21 @@ struct WorkflowParameter {
3: bool IsRequired (agw.key = "is_required", api.body= "is_required")
4: product_common.InputType InputType (agw.key = "input_type", api.body= "input_type")
5: list<WorkflowParameter> SubParameters(agw.key = "sub_parameters", api.body= "sub_parameters")
6: product_common.InputType SubType (agw.key = "sub_type", api.body= "sub_type") // 如果Type是数组,则有subtype
7: optional string Value (agw.key = "value", api.body= "value") // 如果入参是用户手输 就放这里
6: product_common.InputType SubType (agw.key = "sub_type", api.body= "sub_type") // If Type is an array, there is a subtype
7: optional string Value (agw.key = "value", api.body= "value") // If the imported parameter is the user's hand input, put it here
8: optional product_common.PluginParamTypeFormat Format (agw.key = "format", api.body= "format")
9: optional string FromNodeId (agw.key = "from_node_id", api.body= "from_node_id")
10: optional list<string> FromOutput (agw.key = "from_output", api.body= "from_output")
11: optional i64 AssistType (agw.key = "assist_type", api.body= "assist_type")// InputType (+ AssistType) 定义一个变量的最终类型,仅需透传
12: optional string ShowName (agw.key = "show_name", api.body= "show_name") // 展示名称( store 独有的,用于详情页 GUI 展示参数)
13: optional i64 SubAssistType (agw.key = "sub_assist_type", api.body= "sub_assist_type") // 如果InputType是数组,则有subassisttype
14: optional string ComponentConfig (agw.key = "component_config", api.body= "component_config") // 组件配置,由前端解析并渲染
15: optional string ComponentType (agw.key = "component_type", api.body= "component_type") // 组件配置类型,前端展示需要
11: optional i64 AssistType (agw.key = "assist_type", api.body= "assist_type")// InputType (+ AssistType) defines the final type of a variable, which only needs to be passed through
12: optional string ShowName (agw.key = "show_name", api.body= "show_name") // Display name (unique to the store, used for details page GUI display parameters)
13: optional i64 SubAssistType (agw.key = "sub_assist_type", api.body= "sub_assist_type") // If the InputType is an array, there is a subassistant type
14: optional string ComponentConfig (agw.key = "component_config", api.body= "component_config") // Component configuration, parsed and rendered by the front end
15: optional string ComponentType (agw.key = "component_type", api.body= "component_type") // Component configuration type, required for front-end display
}
struct WorkflowTerminatePlan {
1: i32 TerminatePlanType (agw.key = "terminate_plan_type", api.body= "terminate_plan_type") // 对应 workflow 结束节点的回答模式1-返回变量由Bot生成回答2-使用设定的内容直接回答
2: string Content (agw.key = "content", api.body= "content") // 对应 terminate_plan_type = 2 的场景配置的返回内容
1: i32 TerminatePlanType (agw.key = "terminate_plan_type", api.body= "terminate_plan_type") // The answer mode corresponding to the end node of the workflow: 1 - Return the variable, and the Bot generates the answer; 2 - Use the set content to answer directly
2: string Content (agw.key = "content", api.body= "content") // Return content of scene configuration corresponding to terminate_plan_type = 2
}
struct WorkflowNodeParam {
@@ -343,12 +343,12 @@ struct WorkflowNodeInfo {
1: string NodeID (agw.key = "node_id", api.body= "node_id")
2: product_common.WorkflowNodeType NodeType (agw.key = "node_type", api.body= "node_type")
3: optional WorkflowNodeParam NodeParam (agw.key = "node_param", api.body= "node_param")
4: string NodeIconURL (agw.key = "node_icon_url", api.body= "node_icon_url") // 节点icon
5: optional string ShowName (agw.key = "show_name", api.body= "show_name"), // 展示名称( store 独有的,用于详情页 GUI 展示消息节点的名称)
4: string NodeIconURL (agw.key = "node_icon_url", api.body= "node_icon_url") // Node icon
5: optional string ShowName (agw.key = "show_name", api.body= "show_name"), // Presentation name (unique to the store, the name used for the details page GUI display message node)
}
struct WorkflowEntity {
1 : i64 ProductID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "product_id", api.body= "product_id") , // 商品ID
1 : i64 ProductID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "product_id", api.body= "product_id") , // Product ID
2 : string Name (agw.key = "name", api.body= "name") ,
3 : i64 EntityID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "entity_id", api.body= "entity_id") ,
4 : product_common.ProductEntityType EntityType (agw.key = "entity_type", api.body= "entity_type") ,
@@ -357,36 +357,36 @@ struct WorkflowEntity {
7 : string EntityName (agw.key = "entity_name", api.body= "entity_name")
8 : string Readme (agw.key = "readme", api.body= "readme")
9 : ProductCategory Category (agw.key = "category", api.body= "category")
10: optional ProductCategory RecommendedCategory (agw.key = "recommended_category", api.body= "recommended_category")// 推荐分类 ,
10: optional ProductCategory RecommendedCategory (agw.key = "recommended_category", api.body= "recommended_category")// Recommended categories,
11: optional list<WorkflowNodeInfo> Nodes (agw.key = "nodes", api.body= "nodes")
12: string Desc (agw.key = "desc", api.body= "desc")
13: optional string CaseInputIconURL (agw.key = "case_input_icon_url", api.body= "case_input_icon_url") // 入参 图片icon
14: optional string CaseOutputIconURL (agw.key = "case_output_icon_url", api.body= "case_output_icon_url") // 出参 图片icon
13: optional string CaseInputIconURL (agw.key = "case_input_icon_url", api.body= "case_input_icon_url") // Imported parameters Picture icon
14: optional string CaseOutputIconURL (agw.key = "case_output_icon_url", api.body= "case_output_icon_url") // Exported parameters Image icon
15: optional string LatestPublishCommitID (agw.key = "latest_publish_commit_id", api.body= "latest_publish_commit_id")
}
struct WorkflowGUIConfig { // 用于将 workflow 的输入/输出/中间消息节点节点转为用户可视化配置
struct WorkflowGUIConfig { // Used to convert the input/output/intermediate message node of a workflow into a user visual configuration
1: WorkflowNodeInfo StartNode (agw.key = "start_node", api.body= "start_node"),
2: WorkflowNodeInfo EndNode (agw.key = "end_node", api.body= "end_node"),
3: optional list<WorkflowNodeInfo> MessageNodes (agw.key = "message_nodes", api.body= "message_nodes"), // 消息节点会输出中间过程,也需要展示
3: optional list<WorkflowNodeInfo> MessageNodes (agw.key = "message_nodes", api.body= "message_nodes"), // The message node will output the intermediate process, which also needs to be displayed.
}
struct WorkflowExtraInfo {
1: list<WorkflowEntity> RelatedWorkflows (agw.key = "related_workflows", api.body= "related_workflows")
2: optional i32 DuplicateCount (agw.key = "duplicate_count", api.body= "duplicate_count")
3: optional string WorkflowSchema (agw.key = "workflow_schema", api.body= "workflow_schema") // workflow画布信息
3: optional string WorkflowSchema (agw.key = "workflow_schema", api.body= "workflow_schema") // Workflow canvas information
// /api/workflowV2/query schema_json
4: optional ProductCategory RecommendedCategory (agw.key = "recommended_category", api.body= "recommended_category")// 推荐分类
4: optional ProductCategory RecommendedCategory (agw.key = "recommended_category", api.body= "recommended_category")// recommended classification
5: optional list<WorkflowNodeInfo> Nodes (agw.key = "nodes", api.body= "nodes")
6: optional WorkflowNodeInfo StartNode (agw.key = "start_node", api.body= "start_node")
7: optional string EntityName (agw.key = "entity_name", api.body= "entity_name") // 实体名称(用于展示)
8: optional string CaseInputIconURL (agw.key = "case_input_icon_url", api.body= "case_input_icon_url") // 用例图入参
9: optional string CaseOutputIconURL (agw.key = "case_output_icon_url", api.body= "case_output_icon_url") // 用例图出参
10: optional i64 CaseExecuteID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "case_execute_id", api.body= "case_execute_id") // 案例执行ID
7: optional string EntityName (agw.key = "entity_name", api.body= "entity_name") // Entity name (for presentation)
8: optional string CaseInputIconURL (agw.key = "case_input_icon_url", api.body= "case_input_icon_url") // Use case diagrams imported parameters
9: optional string CaseOutputIconURL (agw.key = "case_output_icon_url", api.body= "case_output_icon_url") // Use case diagram exported parameters
10: optional i64 CaseExecuteID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "case_execute_id", api.body= "case_execute_id") // case execution ID
11: optional string HoverText (agw.key = "hover_text", api.body= "hover_text")
12: optional string LatestPublishCommitID (agw.key = "latest_publish_commit_id", api.body= "latest_publish_commit_id")
13: optional i32 UsedCount (agw.key = "used_count", api.body= "used_count") // 试运行次数,从数仓取
14: optional WorkflowGUIConfig GUIConfig (agw.key = "gui_config", api.body= "gui_config") // 用于将 workflow 的输入/输出/中间消息节点节点转为用户可视化配置
13: optional i32 UsedCount (agw.key = "used_count", api.body= "used_count") // Practice running times, take from the number of warehouses
14: optional WorkflowGUIConfig GUIConfig (agw.key = "gui_config", api.body= "gui_config") // Used to convert the input/output/intermediate message node of a workflow into a user visual configuration
}
struct SocialScenePlayerInfo {
@@ -396,36 +396,36 @@ struct SocialScenePlayerInfo {
}
struct SocialSceneExtraInfo {
1: optional list<SocialScenePlayerInfo> Players (agw.key = "players", api.body= "players") // 角色
2: i64 UsedCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "used_count", api.body= "used_count") // 使用过的人数
3: i64 StartedCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "started_count", api.body= "started_count") // 开始过的次数
4: product_common.ProductPublishMode PublishMode (agw.key = "publish_mode", api.body= "publish_mode") // 开闭源
1: optional list<SocialScenePlayerInfo> Players (agw.key = "players", api.body= "players") // role
2: i64 UsedCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "used_count", api.body= "used_count") // Number of people used
3: i64 StartedCount (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "started_count", api.body= "started_count") // number of times started
4: product_common.ProductPublishMode PublishMode (agw.key = "publish_mode", api.body= "publish_mode") // publish_mode
}
struct ProjectConfig {
1: i32 PluginCount (agw.key = "plugin_count", api.body= "plugin_count"), // 插件数量
2: i32 WorkflowCount (agw.key = "workflow_count", api.body= "workflow_count"), // 工作流数量
3: i32 KnowledgeCount (agw.key = "knowledge_count", api.body= "knowledge_count"), // 知识库数量
4: i32 DatabaseCount (agw.key = "database_count", api.body= "database_count"), // 数据库数量
1: i32 PluginCount (agw.key = "plugin_count", api.body= "plugin_count"), // number of plugins
2: i32 WorkflowCount (agw.key = "workflow_count", api.body= "workflow_count"), // number of workflows
3: i32 KnowledgeCount (agw.key = "knowledge_count", api.body= "knowledge_count"), // Number of knowledge bases
4: i32 DatabaseCount (agw.key = "database_count", api.body= "database_count"), // Number of databases
}
struct ProjectExtraInfo {
// Project 上架为模板前生成一个模板副本,使用或者复制模板,需要用 TemplateProjectID TemplateProjectVersion
// Generate a copy of the template before Project is put on the shelves. To use or copy the template, you need to use TemplateProjectID and TemplateProjectVersion
1: i64 TemplateProjectID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key="template_project_id", api.body= "template_project_id"),
2: i64 TemplateProjectVersion (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key="template_project_version", api.body= "template_project_version"),
3: list<product_common.UIPreviewType> PreviewTypes (agw.key = "preview_types", api.body= "preview_types") // Project 绑定的 UI 支持的预览类型
4: i32 UserCount (agw.key="user_count", api.body= "user_count"), // 用户数
5: i32 ExecuteCount (agw.key="execute_count", api.body= "execute_count"), // 运行数
6: list<BotPublishPlatform> PublishPlatforms (agw.key = "publish_platforms", api.body= "publish_platforms"), // 发布渠道
7: i32 DupliacateCount (agw.key = "duplicate_count", api.body= "duplicate_count"), // 近实时复制量,从数仓接口获取(复制 - 上报埋点 - 数仓计算落库)
8: optional ProjectConfig Config (agw.key = "config", api.body= "config"), // 配置
3: list<product_common.UIPreviewType> PreviewTypes (agw.key = "preview_types", api.body= "preview_types") // Project-bound UI supported preview types
4: i32 UserCount (agw.key="user_count", api.body= "user_count"), // user count
5: i32 ExecuteCount (agw.key="execute_count", api.body= "execute_count"), // number of runs
6: list<BotPublishPlatform> PublishPlatforms (agw.key = "publish_platforms", api.body= "publish_platforms"), // publish platforms
7: i32 DupliacateCount (agw.key = "duplicate_count", api.body= "duplicate_count"), // Near real-time copy volume, obtained from the data warehouse interface (copy-report event tracking-data warehouse calculation drop library)
8: optional ProjectConfig Config (agw.key = "config", api.body= "config"), // configuration
}
struct GetProductDetailRequest{
1 : optional i64 ProductID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.query = "product_id", agw.key="product_id"),
2 : optional product_common.ProductEntityType EntityType (api.body = "entity_type") ,
3 : optional i64 EntityID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", api.query = "entity_id", agw.key="entity_id") ,
4 : optional bool NeedAuditFailed (api.body = "need_audit_failed") , // 是否查看最新的审核失败草稿
4 : optional bool NeedAuditFailed (api.body = "need_audit_failed") , // Whether to check the latest audit failure draft
101: optional string ClientIP (api.header="Tt-Agw-Client-Ip") ,
255: optional base.Base Base ,
}
@@ -445,7 +445,7 @@ struct Price{
struct SKUInfo {
1: i64 ID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "id", api.body= "id"),
2: list<Price> Price (agw.key = "price", api.body= "price") , // 待废弃
2: list<Price> Price (agw.key = "price", api.body= "price") , // to be abandoned
3: string Description (agw.key = "description", api.body= "description") ,
4: list<marketplace_common.Price> PriceV2 (agw.key = "price_v2", api.body= "price_v2") ,
5: optional product_common.ChargeSKUExtra ChargeInfoExtra (agw.key = "charge_sku_info", api.body= "charge_sku_info"),
@@ -465,7 +465,7 @@ struct SellAttr {
struct SellInfo{
1: map<i64,SKUInfo> SKUs (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "skus", api.body= "skus") ,
2: list<SellAttr> Attr (agw.key = "attr", api.body= "attr") ,
3: map<string,i64> SKUAttrRef (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "sku_attr_ref", api.body= "sku_attr_ref"), // Key attrkey:attrvalue 路径,value skuID
3: map<string,i64> SKUAttrRef (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "sku_attr_ref", api.body= "sku_attr_ref"), // Key is attrkey: attrvalue path, value is skuID
}
struct Topic {
@@ -473,24 +473,24 @@ struct Topic {
2: string Name (agw.key = "name", api.body= "name") ,
3: string Description (agw.key = "description", api.body= "description") ,
4: string BannerURL (agw.key = "banner_url", api.body= "banner_url") ,
5: string BannerURLSmall (agw.key = "banner_url_small", api.body= "banner_url_small") , // 背景小图,前端优先加载
5: string BannerURLSmall (agw.key = "banner_url_small", api.body= "banner_url_small") , // Small background image, front-end priority loading
6: string Reason (agw.key = "reason", api.body= "reason") ,
7: string IntroductionURL (agw.key = "introduction_url", api.body= "introduction_url") , // 运营提供的专题介绍文档,用户可见
8: bool IsFavorite (agw.key = "is_favorite", api.body= "is_favorite") , // 用户是否收藏专题
7: string IntroductionURL (agw.key = "introduction_url", api.body= "introduction_url") , // The presentation document provided by the operation is visible to users
8: bool IsFavorite (agw.key = "is_favorite", api.body= "is_favorite") , // Does the user collect the topic?
}
struct ProductDataIndicator { // 数据分析指标,来源数仓,比如模板购买量、复制量等
1: optional i32 PurchaseCount (agw.key = "purchase_count", api.body= "purchase_count"), // 购买量
struct ProductDataIndicator { // Data analytics metrics, source number, such as template purchases, replicas, etc
1: optional i32 PurchaseCount (agw.key = "purchase_count", api.body= "purchase_count"), // purchase volume
}
struct GetProductDetailData { // 下架的商品只返回非 optional 字段
struct GetProductDetailData { // Products removed from the shelves only return non-optional fields
1 : required ProductMetaInfo MetaInfo (agw.key = "meta_info", api.body= "meta_info") ,
2 : required bool IsOwner (agw.key = "is_owner", api.body= "is_owner") , // 用以区分主/客态
3 : product_common.ProductDraftStatus AuditStatus (agw.key = "audit_status", api.body= "audit_status") , // 审核状态,主态下返回需要关注,如果主态且审核中,需要展示审核中状态
2 : required bool IsOwner (agw.key = "is_owner", api.body= "is_owner") , // To distinguish between host and guest states
3 : product_common.ProductDraftStatus AuditStatus (agw.key = "audit_status", api.body= "audit_status") , // Audit status, return in the main state, you need to pay attention. If the main state is under review, you need to show the status under review.
4 : optional SellInfo SellInfo (agw.key = "sell_info", api.body= "sell_info") ,
5 : optional i64 SpaceID (agw.js_conv="str", api.js_conv="true", agw.cli_conv="str", agw.key = "space_id", api.body= "space_id"),
6 : optional Topic Topic (agw.key = "topic", api.body= "topic") , // 详情页返回
7 : optional bool CanDuplicate (agw.key = "can_duplicate", api.body= "can_duplicate") , // 详情页返回
6 : optional Topic Topic (agw.key = "topic", api.body= "topic") , // Details page Back
7 : optional bool CanDuplicate (agw.key = "can_duplicate", api.body= "can_duplicate") , // Details page Back
8 : optional product_common.CommercialSetting CommercialSetting (agw.key = "commercial_setting", api.body= "commercial_setting")
20: optional PluginExtraInfo PluginExtra (agw.key = "plugin_extra", api.body= "plugin_extra") ,
21: optional BotExtraInfo BotExtra (agw.key = "bot_extra", api.body= "bot_extra")
@@ -501,18 +501,18 @@ struct GetProductDetailData { // 下架的商品只返回非 optional 字段
}
struct GetUserFavoriteListV2Request {
1 : optional string CursorID (api.query = "cursor_id") , // 第一页不传后续调用时传上一次返回的cursor_id
1 : optional string CursorID (api.query = "cursor_id") , // The first page is not passed, and the last returned cursor_id is passed when subsequent calls are made
2 : required i32 PageSize (api.query = "page_size") ,
3 : optional product_common.ProductEntityType EntityType (api.query = "entity_type"),
4 : required product_common.SortType SortType (api.query = "sort_type") ,
5 : optional string Keyword (api.query = "keyword") , // 不为空则搜索
6 : optional product_common.FavoriteListSource Source (api.query = "source") , // 列表页 tab
7 : optional bool NeedUserTriggerConfig (api.query = "need_user_trigger_config") // 是否需要查询用户对Bot的触发器配置为true时才会返回EntityUserTriggerConfig
8 : optional i64 BeginAt (api.query = "begin_at", api.js_conv="true") , // 筛选收藏时间
9 : optional i64 EndAt (api.query = "end_at", api.js_conv="true") , // 筛选收藏时间
5 : optional string Keyword (api.query = "keyword") , // Search keyword,optional
6 : optional product_common.FavoriteListSource Source (api.query = "source") , // List page tab
7 : optional bool NeedUserTriggerConfig (api.query = "need_user_trigger_config") // Whether you need to query the user's trigger configuration for the Bot, when true, it will return EntityUserTriggerConfig
8 : optional i64 BeginAt (api.query = "begin_at", api.js_conv="true") , // Filter collection time
9 : optional i64 EndAt (api.query = "end_at", api.js_conv="true") , // Filter collection time
10 : optional list<product_common.ProductEntityType> EntityTypes (api.query = "entity_types"),
11 : optional i64 OrganizationID (agw.js_conv="str", agw.cli_conv="str", api.query = "organization_id"), // 组织ID企业版想获取用户收藏的所有内容时需传递
11 : optional i64 OrganizationID (agw.js_conv="str", agw.cli_conv="str", api.query = "organization_id"), // Organization ID, Enterprise Edition needs to be passed when you want to get all the content in the user's collection
255: optional base.Base Base ,
}
@@ -530,7 +530,7 @@ struct GetUserFavoriteListDataV2{
1: list<product_common.FavoriteEntity> FavoriteEntities (agw.key = "favorite_entities", api.body="favorite_entities"),
2: string CursorID (agw.key = "cursor_id", api.body="cursor_id") ,
3: bool HasMore (agw.key = "has_more", api.body="has_more") ,
// 用户定时任务配置对应flow.bot.task服务的TriggerEnabled
// User timed task configuration, corresponding to flow.bot TriggerEnabled of the task service
4: map<i64, UserTriggerConfig> EntityUserTriggerConfig (agw.key = "entity_user_trigger_config", api.body="entity_user_trigger_config"), // key: entity_id; value: UserTriggerConfig
}
@@ -563,7 +563,7 @@ struct DuplicateProductResponse {
}
struct DuplicateProductData {
// 复制后的新id
// New ID after copy
1: i64 NewEntityID (agw.js_conv="str", api.js_conv="str", agw.cli_conv="str", api.body = "new_entity_id")
2: optional i64 NewPluginID (agw.js_conv="str", api.js_conv="str", agw.cli_conv="str", api.body = "new_plugin_id") // workflow对应的插件id
2: optional i64 NewPluginID (agw.js_conv="str", api.js_conv="str", agw.cli_conv="str", api.body = "new_plugin_id") // Plugin ID for workflow
}

View File

@@ -2,14 +2,14 @@ include "../../base.thrift"
namespace go flow.marketplace.marketplace_common
struct Price {
1: i64 Amount (agw.key = "amount",agw.js_conv="str",api.js_conv="true",agw.cli_conv="str",api.body= "amount"), // 金额
2: string Currency (agw.key = "currency",api.body= "currency") , // 币种如USD、CNY
3: byte DecimalNum (agw.key = "decimal_num",api.body= "decimal_num") , // 小数位数
1: i64 Amount (agw.key = "amount",agw.js_conv="str",api.js_conv="true",agw.cli_conv="str",api.body= "amount"), // amount
2: string Currency (agw.key = "currency",api.body= "currency") , // Currencies such as USD and CNY
3: byte DecimalNum (agw.key = "decimal_num",api.body= "decimal_num") , // decimal places
}
enum FollowType {
Unknown = 0, // 无关系
Followee = 1, // 关注
Follower = 2, // 粉丝
MutualFollow = 3, // 互相关注
Unknown = 0, // Unknown
Followee = 1, // followee
Follower = 2, // follower
MutualFollow = 3, // MutualFollow
}

View File

@@ -10,18 +10,18 @@ struct UserLabel {
struct User {
1: i64 user_id (agw.js_conv="str", api.js_conv="true"),
2: string nickname, // 用户昵称
3: string avatar_url, // 用户头像
4: string user_unique_name, // 用户名
5: UserLabel user_label, // 用户标签
2: string nickname, // user nickname
3: string avatar_url, // user avatar
4: string user_unique_name, // user name
5: UserLabel user_label, // user tag
}
/****************************** audit **********************************/
enum AuditStatus {
Auditing = 0, // 审核中
Success = 1, // 审核通过
Failed = 2, // 审核失败
Auditing = 0, // Under review.
Success = 1, // approved
Failed = 2, // audit failed
}
struct AuditInfo {
@@ -30,10 +30,10 @@ struct AuditInfo {
3: optional string commit_version,
}
// 审核结果
// Audit results
struct AuditData {
1: bool check_not_pass // true机审校验不通过
2: optional string check_not_pass_msg // 机审校验不通过文案
1: bool check_not_pass // True: The machine audit verification failed
2: optional string check_not_pass_msg // The machine audit verification failed the copy.
}
@@ -75,9 +75,9 @@ enum OrderByType {
}
enum PermissionType {
NoDetail = 1 //不能查看详情
Detail = 2 //可以查看详情
Operate = 3 //可以查看和操作
NoDetail = 1 //Can't view details
Detail = 2 //You can check the details.
Operate = 3 //Can be viewed and operated
}
enum SpaceStatus {

View File

@@ -4,10 +4,10 @@ enum IntelligenceStatus {
Using = 1,
Deleted = 2,
Banned = 3,
MoveFailed = 4, // 迁移失败
MoveFailed = 4, // Migration failed
Copying = 5, // 复制中
CopyFailed = 6, // 复制失败
Copying = 5, // Copying
CopyFailed = 6, // Copy failed
}
enum IntelligenceType {

View File

@@ -1,3 +1,3 @@
struct ProjectInnerTaskInfo {
1: i64 task_id (agw.js_conv="str",api.js_conv="true") // 任务id
1: i64 task_id (agw.js_conv="str",api.js_conv="true") // Task ID
}

View File

@@ -8,7 +8,7 @@ struct DraftProjectCreateRequest {
3 : string description,
4 : string icon_uri ,
5 : optional MonetizationConf monetization_conf,
6 : optional string create_from, // 创建来源 navi:导航栏 space:空间
6 : optional string create_from, // Create source navi: navbar space: space
255: optional base.Base Base (api.none="true") ,

View File

@@ -32,62 +32,62 @@ struct PublishConnectorListResponse {
struct PublishConnectorListData {
1: list<PublishConnectorInfo> connector_list
2: LastPublishInfo last_publish_info
3: map<i64, ConnectorUnionInfo> connector_union_info_map // 渠道集合信息key是connector_union_id
3: map<i64, ConnectorUnionInfo> connector_union_info_map // Channel collection information, the key is connector_union_id
}
struct PublishConnectorInfo {
1: required i64 id (agw.js_conv="str", api.js_conv="true")
2: required string name
3: required string icon_url
4: required string description // 描述
5: string description_extra // 描述扩展
6: required ConnectorClassification connector_classification // 渠道类型
7: required ConnectorConfigStatus config_status // 配置状态
8: ConnectorStatus connector_status // 渠道状态
9: required ConnectorBindType bind_type // 绑定类型
10: required map<string,string> bind_info // 绑定信息 key字段名 value是值
11: optional string bind_id // 绑定id信息用于解绑使用
12: optional AuthLoginInfo auth_login_info // 用户授权登陆信息
13: string privacy_policy // 隐私政策
14: string user_agreement // 用户协议
15: bool allow_publish // 是否允许发布
16: optional string not_allow_publish_reason // 不允许发布的原因
17: optional i64 connector_union_id (agw.js_conv="str", api.js_conv="true") // 渠道集合id表示需要聚合展示的渠道
18: optional list<UIOption> UIOptions // UI选项
19: optional bool support_monetization // 支持商业化
20: optional string installation_guide // 安装指引
21: optional UserAuthStatus auth_status // 目前仅 bind_type == 8 时这个字段才有
22: optional string config_status_toast // 配置状态toast
23: optional string to_complete_info_url // connector_status为审核中时补全信息按钮的url
24: optional string connector_tips // 渠道发布提示
4: required string description // describe
5: string description_extra // description extension
6: required ConnectorClassification connector_classification // channel type
7: required ConnectorConfigStatus config_status // configuration status
8: ConnectorStatus connector_status // channel status
9: required ConnectorBindType bind_type // binding type
10: required map<string,string> bind_info // Binding information key field name value is value
11: optional string bind_id // Bind id information for unbinding and use
12: optional AuthLoginInfo auth_login_info // user authorization login information
13: string privacy_policy // Privacy Policy
14: string user_agreement // User Agreement
15: bool allow_publish // Whether to allow publishing
16: optional string not_allow_publish_reason // Reasons for not allowing publishing
17: optional i64 connector_union_id (agw.js_conv="str", api.js_conv="true") // Channel collection id, indicating the channel that needs to be aggregated and displayed.
18: optional list<UIOption> UIOptions // UI Options
19: optional bool support_monetization // Support commercialization
20: optional string installation_guide // Installation Guidelines
21: optional UserAuthStatus auth_status // Currently this field is only available bind_type == 8
22: optional string config_status_toast // Configuration status toast
23: optional string to_complete_info_url // connector_status the URL of the Complete Info button while under review
24: optional string connector_tips // Channel release tips
}
struct LastPublishInfo {
1: string version_number
2: list<i64> connector_ids (agw.js_conv="str", api.js_conv="true")
3: map<i64,ConnectorPublishConfig> connector_publish_config // 渠道发布配置
3: map<i64,ConnectorPublishConfig> connector_publish_config // channel release configuration
}
enum ConnectorClassification {
APIOrSDK = 1 // api或sdk
SocialPlatform = 2 // 社交平台
Coze = 3 // Coze商店/模板
MiniProgram = 4 // 小程序
CozeSpaceExtensionLibrary = 5 // MCP扩展库
APIOrSDK = 1 // API or SDK
SocialPlatform = 2 // social platform
Coze = 3 // Coze Shop/Template
MiniProgram = 4 // Mini Program
CozeSpaceExtensionLibrary = 5 // MCP Extension Library
}
enum ConnectorConfigStatus {
Configured = 1 // 已配置
NotConfigured = 2 // 未配置
Disconnected = 3 // Token发生变化
Configuring = 4 // 配置中,授权中
NeedReconfiguring = 5 // 需要重新配置
Configured = 1 // Configured
NotConfigured = 2 // Not configured
Disconnected = 3 // Token changes
Configuring = 4 // Configuring, authorizing
NeedReconfiguring = 5 // Need to reconfigure
}
enum ConnectorStatus {
Normal = 0 // 正常
InReview = 1 // 审核中
Offline = 2 // 已下线
Normal = 0 // Normal
InReview = 1 // Under review.
Offline = 2 // offline
}
struct ConnectorUnionInfo {
@@ -99,15 +99,15 @@ struct ConnectorUnionInfo {
}
enum ConnectorBindType {
NoBindRequired = 1 // 无需绑定
AuthBind = 2 // Auth绑定
KvBind = 3 // Kv绑定
KvAuthBind = 4 // Kv并Auth授权
ApiBind = 5 // api渠道绑定
NoBindRequired = 1 // No binding required
AuthBind = 2 // Auth binding
KvBind = 3 // Kv binding
KvAuthBind = 4 // Kv and Auth authorization
ApiBind = 5 // API channel binding
WebSDKBind = 6
StoreBind = 7
AuthAndConfig = 8 // 授权和配置各一个按钮
TemplateBind = 9 // 模板渠道绑定
AuthAndConfig = 8 // One button each for authorization and configuration
TemplateBind = 9 // template channel binding
}
struct AuthLoginInfo {
@@ -122,24 +122,24 @@ struct AuthLoginInfo {
}
struct UIOption {
1: i64 ui_channel (agw.js_conv="str", api.js_conv="true") // UIChannel选项
2: bool available // 是否可选
3: string unavailable_reason // 不可选原因
1: i64 ui_channel (agw.js_conv="str", api.js_conv="true") // UIChannel Options
2: bool available // Is it optional
3: string unavailable_reason // unselectable reason
}
enum UserAuthStatus {
Authorized = 1 // 已授权
UnAuthorized = 2 // 未授权
Authorizing = 3 // 授权中
Authorized = 1 // Authorized
UnAuthorized = 2 // unauthorized
Authorizing = 3 // Authorizing
}
struct ConnectorPublishConfig {
1: list<SelectedWorkflow> selected_workflows // 发布渠道选择的Workflow/ChatFlow
1: list<SelectedWorkflow> selected_workflows // Workflow/ChatFlow selected by publishing channel
}
struct ConnectorUnionInfoOption {
1: required i64 connector_id (agw.js_conv="str", api.js_conv="true") // 渠道 ID
2: required string show_name // 展示名,如:托管发布、下载代码
1: required i64 connector_id (agw.js_conv="str", api.js_conv="true") // Channel ID
2: required string show_name // Display name, such as: hosted release, download code
}
struct SelectedWorkflow {
@@ -168,10 +168,10 @@ struct CheckProjectVersionNumberData {
struct PublishProjectRequest {
1: required i64 project_id (agw.js_conv="str", api.js_conv="true")
2: required string version_number // 版本号
3: optional string description // 描述
4: optional map<i64,map<string,string>> connectors // key代表connector_idvalue是渠道发布的参数
5: optional map<i64,ConnectorPublishConfig> connector_publish_config // 渠道发布配置key代表connector_id
2: required string version_number // version number
3: optional string description // describe
4: optional map<i64,map<string,string>> connectors // The key represents connector_id, and the value is the parameter published by the channel
5: optional map<i64,ConnectorPublishConfig> connector_publish_config // Channel release configuration, key represents connector_id
255: optional base.Base Base (api.none="true")
}
@@ -185,8 +185,8 @@ struct PublishProjectResponse {
}
struct PublishProjectData {
1: i64 publish_record_id (agw.js_conv="str", api.js_conv="true") // 发布记录ID用于前端轮询
2: optional bool publish_monetization_result // 收费配置发布结果,海外环境才有
1: i64 publish_record_id (agw.js_conv="str", api.js_conv="true") // Publish record ID for front-end polling
2: optional bool publish_monetization_result // The charging configuration is released, and the overseas environment is only available.
}
struct GetPublishRecordListRequest {
@@ -206,44 +206,44 @@ struct GetPublishRecordListResponse {
struct PublishRecordDetail {
1: i64 publish_record_id (agw.js_conv="str", api.js_conv="true")
2: string version_number
3: PublishRecordStatus publish_status // 发布状态
4: string publish_status_msg // 该字段废弃,请使用publish_status_detail
5: optional list<ConnectorPublishResult> connector_publish_result // 渠道发布结果
6: optional PublishRecordStatusDetail publish_status_detail // 发布状态补充信息
3: PublishRecordStatus publish_status // release status
4: string publish_status_msg // This field is deprecated, please use publish_status_detail
5: optional list<ConnectorPublishResult> connector_publish_result // Channel release results
6: optional PublishRecordStatusDetail publish_status_detail // Release status Supplementary information
}
enum PublishRecordStatus {
Packing = 0 // 打包中
PackFailed = 1 // 打包失败
Auditing = 2 // 审核中
AuditNotPass = 3 // 审核未通过
ConnectorPublishing = 4 // 渠道发布中
PublishDone = 5 // 发布完成
Packing = 0 // Packing
PackFailed = 1 // Packaging failed
Auditing = 2 // Under review.
AuditNotPass = 3 // review disapproved
ConnectorPublishing = 4 // Channel is being released.
PublishDone = 5 // release complete
}
struct ConnectorPublishResult {
1: i64 connector_id (agw.js_conv="str", api.js_conv="true")
2: string connector_name
3: string connector_icon_url
4: ConnectorPublishStatus connector_publish_status // 渠道发布状态
5: string connector_publish_status_msg // 渠道发布状态补充信息
6: optional string share_link // OpenIn链接
7: optional string download_link // 小程序渠道下载链接
8: optional ConnectorPublishConfig connector_publish_config // 渠道发布配置
9: optional map<string,string> connector_bind_info // 渠道绑定信息 key字段名 value是值
4: ConnectorPublishStatus connector_publish_status // channel release status
5: string connector_publish_status_msg // Channel Release Status Supplementary Information
6: optional string share_link // OpenIn Link
7: optional string download_link // Mini Program Channel Download Link
8: optional ConnectorPublishConfig connector_publish_config // channel release configuration
9: optional map<string,string> connector_bind_info // Channel binding information key field name value is value
}
struct PublishRecordStatusDetail {
1: optional list<PackFailedDetail> pack_failed_detail // 打包失败详情
1: optional list<PackFailedDetail> pack_failed_detail // Packaging failure details
}
//project
enum ConnectorPublishStatus {
Default = 0 // 发布中
Auditing = 1 // 审核中
Success = 2 // 成功
Failed = 3 // 失败
Disable = 4 //禁用
Default = 0 // In release
Auditing = 1 // Under review.
Success = 2 // success
Failed = 3 // fail
Disable = 4 //disable
}
struct PackFailedDetail {
@@ -254,7 +254,7 @@ struct PackFailedDetail {
struct GetPublishRecordDetailRequest {
1: required i64 project_id (agw.js_conv="str", api.js_conv="true")
2: optional i64 publish_record_id (agw.js_conv="str", api.js_conv="true") // 不传则获取最近一次发布记录
2: optional i64 publish_record_id (agw.js_conv="str", api.js_conv="true") // If you don't upload it, get the last release record.
255: optional base.Base Base (api.none="true")
}

View File

@@ -21,7 +21,7 @@ enum SearchScope {
}
struct GetDraftIntelligenceListOption {
1: bool need_replica, // 是否需要个人版本Bot数据
1: bool need_replica, //need personal version Bot data
}
struct GetDraftIntelligenceListRequest {
@@ -51,13 +51,13 @@ struct IntelligencePublishInfo {
struct IntelligencePermissionInfo {
1: bool in_collaboration,
2: bool can_delete, // 当前用户是否可删除
3: bool can_view, // 当前用户是否可查看当前判断逻辑为用户是否在bot所在空间
2: bool can_delete, // can delete
3: bool can_view, // Whether the current user can view it, the current judgment logic is whether the user is in the space where the bot is located
}
struct FavoriteInfo {
1: bool is_fav, // 是否收藏;收藏列表使用
2: string fav_time, // 收藏时间;收藏列表使用
1: bool is_fav, // Whether to collect; use the collection list
2: string fav_time, // Collection time; collection list use
}
enum BotMode {
@@ -67,19 +67,19 @@ enum BotMode {
}
struct OtherInfo {
1: string recently_open_time, // 最近打开时间;最近打开筛选时使用
2: BotMode bot_mode, // 仅bot类型返回
1: string recently_open_time, // Last opened time; used when recently opened filter
2: BotMode bot_mode, // Only bot type returns
}
struct Intelligence {
1: intelligence_common_struct.IntelligenceBasicInfo basic_info, // 基本信息
2: intelligence_common_struct.IntelligenceType type, // 智能体类型
3: IntelligencePublishInfo publish_info, // 智能体发布信息,可选
4: common_struct.User owner_info, // 智能体所有者信息,可选
5: IntelligencePermissionInfo permission_info, // 当前用户对智能体的权限信息,可选
1: intelligence_common_struct.IntelligenceBasicInfo basic_info, // Basic information
2: intelligence_common_struct.IntelligenceType type, // Agent Type
3: IntelligencePublishInfo publish_info, // Agent publishes information, optional
4: common_struct.User owner_info, // Agent owner information, optional
5: IntelligencePermissionInfo permission_info, // The current user's permission information to the agent, optional
}
// For前端
// For the front end
struct IntelligenceData {
1: intelligence_common_struct.IntelligenceBasicInfo basic_info,
2: intelligence_common_struct.IntelligenceType type,
@@ -110,7 +110,7 @@ struct GetDraftIntelligenceListResponse {
struct GetDraftIntelligenceInfoRequest {
1: i64 intelligence_id (agw.js_conv="str", api.js_conv="true"),
2: intelligence_common_struct.IntelligenceType intelligence_type,
3: optional i64 version (agw.js_conv="str", api.js_conv="true"), // 预览版本时传入
3: optional i64 version (agw.js_conv="str", api.js_conv="true"), // Pass in when previewing the version
255: optional base.Base Base
}
@@ -133,8 +133,8 @@ struct GetDraftIntelligenceInfoResponse {
struct GetUserRecentlyEditIntelligenceRequest {
1: i32 size,
2: optional list<intelligence_common_struct.IntelligenceType> types,
3: optional string enterprise_id, // 企业id
4: optional string organization_id, // 组织id
3: optional string enterprise_id, // Enterprise ID
4: optional string organization_id, // organization id
255: optional base.Base Base
}

View File

@@ -5,7 +5,7 @@ struct AppUserInfo {
}
struct User {
// 与原接口字段名对齐
// Align with the original interface field name
1: required i64 user_id_str (agw.js_conv="str", api.js_conv="true")
2: required string name
3: required string user_unique_name
@@ -105,20 +105,20 @@ struct UserUpdateProfileResponse {
service PassportService {
// 邮箱密码注册
// Email password registration
PassportWebEmailRegisterV2PostResponse PassportWebEmailRegisterV2Post(1: PassportWebEmailRegisterV2PostRequest req) (api.post="/api/passport/web/email/register/v2/")
// 退出登录
// log out
PassportWebLogoutGetResponse PassportWebLogoutGet(1: PassportWebLogoutGetRequest req) (api.get="/api/passport/web/logout/")
// 邮箱帐密登录
// Email account password login
PassportWebEmailLoginPostResponse PassportWebEmailLoginPost(1: PassportWebEmailLoginPostRequest req) (api.post="/api/passport/web/email/login/")
// 通过邮箱重置密码
// Reset password via email
PassportWebEmailPasswordResetGetResponse PassportWebEmailPasswordResetGet(1: PassportWebEmailPasswordResetGetRequest req) (api.get="/api/passport/web/email/password/reset/")
// 账号信息
// account information
PassportAccountInfoV2Response PassportAccountInfoV2(1: PassportAccountInfoV2Request req) (api.post="/api/passport/account/info/v2/")

View File

@@ -14,9 +14,9 @@ const UserStatus deactivated = "deactivated"
const UserStatus offboarded = "offboarded"
struct CreatePersonalAccessTokenAndPermissionRequest {
1: required string name // PAT名称
2: i64 expire_at // PAT自定义过期时间
3: string duration_day // PAT用户枚举过期时间 1、30、60、90、180365permanent
1: required string name // PAT name
2: i64 expire_at // PAT custom expiration time
3: string duration_day // PAT user enumeration expiration time 1, 30, 60, 90, 180, 365, permanent
4: string organization_id // organization id
}
@@ -26,13 +26,13 @@ struct PersonalAccessToken {
2: required string name
3: required i64 created_at
4: required i64 updated_at
5: required i64 last_used_at // -1 表示未使用
6: required i64 expire_at // -1 表示无限期
5: required i64 last_used_at // -1 means unused
6: required i64 expire_at // -1 means indefinite
}
struct CreatePersonalAccessTokenAndPermissionResponseData {
1: required PersonalAccessToken personal_access_token
2: required string token // PAT token 明文
2: required string token // PAT token plaintext
}
struct CreatePersonalAccessTokenAndPermissionResponse {
@@ -55,8 +55,8 @@ struct PersonalAccessTokenWithCreatorInfo {
2: required string name
3: required i64 created_at
4: required i64 updated_at
5: required i64 last_used_at // -1 表示未使用
6: required i64 expire_at // -1 表示无限期
5: required i64 last_used_at // -1 means unused
6: required i64 expire_at // -1 means indefinite
7: string creator_name
8: string creator_unique_name
9: string creator_avatar_url
@@ -72,8 +72,8 @@ struct ListPersonalAccessTokensResponse {
}
struct ListPersonalAccessTokensResponseData {
1: required list<PersonalAccessTokenWithCreatorInfo> personal_access_tokens // PAT 列表
2: bool has_more // 是否还有更多数据
1: required list<PersonalAccessTokenWithCreatorInfo> personal_access_tokens // PAT list
2: bool has_more // Is there any more data?
}
@@ -102,7 +102,7 @@ struct GetPersonalAccessTokenAndPermissionResponse {
struct UpdatePersonalAccessTokenAndPermissionRequest {
1: required i64 id (api.js_conv="true") // PAT Id
2: string name // PAT 名称
2: string name // PAT name
}
struct UpdatePersonalAccessTokenAndPermissionResponse {

View File

@@ -14,19 +14,19 @@ struct UpdateDraftBotInfoAgwResponse {
}
struct UpdateDraftBotInfoAgwData {
1: optional bool has_change // 是否有变更
2: bool check_not_pass // true机审校验不通过
3: optional Branch branch // 当前是在哪个分支
1: optional bool has_change // Is there any change?
2: bool check_not_pass // True: The machine audit verification failed
3: optional Branch branch // Which branch is it currently on?
4: optional bool same_with_online
5: optional string check_not_pass_msg // 机审校验不通过文案
5: optional string check_not_pass_msg // The machine audit verification failed the copy.
}
// 分支
// branch
enum Branch {
Undefined = 0
PersonalDraft = 1 // 草稿
Base = 2 // space草稿
Publish = 3 // 线上版本,diff场景下使用
PersonalDraft = 1 // draft
Base = 2 // Space draft
Publish = 3 // Online version, used in diff scenarios
}
struct UpdateDraftBotInfoAgwRequest {
@@ -37,9 +37,9 @@ struct UpdateDraftBotInfoAgwRequest {
}
struct GetDraftBotInfoAgwRequest {
1: required i64 bot_id (api.js_conv='true',agw.js_conv="str") // 草稿bot_id
2: optional string version // 查历史记录历史版本的id对应 bot_draft_history的id
3: optional string commit_version // 查询指定commit_version版本预发布使用貌似和version是同一个东西但是获取逻辑有区别
1: required i64 bot_id (api.js_conv='true',agw.js_conv="str") // Draft bot_id
2: optional string version // Check the history, the id of the historical version, corresponding to the id of the bot_draft_history
3: optional string commit_version // Query specifies commit_version version, pre-release use, seems to be the same thing as version, but the acquisition logic is different
255: base.Base Base (api.none="true")
}
@@ -53,43 +53,43 @@ struct GetDraftBotInfoAgwResponse {
}
struct GetDraftBotInfoAgwData {
1: required bot_common.BotInfo bot_info // 核心bot数据
2: optional BotOptionData bot_option_data // bot选项信息
3: optional bool has_unpublished_change // 是否有未发布的变更
4: optional BotMarketStatus bot_market_status // bot上架后的商品状态
5: optional bool in_collaboration // bot是否处于多人协作模式
6: optional bool same_with_online // commit内容是否和线上内容一致
7: optional bool editable // for前端权限相关当前用户是否可编辑此bot
8: optional bool deletable // for前端权限相关当前用户是否可删除此bot
9: optional UserInfo publisher // 是最新发布版本时传发布人
10: bool has_publish // 是否已发布
11: i64 space_id (api.js_conv='true',agw.js_conv="str") // 空间id
12: list<BotConnectorInfo> connectors // 发布的业务线详情
13: optional Branch branch // 获取的是什么分支的内容
14: optional string commit_version // 如果branch=PersonalDraft,则为checkout/rebase的版本号;如果branch=base,则为提交的版本
15: optional string committer_name // for前端最近一次的提交人
16: optional string commit_time // for前端提交时间
17: optional string publish_time // for前端发布时间
18: optional BotCollaboratorStatus collaborator_status // 多人协作相关操作权限
19: optional AuditInfo latest_audit_info // 最近一次审核详情
20: optional string app_id // 抖音分身的bot会有appId
1: required bot_common.BotInfo bot_info // core bot data
2: optional BotOptionData bot_option_data // bot option information
3: optional bool has_unpublished_change // Are there any unpublished changes?
4: optional BotMarketStatus bot_market_status // The product status after the bot is put on the shelves
5: optional bool in_collaboration // Is the bot in multiplayer cooperative mode?
6: optional bool same_with_online // Is the content committed consistent with the online content?
7: optional bool editable // For frontend, permission related, can the current user edit this bot
8: optional bool deletable // For frontend, permission related, can the current user delete this bot
9: optional UserInfo publisher // Is the publisher of the latest release version
10: bool has_publish // Has it been published?
11: i64 space_id (api.js_conv='true',agw.js_conv="str") // Space ID
12: list<BotConnectorInfo> connectors // Published business line details
13: optional Branch branch // What branch did you get the content of?
14: optional string commit_version // If branch=PersonalDraft, the version number of checkout/rebase; if branch = base, the committed version
15: optional string committer_name // For the front end, the most recent author
16: optional string commit_time // For frontend, commit time
17: optional string publish_time // For frontend, release time
18: optional BotCollaboratorStatus collaborator_status // Multi-person collaboration related operation permissions
19: optional AuditInfo latest_audit_info // Details of the most recent review
20: optional string app_id // Douyin's doppelganger bot will have appId.
}
struct BotOptionData {
1: optional map<i64,ModelDetail> model_detail_map // 模型详情
2: optional map<i64,PluginDetal> plugin_detail_map // 插件详情
3: optional map<i64,PluginAPIDetal> plugin_api_detail_map // 插件API详情
4: optional map<i64,WorkflowDetail> workflow_detail_map // workflow详情
5: optional map<string,KnowledgeDetail> knowledge_detail_map // knowledge详情
6: optional list<shortcut_command.ShortcutCommand> shortcut_command_list // 快捷指令list
1: optional map<i64,ModelDetail> model_detail_map // model details
2: optional map<i64,PluginDetal> plugin_detail_map // plugin details
3: optional map<i64,PluginAPIDetal> plugin_api_detail_map // Plugin API Details
4: optional map<i64,WorkflowDetail> workflow_detail_map // Workflow Details
5: optional map<string,KnowledgeDetail> knowledge_detail_map // Knowledge Details
6: optional list<shortcut_command.ShortcutCommand> shortcut_command_list // Quick command list
}
struct ModelDetail {
1: optional string name // 模型展示名(对用户)
2: optional string model_name // 模型名(对内部)
3: optional i64 model_id (agw.js_conv="str" api.js_conv="true") // 模型ID
4: optional i64 model_family // 模型类别
1: optional string name // Model display name (to the user)
2: optional string model_name // Model name (for internal)
3: optional i64 model_id (agw.js_conv="str" api.js_conv="true") // Model ID
4: optional i64 model_family // Model Category
5: optional string model_icon_url // IconURL
}
@@ -117,7 +117,7 @@ struct PluginParameter {
3: optional bool is_required
4: optional string type
5: optional list<PluginParameter> sub_parameters
6: optional string sub_type // 如果Type是数组,则有subtype
6: optional string sub_type // If Type is an array, there is a subtype
7: optional i64 assist_type
}
@@ -127,8 +127,8 @@ struct WorkflowDetail {
3: optional string description
4: optional string icon_url
5: optional i64 status
6: optional i64 type // 类型1:官方模版
7: optional i64 plugin_id (agw.js_conv="str" api.js_conv="true") // workfklow对应的插件id
6: optional i64 type // Type 1: Official Template
7: optional i64 plugin_id (agw.js_conv="str" api.js_conv="true") // Plugin ID corresponding to workfklow
8: optional bool is_official
9: optional PluginAPIDetal api_detail
}
@@ -142,21 +142,21 @@ struct KnowledgeDetail {
enum DataSetType {
Text = 0 // 文本
Table = 1 // 表格
Image = 2 // 图片
Text = 0 // Text
Table = 1 // table
Image = 2 // image
}
enum BotMarketStatus {
Offline = 0 // 下架
Online = 1 // 上架
Offline = 0 // offline
Online = 1 // put on the shelves
}
struct UserInfo {
1: i64 user_id (api.js_conv='true',agw.js_conv="str") // 用户id
2: string name // 用户名称
3: string icon_url // 用户图标
1: i64 user_id (api.js_conv='true',agw.js_conv="str") // user id
2: string name // user name
3: string icon_url // user icon
}
struct BotConnectorInfo {
@@ -175,9 +175,9 @@ enum ConnectorDynamicStatus {
struct BotCollaboratorStatus {
1: bool commitable // 当前用户是否可以提交
2: bool operateable // 当前用户是否可运维
3: bool manageable // 当前用户是否可管理协作者
1: bool commitable // Can the current user submit?
2: bool operateable // Is the current user operable?
3: bool manageable // Can the current user manage collaborators?
}
struct AuditInfo {
@@ -192,38 +192,38 @@ struct AuditResult {
}
enum AuditStatus {
Auditing = 0, // 审核中
Success = 1, // 审核通过
Failed = 2, // 审核失败
Auditing = 0, // Under review.
Success = 1, // approved
Failed = 2, // audit failed
}
// Onboarding json结构
// Onboarding json structure
struct OnboardingContent {
1: optional string prologue // 开场白C端使用场景只有1个后台场景可能为多个
2: optional list<string> suggested_questions // 建议问题
1: optional string prologue // Introductory remarks (C-end usage scenarios, only 1; background scenarios, possibly multiple)
2: optional list<string> suggested_questions // suggestion question
3: optional bot_common.SuggestedQuestionsShowMode suggested_questions_show_mode
}
enum ScopeType {
All = 0 // 企业下所有的(企业下生效)
Self = 1 // 我加入的(企业&个人都生效不传默认Self
All = 0 // All under the enterprise (effective under the enterprise)
Self = 1 // I joined (both companies and individuals are valid, no default self is passed on)
}
struct GetSpaceListV2Request {
1: optional string search_word // 搜索词
2: optional i64 enterprise_id (api.js_conv='true',agw.js_conv="str") // 企业id
3: optional i64 organization_id (api.js_conv='true',agw.js_conv="str") // 组织id
4: optional ScopeType scope_type // 范围类型
5: optional i32 page // 分页信息
6: optional i32 size // 分页大小 -- page size不传则认为不分页
1: optional string search_word // Search term
2: optional i64 enterprise_id (api.js_conv='true',agw.js_conv="str") // Enterprise ID
3: optional i64 organization_id (api.js_conv='true',agw.js_conv="str") // organization id
4: optional ScopeType scope_type // range type
5: optional i32 page // paging information
6: optional i32 size // Paging size -- if page and size are not passed on, it is considered not paging
255: optional base.Base Base (api.none="true")
}
enum SpaceType {
Personal = 1 // 个人
Team = 2 // 小组
Personal = 1 // individual
Team = 2 // group
}
enum SpaceMode {
@@ -232,22 +232,22 @@ enum SpaceMode {
}
enum SpaceTag {
Professional = 1 // 专业版
Professional = 1 // Professional Edition
}
enum SpaceRoleType {
Default = 0 // 默认
Default = 0 // default
Owner = 1 // owner
Admin = 2 // 管理员
Member = 3 // 普通成员
Admin = 2 // administrator
Member = 3 // ordinary member
}
// 申请管理列表
// Application management list
enum SpaceApplyStatus {
All = 0 // 所有
Joined = 1 // 已加入
Confirming = 2 // 确认中
Rejected = 3 // 已拒绝
All = 0 // all
Joined = 1 // Joined
Confirming = 2 // Confirming
Rejected = 3 // Rejected
}
struct AppIDInfo{
@@ -263,37 +263,37 @@ struct ConnectorInfo{
}
struct BotSpaceV2 {
1: i64 id (api.js_conv='true',agw.js_conv="str") // 空间id新建为0
2: list<AppIDInfo> app_ids // 发布平台
3: string name // 空间名称
4: string description // 空间描述
5: string icon_url // 图标url
6: SpaceType space_type // 空间类型
7: list<ConnectorInfo> connectors // 发布平台
8: bool hide_operation // 是否隐藏新建,复制删除按钮
9: i32 role_type // 在team中的角色 1-owner 2-admin 3-member
10: optional SpaceMode space_mode // 空间模式
11: bool display_local_plugin // 是否显示端侧插件创建入口
12: SpaceRoleType space_role_type // 角色类型,枚举
13: optional SpaceTag space_tag // 空间标签
14: optional i64 enterprise_id (api.js_conv='true',agw.js_conv="str") // 企业id
15: optional i64 organization_id (api.js_conv='true',agw.js_conv="str") // 组织id
16: optional i64 owner_user_id (api.js_conv='true',agw.js_conv="str") // 空间owner uid
17: optional string owner_name // 空间owner昵称
18: optional string owner_user_name // 空间owner用户名
19: optional string owner_icon_url // 空间owner图像
20: optional SpaceApplyStatus space_apply_status // 当前访问用户加入空间状态
21: optional i64 total_member_num // 空间成员总数,只有组织空间才查询
1: i64 id (api.js_conv='true',agw.js_conv="str") // Space id, newly created as 0
2: list<AppIDInfo> app_ids // publishing platform
3: string name // space name
4: string description // spatial description
5: string icon_url // icon url
6: SpaceType space_type // space type
7: list<ConnectorInfo> connectors // publishing platform
8: bool hide_operation // Whether to hide New, Copy Delete buttons
9: i32 role_type // Role in team 1-owner 2-admin 3-member
10: optional SpaceMode space_mode // Spatial Mode
11: bool display_local_plugin // Whether to display the end-side plug-in creation entry
12: SpaceRoleType space_role_type // Role type, enumeration
13: optional SpaceTag space_tag // spatial label
14: optional i64 enterprise_id (api.js_conv='true',agw.js_conv="str") // Enterprise ID
15: optional i64 organization_id (api.js_conv='true',agw.js_conv="str") // organization id
16: optional i64 owner_user_id (api.js_conv='true',agw.js_conv="str") // Space owner uid
17: optional string owner_name // Space owner nickname
18: optional string owner_user_name // Space owner username
19: optional string owner_icon_url // Space owner image
20: optional SpaceApplyStatus space_apply_status // The current visiting user joins the space status
21: optional i64 total_member_num // The total number of space members, only the organization space can be queried.
}
struct SpaceInfo {
1: list<BotSpaceV2> bot_space_list // 用户加入空间列表
2: bool has_personal_space // 是否有个人空间
3: i32 team_space_num // 个人创建team空间数量
4: i32 max_team_space_num // 个人最大能创建的空间数量
5: list<BotSpaceV2> recently_used_space_list // 最近使用空间列表
6: optional i32 total // 分页时生效
7: optional bool has_more // 分页时生效
1: list<BotSpaceV2> bot_space_list // User joins space list
2: bool has_personal_space // Is there any personal space available?
3: i32 team_space_num // Number of team spaces created by individuals
4: i32 max_team_space_num // The maximum number of spaces an individual can create
5: list<BotSpaceV2> recently_used_space_list // list of recently used spaces
6: optional i32 total // Effective when paging
7: optional bool has_more // Effective when paging
}
struct GetSpaceListV2Response {
@@ -311,7 +311,7 @@ struct GetImagexShortUrlResponse{
}
struct GetImagexShortUrlData {
1: map<string,UrlInfo> url_info //审核状态,key urivalue url 和 审核状态
1: map<string,UrlInfo> url_info //Audit status, key uri, value url and, audit status
}
@@ -338,18 +338,18 @@ struct GetImagexShortUrlRequest{
struct UserBasicInfo {
1: required i64 UserId (api.js_conv='true',agw.js_conv="str", api.body="user_id")
3: required string Username (api.body="user_name") // 昵称
4: required string UserAvatar (api.body="user_avatar") // 头像
5: optional string UserUniqueName (api.body="user_unique_name") // 用户名
6: optional bot_common.UserLabel UserLabel (api.body="user_label") // 用户标签
7: optional i64 CreateTime (api.body="create_time") // 用户创建时间
3: required string Username (api.body="user_name") // nickname
4: required string UserAvatar (api.body="user_avatar") // avatar
5: optional string UserUniqueName (api.body="user_unique_name") // user name
6: optional bot_common.UserLabel UserLabel (api.body="user_label") // user tag
7: optional i64 CreateTime (api.body="create_time") // user creation time
}
struct MGetUserBasicInfoRequest {
1 : required list<string> UserIds (agw.js_conv="str", api.js_conv="true", api.body="user_ids")
2 : optional bool NeedUserStatus (api.body="need_user_status")
3 : optional bool NeedEnterpriseIdentity (api.body="need_enterprise_identity") // 是否需要企业认证信息前端通过AGW调用时默认为true
4 : optional bool NeedVolcanoUserName (api.body="need_volcano_user_name") // 是否需要火山用户名
3 : optional bool NeedEnterpriseIdentity (api.body="need_enterprise_identity") // Whether enterprise authentication information is required, the default is true when the front end is called through AGW
4 : optional bool NeedVolcanoUserName (api.body="need_volcano_user_name") // Do you need a volcano username?
255: optional base.Base Base (api.none="true")
}
@@ -405,7 +405,7 @@ struct ReportUserBehaviorRequest {
1: required i64 ResourceID (api.body = "resource_id",api.js_conv="true")
2: required SpaceResourceType ResourceType (api.body="resource_type")
3: required BehaviorType BehaviorType (api.body="behavior_type")
4: optional i64 SpaceID (agw.js_conv="str",api.js_conv="true",api.body="space_id",agw.key="space_id") // 本需求必传
4: optional i64 SpaceID (agw.js_conv="str",api.js_conv="true",api.body="space_id",agw.key="space_id") // This requirement must be passed on
255: base.Base Base (api.none="true")
}
@@ -448,8 +448,8 @@ struct GetFileUrlsResponse {
}
struct UploadFileOpenRequest {
1: required string ContentType (api.header = "Content-Type", agw.source = "header", agw.key = "Content-Type"), // 文件类型
2: required binary Data (api.raw_body = ""), // 二进制数据
1: required string ContentType (api.header = "Content-Type", agw.source = "header", agw.key = "Content-Type"), // file type
2: required binary Data (api.raw_body = ""), // binary data
255: base.Base Base
}
@@ -462,17 +462,17 @@ struct UploadFileOpenResponse {
}
struct File{
1: string URI (api.body = "uri"), // 文件URI
2: i64 Bytes (api.body = "bytes"), // 文件字节数
3: i64 CreatedAt (agw.key = "created_at"), // 上传时间戳,单位s
4: string FileName (api.body = "file_name"), // 文件名
1: string URI (api.body = "uri"), // File URI
2: i64 Bytes (api.body = "bytes"), // file bytes
3: i64 CreatedAt (agw.key = "created_at"), // Upload timestamp in s
4: string FileName (api.body = "file_name"), // file name
5: string URL (api.body = "url")
}
struct GetBotOnlineInfoReq {
1 : required i64 bot_id (api.js_conv="true") // botId
2: optional string connector_id // 先保留,不暴露且不使用该字段
3 : optional string version // bot版本,不传则获取最新版本
2: optional string connector_id // Keep it first, don't expose it, and don't use the field
3 : optional string version // bot version, get the latest version if you don't pass it on.
}
// resp
@@ -492,7 +492,7 @@ service PlaygroundService {
UpdateBotPopupInfoResponse UpdateBotPopupInfo (1:UpdateBotPopupInfoRequest request)(api.post='/api/playground_api/operate/update_bot_popup_info', api.category="account",agw.preserve_base="true")
ReportUserBehaviorResponse ReportUserBehavior(1:ReportUserBehaviorRequest request)(api.post='/api/playground_api/report_user_behavior', api.category="playground_api",agw.preserve_base="true")
// 创建快捷指令
// Create shortcut instructions
shortcut_command.CreateUpdateShortcutCommandResponse CreateUpdateShortcutCommand(1: shortcut_command.CreateUpdateShortcutCommandRequest req)(api.post='/api/playground_api/create_update_shortcut_command', api.category="playground_api", agw.preserve_base="true")
GetFileUrlsResponse GetFileUrls(1: GetFileUrlsRequest req)(api.post='/api/playground_api/get_file_list', api.category="playground_api", agw.preserve_base="true")
@@ -509,6 +509,6 @@ service PlaygroundService {
//openapi
GetBotOnlineInfoResp GetBotOnlineInfo(1: GetBotOnlineInfoReq request)(api.get='/v1/bot/get_online_info', api.category="bot", api.tag="openapi", api.gen_path="personal_api")
// File 相关 OpenAPI
// File related OpenAPI
UploadFileOpenResponse UploadFileOpen(1: UploadFileOpenRequest request)(api.post = "/v1/files/upload", api.category="file", api.tag="openapi", agw.preserve_base="true")
}

View File

@@ -68,7 +68,7 @@ struct DeletePromptResourceResponse {
255: required base.BaseResp BaseResp
}
// 参数优先级从上往下
// Parameter priority from top to bottom
struct SyncPromptResourceToEsRequest {
1: optional bool SyncAll
2: optional list<i64> PromptResourceIDList
@@ -84,8 +84,8 @@ struct SyncPromptResourceToEsResponse {
struct MGetDisplayResourceInfoRequest {
1 : list<i64> ResIDs, // 最大传一页的数量,实现方可以限制最大100
2 : i64 CurrentUserID, // 当前的用户,实现方用于判断权限
1 : list<i64> ResIDs, // The maximum number of one page can be transferred, and the implementer can limit the maximum to 100.
2 : i64 CurrentUserID, // The current user, the implementation is used to determine the authority
255: base.Base Base ,
}
@@ -95,36 +95,36 @@ struct MGetDisplayResourceInfoResponse {
}
enum ActionKey{
Copy = 1, //复制
Delete = 2, //删除
EnableSwitch = 3, //启用/禁用
Edit = 4, //编辑
CrossSpaceCopy = 10, // 跨空间复制
Copy = 1, //copy
Delete = 2, //delete
EnableSwitch = 3, //enable/disable
Edit = 4, //edit
CrossSpaceCopy = 10, //Cross-space copy
}
struct ResourceAction{
// 一个操作对应一个唯一的keykey由资源侧约束
// An operation corresponds to a unique key, and the key is constrained by the resource side
1 : required ActionKey Key (go.tag = "json:\"key\""),
//ture=可以操作该Actionfalse=置灰
//ture = can operate this Action, false = grey out
2 : required bool Enable (go.tag = "json:\"enable\""),
}
// 展示用,实现方提供展示信息
// For display, the implementer provides display information
struct DisplayResourceInfo{
1 : optional i64 ResID, // 资源id
5 : optional string Desc,// 资源描述
6 : optional string Icon,// 资源Icon完整url
12 : optional i32 BizResStatus, // 资源状态,各类型资源自身定义
13 : optional bool CollaborationEnable, // 是否开启多人编辑
16 : optional map<string, string> BizExtend, // 业务携带的扩展信息以res_type区分每个res_type定义的schema和含义不一样使用前需要判断res_type
17 : optional list<ResourceAction> Actions, // 不同类型的不同操作按钮,由资源实现方和前端约定。返回则展示,要隐藏某个按钮,则不要返回;
18 : optional bool DetailDisable, // 是否禁止进详情页
19 : optional string Name // 资源名称
20 : optional ResourcePublishStatus PublishStatus, // 资源发布状态1-未发布2-已发布
21 : optional i64 EditTime, // 最近编辑时间, unix秒级时间戳
1 : optional i64 ResID, // Resource ID
5 : optional string Desc,// resource description
6 : optional string Icon,// Resource Icon, full url
12 : optional i32 BizResStatus, // Resource status, each type of resource defines itself
13 : optional bool CollaborationEnable, // Whether to enable multi-person editing
16 : optional map<string, string> BizExtend, // Business carry extended information to res_type distinguish, each res_type defined schema and meaning is not the same, need to judge before use res_type
17 : optional list<ResourceAction> Actions, // Different types of different operation buttons are agreed upon by the resource implementer and the front end. Return is displayed, if you want to hide a button, do not return;
18 : optional bool DetailDisable, // Whether to ban entering the details page
19 : optional string Name // resource name
20 : optional ResourcePublishStatus PublishStatus, // Resource release status, 1 - unpublished, 2 - published
21 : optional i64 EditTime, // Last edited, unix timestamp
}
enum ResourcePublishStatus{
UnPublished = 1, //未发布
Published = 2, //已发布
UnPublished = 1, //unpublished
Published = 2, //Published
}

View File

@@ -17,27 +17,27 @@ struct CreateShortcutCommandResponse {
struct ShortcutStruct {
16: optional list<string> shortcut_sort // 快捷指令ID列表 实体上绑定的
17: optional list<ShortcutCommand> shortcut_list // 快捷指令内容list
16: optional list<string> shortcut_sort // Shortcut ID list, bound on the entity
17: optional list<ShortcutCommand> shortcut_list // Quick command content list
}
struct ShortcutCommand {
2 : i64 object_id (api.js_conv="true") // 绑定实体ID
3 : string command_name // 命令名称
4 : string shortcut_command // 快捷指令
5 : string description // 描述
6 : SendType send_type // 发送类型
7 : ToolType tool_type // 使用工具type
2 : i64 object_id (api.js_conv="true") // Binding Entity ID
3 : string command_name // command name
4 : string shortcut_command // Quick Instruction
5 : string description // describe
6 : SendType send_type // Send type
7 : ToolType tool_type // Use tool type
8 : string work_flow_id
9 : string plugin_id
10: string plugin_api_name
11 : string template_query // 模板query
12 : list<Components> components_list // panel参数
15 : string card_schema // 表单的schema
16 : i64 command_id (api.js_conv="true") // 指令ID
17 : ToolInfo tool_info //工具信息 包含name+变量列表+...
18 : ShortcutFileInfo shortcut_icon // 指令图标
21 : optional string agent_id //multi的指令时,该指令由哪个节点执行
11 : string template_query // Template query
12 : list<Components> components_list // Panel parameters
15 : string card_schema // Form schema
16 : i64 command_id (api.js_conv="true") // Instruction ID
17 : ToolInfo tool_info //Tool information, including name + variable list +...
18 : ShortcutFileInfo shortcut_icon // command icon
21 : optional string agent_id //Multi instruction, which node executes the instruction
22 : i64 plugin_api_id (api.js_conv="true")
}
@@ -47,15 +47,15 @@ struct ShortcutFileInfo {
}
struct Components { // panel参数
struct Components { // Panel parameters
1 : string name
2 : string description
3 : InputType input_type
4 : string parameter // 请求工具时参数的key
4 : string parameter // When requesting the tool, the key of the parameter
5 : list<string> options
6 : DefaultValue default_value
7 : bool hide // 是否隐藏不展示
8 : list<InputType> upload_options // input_typeMixUpload时,支持哪些类型
7 : bool hide // Whether to hide or not to show
8 : list<InputType> upload_options // What types are supported input_type MixUpload
}
struct DefaultValue {
@@ -65,26 +65,26 @@ struct DefaultValue {
struct ToolInfo {
1:string tool_name
2:list<ToolParams> tool_params_list // 变量列表 插件&workFLow
2:list<ToolParams> tool_params_list // Variable lists, plugins & workFLow
}
struct ToolParams { // 参数列表
struct ToolParams { // parameter list
1 : string name
2 : bool required
3 : string desc
4 : string type
6 : string default_value // 默认值
8 : bool refer_component // 是否是panel参数
6 : string default_value // default value
8 : bool refer_component // Is it a panel parameter?
}
enum SendType {
SendTypeQuery = 0 // 直接发query
SendTypePanel = 1 // 使用面板
SendTypeQuery = 0 // Send query directly
SendTypePanel = 1 // use panel
}
enum ToolType {
ToolTypeWorkFlow = 1 // 使用WorkFlow
ToolTypePlugin = 2 // 使用插件
ToolTypeWorkFlow = 1 // Using WorkFlow
ToolTypePlugin = 2 // use plug-ins
}
enum InputType {

View File

@@ -6,59 +6,59 @@ namespace go ocean.cloud.plugin_develop
service PluginDevelopService {
GetOAuthSchemaResponse GetOAuthSchema(1: GetOAuthSchemaRequest request)(api.post='/api/plugin/get_oauth_schema', api.category="plugin", api.gen_path="plugin")
GetOAuthSchemaResponse GetOAuthSchemaAPI(1: GetOAuthSchemaRequest request)(api.post='/api/plugin_api/get_oauth_schema', api.category="plugin", api.gen_path='plugin')
// 获取已发布 workflowplugin 列表,或者多个插件的详情
// Get a list of published workflows, plugins, or details of multiple plugins
GetPlaygroundPluginListResponse GetPlaygroundPluginList(1: GetPlaygroundPluginListRequest request) (api.post = '/api/plugin_api/get_playground_plugin_list', api.category = "plugin")
// 通过 code 创建插件
// Creating plugins with code
RegisterPluginResponse RegisterPlugin(1: RegisterPluginRequest request)(api.post='/api/plugin_api/register', api.category="plugin", api.gen_path="plugin", agw.preserve_base="true")
// 通过 UI 创建插件
// Create plugins through UI
RegisterPluginMetaResponse RegisterPluginMeta(1: RegisterPluginMetaRequest request) (api.post = '/api/plugin_api/register_plugin_meta', api.category = "plugin")
// 获取插件工具列表,或者多个工具详情
// Get a list of plug-in tools, or multiple tool details
GetPluginAPIsResponse GetPluginAPIs(1: GetPluginAPIsRequest request) (api.post = '/api/plugin_api/get_plugin_apis', api.category = "plugin")
// 获取插件详情
// Get plugin details
GetPluginInfoResponse GetPluginInfo(1: GetPluginInfoRequest request) (api.post = '/api/plugin_api/get_plugin_info', api.category = "plugin")
// 与最近一次发布版本相比,更新的工具列表
// Updated list of tools compared to the most recent release
GetUpdatedAPIsResponse GetUpdatedAPIs(1: GetUpdatedAPIsRequest request) (api.post = '/api/plugin_api/get_updated_apis', api.category = "plugin")
GetOAuthStatusResponse GetOAuthStatus(1: GetOAuthStatusRequest request)(api.post='/api/plugin_api/get_oauth_status', api.category="plugin", api.gen_path="plugin")
CheckAndLockPluginEditResponse CheckAndLockPluginEdit(1: CheckAndLockPluginEditRequest request)(api.post='/api/plugin_api/check_and_lock_plugin_edit', api.category="plugin", api.gen_path="plugin", )
UnlockPluginEditResponse UnlockPluginEdit(1: UnlockPluginEditRequest request)(api.post='/api/plugin_api/unlock_plugin_edit', api.category="plugin", api.gen_path="plugin")
// 通过 code 更新插件
// Update plugins via code
UpdatePluginResponse UpdatePlugin(1: UpdatePluginRequest request) (api.post = '/api/plugin_api/update', api.category = "plugin")
// 删除工具
// removal tool
DeleteAPIResponse DeleteAPI(1: DeleteAPIRequest request) (api.post = '/api/plugin_api/delete_api', api.category = "plugin", api.gen_path = 'plugin')
// 删除插件
// Remove plugin
DelPluginResponse DelPlugin(1: DelPluginRequest request) (api.post = '/api/plugin_api/del_plugin', api.category = "plugin", api.gen_path = 'plugin')
// 发布插件
// publishing plugin
PublishPluginResponse PublishPlugin(1: PublishPluginRequest request) (api.post = '/api/plugin_api/publish_plugin', api.category = "plugin")
// 通过UI更新插件
// Update plugins via UI
UpdatePluginMetaResponse UpdatePluginMeta(1: UpdatePluginMetaRequest request) (api.post = '/api/plugin_api/update_plugin_meta', api.category = "plugin")
GetBotDefaultParamsResponse GetBotDefaultParams(1: GetBotDefaultParamsRequest request) (api.post = '/api/plugin_api/get_bot_default_params', api.category = "plugin")
UpdateBotDefaultParamsResponse UpdateBotDefaultParams(1: UpdateBotDefaultParamsRequest request) (api.post = '/api/plugin_api/update_bot_default_params', api.category = "plugin")
// 创建工具
// creation tool
CreateAPIResponse CreateAPI(1: CreateAPIRequest request) (api.post = '/api/plugin_api/create_api', api.category = "plugin", api.gen_path = 'plugin')
// 更新工具
// update tool
UpdateAPIResponse UpdateAPI(1: UpdateAPIRequest request) (api.post = '/api/plugin_api/update_api', api.category = "plugin", api.gen_path = 'plugin')
GetUserAuthorityResponse GetUserAuthority(1: GetUserAuthorityRequest request)(api.post='/api/plugin_api/get_user_authority', api.category="plugin", api.gen_path="plugin")
DebugAPIResponse DebugAPI(1: DebugAPIRequest request)(api.post='/api/plugin_api/debug_api', api.category="plugin", api.gen_path='plugin')
GetPluginNextVersionResponse GetPluginNextVersion(1: GetPluginNextVersionRequest request)(api.post='/api/plugin_api/get_plugin_next_version', api.category="plugin", api.gen_path='plugin')
GetDevPluginListResponse GetDevPluginList(1: GetDevPluginListRequest request)(api.post='/api/plugin_api/get_dev_plugin_list', api.category="plugin", api.gen_path='plugin', agw.preserve_base="true")
// 协议转换,如将 curl 、postman collection 协议转换为 openapi3 协议
// Protocol conversion, such as converting curl and mail carrier collection protocols to openapi3 protocols
Convert2OpenAPIResponse Convert2OpenAPI(1: Convert2OpenAPIRequest request)(api.post='/api/plugin_api/convert_to_openapi', api.category="plugin", api.gen_path="plugin", agw.preserve_base="true")
// 批量创建工具,目前是配合 Convert2OpenAPI 接口使用
// Batch creation tool, currently used with the Convert2 OpenAPI interface
BatchCreateAPIResponse BatchCreateAPI(1: BatchCreateAPIRequest request)(api.post='/api/plugin_api/batch_create_api', api.category="plugin", api.gen_path="plugin", agw.preserve_base="true")
RevokeAuthTokenResponse RevokeAuthToken(1: RevokeAuthTokenRequest request)(api.post='/api/plugin_api/revoke_auth_token', api.category="plugin", api.gen_path="plugin", agw.preserve_base="true")
GetQueriedOAuthPluginListResponse GetQueriedOAuthPluginList(1: GetQueriedOAuthPluginListRequest request)(api.post='/api/plugin_api/get_queried_oauth_plugins', api.category="plugin", api.gen_path="plugin", agw.preserve_base="true")
}
struct GetPlaygroundPluginListRequest {
1: optional i32 page (api.body = "page") // 页码
2: optional i32 size (api.body = "size") // 每页大小
1: optional i32 page (api.body = "page") // page number
2: optional i32 size (api.body = "size") // page size
4: optional string name (api.body = "name") // ignore
5: optional i64 space_id (api.body = "space_id" api.js_conv = "str") // 空间id
6: list<string> plugin_ids (api.body = "plugin_ids") // 如果存在则根据插件id查询无分页逻辑
7: list<i32> plugin_types (api.body = "plugin_types") // 长度为1 且为workflow时返回已发布的workflow列表默认返回已发布的plugin列表
5: optional i64 space_id (api.body = "space_id" api.js_conv = "str") // Space ID
6: list<string> plugin_ids (api.body = "plugin_ids") // If present, query according to plug-in id, no paging logic
7: list<i32> plugin_types (api.body = "plugin_types") // When the length is 1 and it is a workflow, return the list of published workflows, and return the list of published plugins by default
8: optional i32 channel_id (api.body = "channel_id") // ignore
9: optional bool self_created (api.body = "self_created") // ignore
10: optional i32 order_by (api.body = "order_by") // 排序
10: optional i32 order_by (api.body = "order_by") // sort
11: optional bool is_get_offline (api.body = "is_get_offline") // ignore
99: string referer (api.header = "Referer") // ignore
255: optional base.Base Base
@@ -72,10 +72,10 @@ struct GetPlaygroundPluginListResponse {
}
struct GetPluginAPIsRequest {
1 : required i64 plugin_id (api.js_conv = "str"), // 插件id
2 : list<string> api_ids , // 如果存在则根据工具id查询无分页逻辑
3 : i32 page , // 页码
4 : i32 size , // 每页大小
1 : required i64 plugin_id (api.js_conv = "str"), // Plugin ID
2 : list<string> api_ids , // If present, query according to tool id, no paging logic
3 : i32 page , // page number
4 : i32 size , // page size
5 : plugin_develop_common.APIListOrder order , // ignore
6 : optional string preview_version_ts, // ignore
255: optional base.Base Base ,
@@ -91,21 +91,21 @@ struct GetPluginAPIsResponse {
}
struct GetUpdatedAPIsRequest {
1 : required i64 plugin_id (api.js_conv = "str"), // 插件id
1 : required i64 plugin_id (api.js_conv = "str"), // Plugin ID
255: optional base.Base Base ,
}
struct GetUpdatedAPIsResponse {
1 : i64 code ,
2 : string msg ,
3 : list<string> created_api_names, // 新创建的工具名
4 : list<string> deleted_api_names, // 被删除的工具名
5 : list<string> updated_api_names, // 被更新的工具名
3 : list<string> created_api_names, // Newly created tool name
4 : list<string> deleted_api_names, // Deleted tool name
5 : list<string> updated_api_names, // updated tool name
255: optional base.BaseResp BaseResp ,
}
struct GetPluginInfoRequest {
1 : required i64 plugin_id (api.js_conv = "str"), // 目前只支持插件openapi插件的信息
1 : required i64 plugin_id (api.js_conv = "str"), // Currently only plugins are supported OpenAPI plugin information
2 : optional string preview_version_tsx // ignore
255: optional base.Base Base ,
}
@@ -115,9 +115,9 @@ struct GetPluginInfoResponse {
2 : string msg ,
3 : plugin_develop_common.PluginMetaInfo meta_info ,
4 : plugin_develop_common.CodeInfo code_info ,
5 : bool status , // 0 无更新 1 有更新未发布
6 : bool published , // 是否已发布
7 : plugin_develop_common.Creator creator , // 创建人信息
5 : bool status , // 0 No updates 1 Yes updates Not released
6 : bool published , // Has it been published?
7 : plugin_develop_common.Creator creator , // creator information
8 : plugin_develop_common.PluginStatisticData statistic_data , // ignore
9 : plugin_develop_common.ProductStatus plugin_product_status, // ignore
10 : bool privacy_status , // ignore
@@ -150,22 +150,22 @@ struct UpdatePluginResponse {
}
struct RegisterPluginMetaRequest {
1 : required string name , // 插件名
2 : required string desc , // 插件描述
3 : optional string url , // 插件服务地址前缀
4 : required plugin_develop_common.PluginIcon icon , // 插件图标
5 : optional plugin_develop_common.AuthorizationType auth_type , // 插件授权类型
6 : optional plugin_develop_common.AuthorizationServiceLocation location , // 子授权类型为api/token时token参数位置
7 : optional string key , // 子授权类型为api/token时token参数key
8 : optional string service_token , // 子授权类型为api/token时token参数value
9 : optional string oauth_info , // 授权类型为oauth是oauth信息GetOAuthSchema返回值
10 : required i64 space_id (api.js_conv = "str") , // 空间id
11 : optional map<plugin_develop_common.ParameterLocation,list<plugin_develop_common.commonParamSchema>> common_params , // 插件公共参数key为参数位置value为参数列表
1 : required string name , // plugin name
2 : required string desc , // Plugin description
3 : optional string url , // Plugin service address prefix
4 : required plugin_develop_common.PluginIcon icon , // plugin icon
5 : optional plugin_develop_common.AuthorizationType auth_type , // plug-in authorization type
6 : optional plugin_develop_common.AuthorizationServiceLocation location , // When the sub-authorization type is api/token, the token parameter position
7 : optional string key , // When the sub-authorization type is api/token, the token parameter key
8 : optional string service_token , // When the sub-authorization type is api/token, the token parameter value
9 : optional string oauth_info , // The authorization type is oauth Yes, oauth information, see GetOAuthSchema return value
10 : required i64 space_id (api.js_conv = "str") , // Space ID
11 : optional map<plugin_develop_common.ParameterLocation,list<plugin_develop_common.commonParamSchema>> common_params , // Plugin public parameters, key is the parameter position, value is the parameter list
12 : optional plugin_develop_common.CreationMethod creation_method , // ignore
13 : optional string ide_code_runtime, // ignore
14 : optional plugin_develop_common.PluginType plugin_type , // ignore
15 : optional i64 project_id (api.js_conv = "str") , // 应用id
16 : optional i32 sub_auth_type , // 二级授权类型0api/token of service10client credentials of oauth
15 : optional i64 project_id (api.js_conv = "str") , // App ID
16 : optional i32 sub_auth_type , // Level 2 authorization type, 0: api/token of service, 10: client credentials of oauth
17 : optional string auth_payload , // ignore
18 : optional bool fixed_export_ip , // ignore
255: optional base.Base Base ,
@@ -185,15 +185,15 @@ struct UpdatePluginMetaRequest {
4 : optional string url , // plugin service url
5 : optional plugin_develop_common.PluginIcon icon ,
6 : optional plugin_develop_common.AuthorizationType auth_type ,
7 : optional plugin_develop_common.AuthorizationServiceLocation location , // 子授权类型为api/token时token参数位置
8 : optional string key , // 子授权类型为api/token时token参数key
9 : optional string service_token , // 子授权类型为api/token时token参数value
10 : optional string oauth_info , // 子授权类型为oauth时oauth信息GetOAuthSchema返回值
11 : optional map<plugin_develop_common.ParameterLocation,list<plugin_develop_common.commonParamSchema>> common_params , // json序列化
7 : optional plugin_develop_common.AuthorizationServiceLocation location , // When the sub-authorization type is api/token, the token parameter position
8 : optional string key , // When the sub-authorization type is api/token, the token parameter key
9 : optional string service_token , // When the sub-authorization type is api/token, the token parameter value
10 : optional string oauth_info , // When the sub-authorization type is oauth, for oauth information, see GetOAuthSchema return value
11 : optional map<plugin_develop_common.ParameterLocation,list<plugin_develop_common.commonParamSchema>> common_params , // JSON serialization
12 : optional plugin_develop_common.CreationMethod creation_method, // ignore
13 : optional i32 edit_version , // ignore
14 : optional plugin_develop_common.PluginType plugin_type ,
15 : optional i32 sub_auth_type , // 二级授权类型
15 : optional i32 sub_auth_type , // Level 2 authorization type
16 : optional string auth_payload , // ignore
17 : optional bool fixed_export_ip, // ignore
@@ -209,8 +209,8 @@ struct UpdatePluginMetaResponse {
struct PublishPluginRequest {
1 : required i64 plugin_id (api.js_conv = "str") ,
2 : bool privacy_status, // 隐私声明状态
3 : string privacy_info , // 隐私声明内容
2 : bool privacy_status, // Privacy Statement Status
3 : string privacy_info , // Privacy Statement Content
4 : string version_name ,
5 : string version_desc ,
255: optional base.Base Base ,
@@ -223,7 +223,7 @@ struct PublishPluginResponse {
255: optional base.BaseResp BaseResp ,
}
// bot引用plugin
// Bot reference plugin
struct GetBotDefaultParamsRequest {
1 : i64 space_id (api.js_conv = "str") ,
2 : i64 bot_id (api.js_conv = "str") ,
@@ -273,8 +273,8 @@ struct DeleteBotDefaultParamsRequest {
2 : string dev_id ,
3 : i64 plugin_id (api.js_conv = "str") ,
4 : string api_name ,
// bot删除工具时: DeleteBot = false , APIName要设置
// 删除bot时 : DeleteBot = true , APIName为空
// Bot removal tool when: DeleteBot = false, APIName to set
// Delete bot: DeleteBot = true, APIName is empty
5 : bool delete_bot ,
6 : i64 space_id (api.js_conv = "str") ,
7 : string plugin_referrer_id ,
@@ -373,7 +373,7 @@ struct GetOAuthSchemaResponse {
2 : string msg ,
3 : string oauth_schema,
4 : string ide_conf ,
255: optional base.BaseResp BaseResp , // 约定的json
255: optional base.BaseResp BaseResp , // The agreed json
}
struct GetUserAuthorityRequest {
@@ -392,7 +392,7 @@ struct GetUserAuthorityResponse {
255: optional base.BaseResp BaseResp ,
}
// 获取授权状态--plugin debug
// Get authorization status--plugin debug area
struct GetOAuthStatusRequest {
1 : required i64 plugin_id (api.js_conv = "str"),
@@ -400,9 +400,9 @@ struct GetOAuthStatusRequest {
}
struct GetOAuthStatusResponse {
1 : bool is_oauth, // 是否为授权插件
2 : plugin_develop_common.OAuthStatus status , // 用户授权状态
3 : string content , // 未授权,返回授权url
1 : bool is_oauth, // Is it an authorized plugin?
2 : plugin_develop_common.OAuthStatus status , // user authorization status
3 : string content , // Unauthorized, return the authorized url.
253: i64 code
254: string msg
@@ -426,8 +426,8 @@ struct CheckAndLockPluginEditResponse {
struct GetPluginPublishHistoryRequest {
1 : required i64 plugin_id (api.js_conv = "str"),
2 : required i64 space_id (api.js_conv = "str"),
3 : optional i32 page , // 翻页,第几页
4 : optional i32 size , // 翻页,每页几条
3 : optional i32 page , // Turn the page, what page?
4 : optional i32 size , // Flip pages, a few entries per page
255: optional base.Base Base ,
}
@@ -435,8 +435,8 @@ struct GetPluginPublishHistoryRequest {
struct GetPluginPublishHistoryResponse {
1 : i64 code ,
2 : string msg ,
3 : list<plugin_develop_common.PluginPublishInfo> plugin_publish_info_list, // 时间倒序
4 : i32 total , // 总共多少条,大于 page x size 说明还有下一页
3 : list<plugin_develop_common.PluginPublishInfo> plugin_publish_info_list, // reverse time
4 : i32 total , // How many in total, greater than page x size description and next page
255: base.BaseResp BaseResp ,
}
@@ -521,11 +521,11 @@ struct GetDevPluginListRequest {
5 : i64 space_id (api.body = "space_id", api.js_conv="str", agw.js_conv="str", agw.cli_conv="str", agw.key="space_id") ,
6 : optional plugin_develop_common.ScopeType scope_type ,
7 : optional plugin_develop_common.OrderBy order_by ,
8 : optional bool publish_status , // 发布状态筛选true:已发布, false:未发布
9 : optional string name , // 插件名或工具名
10 : optional plugin_develop_common.PluginTypeForFilter plugin_type_for_filter , // 插件种类筛选 端/云
8 : optional bool publish_status , // Release status filter: true: published, false: not published
9 : optional string name , // Plugin name or tool name
10 : optional plugin_develop_common.PluginTypeForFilter plugin_type_for_filter , // Plugin Type Filter, End/Cloud
11 : i64 project_id (api.body = "project_id", api.js_conv="str", agw.js_conv="str", agw.cli_conv="str", agw.key="project_id"),
12 : list<i64> plugin_ids (api.body = "plugin_ids", agw.js_conv="str", agw.cli_conv="str", agw.key="plugin_ids"), // 插件id列表
12 : list<i64> plugin_ids (api.body = "plugin_ids", agw.js_conv="str", agw.cli_conv="str", agw.key="plugin_ids"), // plugin id list
255: optional base.Base Base ,
}
@@ -559,8 +559,8 @@ struct Convert2OpenAPIResponse {
6 : list<plugin_develop_common.DuplicateAPIInfo> duplicate_api_infos, // ignore
// BaseResp.StatusCode
// DuplicateAPIPath: 导入的文件中有重复的API Path request.MergeSamePaths = false
// InvalidParam: 其他错误
// DuplicateAPIPath: Duplicate API Path in imported file with request. MergeSamePaths = false
// InvalidParam: Other errors
255: optional base.BaseResp BaseResp ,
}
@@ -580,21 +580,21 @@ struct BatchCreateAPIRequest {
struct BatchCreateAPIResponse {
1 : i64 code ,
2 : string msg ,
// PathsToReplace表示要覆盖的tools
// 如果BaseResp.StatusCode = DuplicateAPIPath,那么PathsToReplace不为空
// PathsToReplace represents the tools to override,
// If BaseResp. StatusCode = DuplicateAPIPath, then PathsToReplace is not empty
3 : optional list<plugin_develop_common.PluginAPIInfo> paths_duplicated,
4 : optional list<plugin_develop_common.PluginAPIInfo> paths_created ,
5 : i32 edit_version ,
// BaseResp.StatusCode
// DuplicateAPIPath: 有重复的API Path,且 request.ReplaceDupPath = false
// InvalidParam: 其他错误
// DuplicateAPIPath: There is a duplicate API Path with request. ReplaceDupPath = false
// InvalidParam: Other errors
255: required base.BaseResp BaseResp ,
}
struct RevokeAuthTokenRequest {
1 : required i64 plugin_id (api.js_conv = "str", api.body = "plugin_id"),
2 : optional i64 bot_id (api.js_conv = "str", api.body = "bot_id"), // 如果不传使用uid赋值 bot_id = connector_uid
2 : optional i64 bot_id (api.js_conv = "str", api.body = "bot_id"), // If not passed using uid assignment bot_id = connector_uid
3 : optional i32 context_type (api.body = "context_type"),
255: base.Base Base ,
}
@@ -605,9 +605,9 @@ struct RevokeAuthTokenResponse {
struct OAuthPluginInfo {
1: i64 plugin_id (api.js_conv = "str") ,
2: plugin_develop_common.OAuthStatus status , // 用户授权状态
3: string name , // 插件name
4: string plugin_icon, // 插件头像
2: plugin_develop_common.OAuthStatus status , // user authorization status
3: string name , // Plugin name
4: string plugin_icon, // plugin avatar
}
struct GetQueriedOAuthPluginListRequest {

View File

@@ -17,7 +17,7 @@ enum ParameterLocation{
Header = 4
}
//plugin枚举值
//plugin enumeration value
enum PluginParamTypeFormat{
FileUrl = 0
ImageUrl = 1
@@ -53,13 +53,13 @@ enum ParameterType{
Bool = 6,
}
// 默认入参的设置来源
// Default imported parameter settings source
enum DefaultParamSource {
Input = 0, // 默认用户输入
Variable = 1, // 引用变量
Input = 0, // default user input
Variable = 1, // reference variable
}
// 针对File类型参数的细分类型
// Subdivision types for File type parameters
enum AssistParameterType {
DEFAULT = 1,
IMAGE = 2,
@@ -71,19 +71,19 @@ enum AssistParameterType {
AUDIO = 8,
ZIP = 9,
VIDEO = 10,
VOICE = 12, // 语音
VOICE = 12, // voice
}
enum PluginToolAuthType {
Required = 0, // 强授权
Supported = 1, // 半匿名授权
Disable = 2, // 不授权
Required = 0, // strong authorization
Supported = 1, // semi-anonymous authorization
Disable = 2, // not authorized
}
enum PluginCardStatus {
Latest = 1,
NeedUpdate = 2, // 主卡片版本有升级
ParamMisMatch = 3, // 插件工具出参不匹配
NeedUpdate = 2, // The main card version has been upgraded.
ParamMisMatch = 3, // Plugin tool exported parameters do not match
}
enum PluginType {
@@ -101,8 +101,8 @@ enum PluginStatus {
PREPARED = 3,
PUBLISHED = 4,
OFFLINE = 5,
Draft = 0, // 默认值
BANNED = 6, // 禁用
Draft = 0, // default value
BANNED = 6, // disable
}
enum ProductStatus {
@@ -127,10 +127,10 @@ enum APIListOrderBy {
}
enum SpaceRoleType {
Default = 0, // 默认
Default = 0, // default
Owner = 1, // owner
Admin = 2, // 管理员
Member = 3, // 普通成员
Admin = 2, // administrator
Member = 3, // ordinary member
}
enum RunMode {
@@ -165,8 +165,8 @@ enum PluginReferrerScene {
}
enum WorkflowResponseMode {
UseLLM = 0, // 模型总结
SkipLLM = 1, // 不使用模型总结
UseLLM = 0, // model summary
SkipLLM = 1, // Do not use model summaries
}
struct ResponseStyle {
@@ -195,19 +195,19 @@ struct UserLabel {
}
struct PluginMetaInfo{
1 : string name , // 插件名
2 : string desc , // 插件描述
3 : string url , // 插件服务地址前缀
4 : PluginIcon icon , // 插件图标
5 : list<AuthorizationType> auth_type , // 插件授权类型0无授权1service3oauth
6 : optional AuthorizationServiceLocation location , // 子授权类型为api/token时token参数位置
7 : optional string key , // 子授权类型为api/token时token参数key
8 : optional string service_token, // 子授权类型为api/token时token参数值
9 : optional string oauth_info , // 子授权类型为oauth时oauth信息
10: optional map<ParameterLocation,list<commonParamSchema>> common_params, // 插件公共参数key为参数位置value为参数列表
11: optional i32 sub_auth_type, // 子授权类型,0: api/token of service, 10: client credentials of oauth
12: optional string auth_payload , // 可忽略
13: bool fixed_export_ip, // 可忽略
1 : string name , // plugin name
2 : string desc , // Plugin description
3 : string url , // Plugin service address prefix
4 : PluginIcon icon , // plugin icon
5 : list<AuthorizationType> auth_type , // Plugin authorization type, 0: no authorization, 1: service, 3: oauth
6 : optional AuthorizationServiceLocation location , // When the sub-authorization type is api/token, the token parameter position
7 : optional string key , // When the sub-authorization type is api/token, the token parameter key
8 : optional string service_token, // When the sub-authorization type is api/token, the token parameter value
9 : optional string oauth_info , // When the sub-authorization type is oauth, the oauth information
10: optional map<ParameterLocation,list<commonParamSchema>> common_params, // Plugin public parameters, key is the parameter position, value is the parameter list
11: optional i32 sub_auth_type, // Sub-authorization type, 0: api/token of service, 10: client credentials of oauth
12: optional string auth_payload , // negligible
13: bool fixed_export_ip, // negligible
}
struct PluginIcon {
@@ -231,22 +231,22 @@ struct PluginInfoForPlayground {
10: string client_id
11: string client_secret
15: list<PluginApi> plugin_apis
16: i64 tag // 插件标签
16: i64 tag // plugin tag
17: string create_time
18: string update_time
22: Creator creator // 创建人信息
23: string space_id // 空间id
24: PluginStatisticData statistic_data // 插件统计数据
22: Creator creator // creator information
23: string space_id // Space ID
24: PluginStatisticData statistic_data // plugin statistics
25: optional map<ParameterLocation, list<commonParamSchema>> common_params
26: ProductStatus plugin_product_status // plugin的商品状态
27: ProductUnlistType plugin_product_unlist_type // plugin商品下架类型
28: string material_id // 素材id
29: i32 channel_id // 渠道id
30: CreationMethod creation_method // 插件创建方式
31: bool is_official // 是否为官方插件
32: string project_id // 项目id
33: string version_ts // 版本号,毫秒时间戳
34: string version_name // 版本名称
26: ProductStatus plugin_product_status // Product status of the plugin
27: ProductUnlistType plugin_product_unlist_type // Plugin product removal type
28: string material_id // Material ID
29: i32 channel_id // Channel ID
30: CreationMethod creation_method // Plugin creation method
31: bool is_official // Is it an official plugin?
32: string project_id // Project ID
33: string version_ts // Version number, millisecond timestamp
34: string version_name // version name
}
struct PluginApi {
@@ -255,22 +255,22 @@ struct PluginApi {
3 : list<PluginParameter> parameters
4 : string plugin_id
5 : string plugin_name
7 : string api_id // 序号和playground保持一致
7 : string api_id // The serial number is the same as the playground
8 : string record_id
9 : optional PresetCardBindingInfo card_binding_info // 卡片绑定信息未绑定则为nil
10: optional DebugExample debug_example // 调试api示例
9 : optional PresetCardBindingInfo card_binding_info // Card binding information, nil if not bound.
10: optional DebugExample debug_example // Debug API example
11: optional string function_name
12: RunMode run_mode // 运行模式
12: RunMode run_mode // operating mode
}
struct Creator {
1: string id ,
2: string name ,
3: string avatar_url ,
4: bool self , // 是否是自己创建的
4: bool self , // Did you create it yourself?
5: SpaceRoleType space_roly_type ,
6: string user_unique_name, // 用户名
7: UserLabel user_label , // 用户标签
6: string user_unique_name, // user name
7: UserLabel user_label , // user tag
}
struct commonParamSchema{
@@ -284,11 +284,11 @@ struct PluginParameter {
3 : bool required
4 : string type
5 : list<PluginParameter> sub_parameters
6 : string sub_type // 如果Type是数组,则有subtype
7 : optional string from_node_id // 如果入参的值是引用的则有fromNodeId
8 : optional list<string> from_output // 具体引用哪个节点的key
9 : optional string value // 如果入参是用户手输 就放这里
10: optional PluginParamTypeFormat format // 格式化参数
6 : string sub_type // If Type is an array, there is a subtype
7 : optional string from_node_id // fromNodeId if the value of the imported parameter is a reference
8 : optional list<string> from_output // Which node's key is specifically referenced?
9 : optional string value // If the imported parameter is the user's hand input, put it here
10: optional PluginParamTypeFormat format // Format parameter
}
struct PluginAPIInfo{
@@ -307,43 +307,43 @@ struct PluginAPIInfo{
13: OnlineStatus online_status , // if tool has been published, online_status is Online
14: APIExtend api_extend , // ignore
15: optional PresetCardBindingInfo card_binding_info , // ignore
16: optional DebugExample debug_example , // 调试示例
17: DebugExampleStatus debug_example_status, // 调试示例状态
16: optional DebugExample debug_example , // Debugging example
17: DebugExampleStatus debug_example_status, // Debug sample state
18: string function_name , // ignore
}
struct APIParameter {
1 : string id , // for前端无实际意义
1 : string id , // For the front end, no practical significance
2 : string name , // parameter name
3 : string desc , // parameter desc
4 : ParameterType type , // parameter type
5 : optional ParameterType sub_type , // 可忽略
6 : ParameterLocation location , // 参数位置
7 : bool is_required , // 是否必填
8 : list<APIParameter> sub_parameters , // 子参数
9 : optional string global_default , // 全局默认值
10: bool global_disable , // 全局是否启用
11: optional string local_default , // 智能体内设置的默认值
12: bool local_disable , // 智能体内是否启用
13: optional DefaultParamSource default_param_source , // 可忽略
14: optional string variable_ref , // 引用variablekey
15: optional AssistParameterType assist_type , // 多模态辅助参数类型
5 : optional ParameterType sub_type , // negligible
6 : ParameterLocation location , // parameter location
7 : bool is_required , // Is it required?
8 : list<APIParameter> sub_parameters , // sub-parameter
9 : optional string global_default , // global default
10: bool global_disable , // Is it enabled globally?
11: optional string local_default , // Default value set in the smart body
12: bool local_disable , // Is it enabled in the smart body?
13: optional DefaultParamSource default_param_source , // negligible
14: optional string variable_ref , // Reference variable key
15: optional AssistParameterType assist_type , // Multimodal auxiliary parameter types
}
struct PluginStatisticData {
1: optional i32 bot_quote, // 为空就不展示
1: optional i32 bot_quote, // If it is empty, it will not be displayed.
}
struct APIExtend {
1: PluginToolAuthType auth_mode, // tool维度授权类型
1: PluginToolAuthType auth_mode, // Tool dimension authorization type
}
// 插件预置卡片绑定信息
// Plugin preset card binding information
struct PresetCardBindingInfo{
1: string card_id ,
2: string card_version_num,
3: PluginCardStatus status ,
4: string thumbnail , // 缩略图
4: string thumbnail , // thumbnail
}
struct DebugExample {
@@ -365,28 +365,28 @@ struct GetUserAuthorityData {
6: bool can_read_changelog
}
// 授权状态
// authorization status
enum OAuthStatus {
Authorized = 1,
Unauthorized = 2,
}
struct CheckAndLockPluginEditData {
1: bool Occupied, // 是否已被占用
2: Creator user , // 如果已经被占用了,返回用户ID
3: bool Seized , // 是否强占成功
1: bool Occupied, // Is it occupied?
2: Creator user , // If it is already occupied, return the user ID.
3: bool Seized , // Was it successful?
}
struct PluginPublishInfo {
1 : i64 publisher_id (api.js_conv = "str"), // 发布人
2 : i64 version_ts , // 版本,毫秒时间戳
3 : string version_name, // 版本名称
4 : string version_desc, // 版本描述
1 : i64 publisher_id (api.js_conv = "str"), // publisher
2 : i64 version_ts , // Version, millisecond timestamp
3 : string version_name, // version name
4 : string version_desc, // version description
}
enum DebugOperation{
Debug = 1, // 调试,会保存调试状态,会校验返回值
Parse = 2, // 仅解析返回值结构
Debug = 1, // Debugging, the debugging state will be saved, and the return value will be checked.
Parse = 2, // Parse only the return value structure
}
struct RegisterPluginData {
@@ -395,8 +395,8 @@ struct RegisterPluginData {
}
enum ScopeType {
All = 0, // 所有
Self = 1, // 自己
All = 0, // all
Self = 1, // self
}
enum OrderBy {
@@ -407,9 +407,9 @@ enum OrderBy {
}
enum PluginTypeForFilter {
CloudPlugin = 1, // 包含PLUGINAPP
LocalPlugin = 2, // 包含LOCAL
WorkflowPlugin = 3, // 包含WORKFLOWIMAGEFLOW
CloudPlugin = 1, // Includes PLUGIN and APP.
LocalPlugin = 2, // Include LOCAL
WorkflowPlugin = 3, // Includes WORKFLOW and IMAGEFLOW
}
enum PluginDataFormat {

View File

@@ -4,15 +4,15 @@ include "../base.thrift"
include "resource_common.thrift"
struct LibraryResourceListRequest {
1 : optional i32 user_filter , // 是否由当前用户创建0-不筛选1-当前用户
2 : optional list<resource_common.ResType> res_type_filter , // [4,1] 0代表不筛选
3 : optional string name , // 名称
4 : optional resource_common.PublishStatus publish_status_filter, // 发布状态0-不筛选1-未发布2-已发布
5 : required i64 space_id (agw.js_conv="str", api.js_conv="true"), // 用户所在空间ID
7 : optional i32 size , // 一次读取的数据条数默认10最大100.
9 : optional string cursor , // 游标用于分页默认0第一次请求可以不传后续请求需要带上上次返回的cursor
10 : optional list<string> search_keys , // 用来指定自定义搜索的字段 不填默认只name匹配eg []string{name,自定} 匹配name和自定义字段full_text
11 : optional bool is_get_imageflow , // res_type_filter[2 workflow]时,是否需要返回图片流
1 : optional i32 user_filter , // Whether created by the current user, 0 - unfiltered, 1 - current user
2 : optional list<resource_common.ResType> res_type_filter , // [4,1] 0 means do not filter
3 : optional string name , // name
4 : optional resource_common.PublishStatus publish_status_filter, // Published status, 0 - unfiltered, 1 - unpublished, 2 - published
5 : required i64 space_id (agw.js_conv="str", api.js_conv="true"), // User's space ID
7 : optional i32 size , // The number of data bars read at one time, the default is 10, and the maximum is 100.
9 : optional string cursor , // Cursor, used for paging, default 0, the first request can not be passed, subsequent requests need to bring the last returned cursor
10 : optional list<string> search_keys , // The field used to specify the custom search, do not fill in the default only name matches, eg [] string {name, custom} matches the name and custom fields full_text
11 : optional bool is_get_imageflow , // Do you need to return image review when the res_type_filter is [2 workflow]
255: base.Base Base ,
}
@@ -20,15 +20,15 @@ struct LibraryResourceListResponse {
1 : i64 code ,
2 : string msg ,
3 : list<resource_common.ResourceInfo> resource_list,
5 : optional string cursor , // 游标用于下次请求的cursor
6 : bool has_more , // 是否还有数据待拉取
5 : optional string cursor , // Cursor, the cursor for the next request
6 : bool has_more , // Is there still data to be pulled?
255: required base.BaseResp BaseResp ,
}
struct ProjectResourceListRequest {
1 : required i64 project_id (agw.js_conv="str", api.js_conv="true"), // 项目ID
2 : i64 space_id (agw.js_conv="str", api.js_conv="true"), // 用户所在space id
3 : optional string project_version, // 指定获取某个版本的project的资源
1 : required i64 project_id (agw.js_conv="str", api.js_conv="true"), // Project ID
2 : i64 space_id (agw.js_conv="str", api.js_conv="true"), // User space id
3 : optional string project_version, // Specify the resources to obtain a version of the project
255: base.Base Base ,
}
@@ -40,30 +40,30 @@ struct ProjectResourceListResponse {
}
struct ResourceCopyDispatchRequest {
// 场景,只支持单资源的操作
// Scenario, only supports the operation of a single resource
1 : resource_common.ResourceCopyScene scene,
// 被用户选择复制/移动的资源ID
// The resource ID selected by the user to copy/move
2 : i64 res_id (api.js_conv="true", api.body="res_id")
3 : resource_common.ResType res_type
// 所在项目ID
// Project ID
4 : optional i64 project_id (api.js_conv="true", api.body="project_id")
5 : optional string res_name
6 : optional i64 target_space_id (api.js_conv="true", api.body="target_space_id") // 跨空间复制的目标space id
6 : optional i64 target_space_id (api.js_conv="true", api.body="target_space_id") // Target space id for cross-space copy
255: base.Base Base,
}
struct ResourceCopyDispatchResponse {
1 : i64 code,
2 : string msg,
3 : optional string task_id, // 复制任务id, 用于查询任务状态或取消、重试任务
// 不可以进行操作的原因,返回多语言文本
3 : optional string task_id, // Copy task ID, used to query task status or cancel or retry tasks
// The reason why the operation cannot be performed is to return multilingual text
4 : optional list<resource_common.ResourceCopyFailedReason> failed_reasons,
255: required base.BaseResp BaseResp,
}
struct ResourceCopyDetailRequest {
1 : string task_id, // 复制任务id, 用于查询任务状态或取消、重试任务
1 : string task_id, // Copy task ID, used to query task status or cancel or retry tasks
255: base.Base Base,
}
@@ -76,20 +76,20 @@ struct ResourceCopyDetailResponse {
struct ResourceCopyRetryRequest {
1 : string task_id, // 复制任务id, 用于查询任务状态或取消、重试任务
1 : string task_id, // Copy task ID, used to query task status or cancel or retry tasks
255: base.Base Base,
}
struct ResourceCopyRetryResponse {
1 : i64 code,
2 : string msg,
// 不可以进行操作的原因,返回多语言文本
// The reason why the operation cannot be performed is to return multilingual text
4 : optional list<resource_common.ResourceCopyFailedReason> failed_reasons,
255: required base.BaseResp BaseResp,
}
struct ResourceCopyCancelRequest {
1 : string task_id, // 复制任务id, 用于查询任务状态或取消、重试任务
1 : string task_id, // Copy task ID, used to query task status or cancel or retry tasks
255: base.Base Base,
}
@@ -102,7 +102,7 @@ struct ResourceCopyCancelResponse {
service ResourceService {
LibraryResourceListResponse LibraryResourceList(1: LibraryResourceListRequest request)(api.post='/api/plugin_api/library_resource_list', api.category="resource", api.gen_path="resource", agw.preserve_base="true")
ProjectResourceListResponse ProjectResourceList(1: ProjectResourceListRequest request)(api.post='/api/plugin_api/project_resource_list', api.category="resource", api.gen_path="resource", agw.preserve_base="true")
// 复制Library资源到项目、复制项目资源到Library、移动项目资源到Library、项目内单复制资源
// Copy Library resources to projects, copy project resources to libraries, move project resources to libraries, and copy resources within projects
ResourceCopyDispatchResponse ResourceCopyDispatch (1: ResourceCopyDispatchRequest req) (api.post='/api/plugin_api/resource_copy_dispatch', api.category="resource", api.gen_path="resource", agw.preserve_base="true")
ResourceCopyDetailResponse ResourceCopyDetail (1: ResourceCopyDetailRequest req) (api.post='/api/plugin_api/resource_copy_detail', api.category="resource", api.gen_path="resource", agw.preserve_base="true")
ResourceCopyRetryResponse ResourceCopyRetry (1: ResourceCopyRetryRequest req) (api.post='/api/plugin_api/resource_copy_retry', api.category="resource", api.gen_path="resource", agw.preserve_base="true")

View File

@@ -13,31 +13,31 @@ enum ResType{
}
enum PublishStatus {
UnPublished = 1, // 未发布
Published = 2, // 已发布
UnPublished = 1, // unpublished
Published = 2, // Published
}
enum ActionKey{
Copy = 1, // 复制
Delete = 2, // 删除
EnableSwitch = 3, // 启用/禁用
Edit = 4, // 编辑
SwitchToFuncflow = 8, // 切换成funcflow
SwitchToChatflow = 9, // 切换成chatflow
CrossSpaceCopy = 10, // 跨空间复制
Copy = 1, // copy
Delete = 2, // delete
EnableSwitch = 3, // enable/disable
Edit = 4, // edit
SwitchToFuncflow = 8, // Switch to funcflow
SwitchToChatflow = 9, // Switch to chatflow
CrossSpaceCopy = 10, // Cross-space copy
}
enum ProjectResourceActionKey{
Rename = 1, //重命名
Copy = 2, //创建副本/复制到当前项目
CopyToLibrary = 3, //复制到资源库
MoveToLibrary = 4, //移动到资源库
Delete = 5, //删除
Enable = 6, //启用
Disable = 7, //禁用
SwitchToFuncflow = 8, // 切换成funcflow
SwitchToChatflow = 9, // 切换成chatflow
UpdateDesc = 10, // 修改描述
Rename = 1, //rename
Copy = 2, //Create a copy/copy to the current project
CopyToLibrary = 3, //Copy to Library
MoveToLibrary = 4, //Move to Library
Delete = 5, //delete
Enable = 6, //enable
Disable = 7, //disable
SwitchToFuncflow = 8, // Switch to funcflow
SwitchToChatflow = 9, // Switch to chatflow
UpdateDesc = 10, // Modify description
}
enum ProjectResourceGroupType{
@@ -47,87 +47,87 @@ enum ProjectResourceGroupType{
}
enum ResourceCopyScene {
CopyProjectResource = 1, //复制项目内的资源,浅拷贝
CopyResourceToLibrary = 2, //复制项目资源到Library复制后要发布
MoveResourceToLibrary = 3, //移动项目资源到Library复制后要发布后置要删除项目资源
CopyResourceFromLibrary = 4, //复制Library资源到项目
CopyProject = 5, //复制项目,连带资源要复制。复制当前草稿。
PublishProject = 6, //项目发布到渠道,连带资源需要发布(含商店)。以当前草稿发布。
CopyProjectTemplate = 7, // 复制项目模板。
PublishProjectTemplate = 8, // 项目发布到模板,以项目的指定版本发布成临时模板。
LaunchTemplate = 9, // 模板审核通过,上架,根据临时模板复制正式模板。
ArchiveProject = 10, // 草稿版本存档
RollbackProject = 11, // 线上版本加载到草稿,草稿版本加载到草稿
CrossSpaceCopy = 12, // 单个资源跨空间复制
CrossSpaceCopyProject = 13, // 项目跨空间复制
CopyProjectResource = 1, //Copy resources within the project, shallow copy
CopyResourceToLibrary = 2, //Copy the project resources to the Library, and publish after copying
MoveResourceToLibrary = 3, //Move project resources to Library, copy to publish, and delete project resources later
CopyResourceFromLibrary = 4, //Copy Library Resources to Project
CopyProject = 5, //Copy the project, along with the resources. Copy the current draft.
PublishProject = 6, //The project is published to the channel, and the associated resources need to be published (including the store). Publish with the current draft.
CopyProjectTemplate = 7, // Copy the project template.
PublishProjectTemplate = 8, // The project is published to a template, and the specified version of the project is published as a temporary template.
LaunchTemplate = 9, // The template is approved, put on the shelves, and the official template is copied according to the temporary template.
ArchiveProject = 10, // Draft version archive
RollbackProject = 11, // Online version loaded into draft, draft version loaded into draft
CrossSpaceCopy = 12, // Cross-space copy of a single resource
CrossSpaceCopyProject = 13, // item cross-space copy
}
// Library资源操作
// Library Resource Operations
struct ResourceAction{
// 一个操作对应一个唯一的keykey由资源侧约束
// An operation corresponds to a unique key, and the key is constrained by the resource side
1: required ActionKey Key (go.tag = "json:\"key\"", agw.key = "key") ,
//ture=可以操作该Actionfalse=置灰
//ture = can operate this Action, false = grey out
2: required bool Enable (go.tag = "json:\"enable\"", agw.key = "enable"),
}
// 前端用
// front end
struct ResourceInfo{
1 : optional i64 ResID (agw.js_conv="str", agw.key = "res_id", api.js_conv="true", api.body="res_id") , // 资源id
2 : optional ResType ResType (go.tag = "json:\"res_type\"", agw.key = "res_type") , // 资源类型
// 资源子类型,由资源实现方定义。
1 : optional i64 ResID (agw.js_conv="str", agw.key = "res_id", api.js_conv="true", api.body="res_id") , // Resource ID
2 : optional ResType ResType (go.tag = "json:\"res_type\"", agw.key = "res_type") , // resource type
// Resource subtype, defined by the resource implementer.
// Plugin1-Http; 2-App; 6-LocalKnowledge0-text; 1-table; 2-imageUI1-Card
3 : optional i32 ResSubType (go.tag = "json:\"res_sub_type\"", agw.key = "res_sub_type") ,
4 : optional string Name (go.tag = "json:\"name\"", agw.key = "name") , // 资源名称
5 : optional string Desc (go.tag = "json:\"desc\"", agw.key = "desc") , // 资源描述
6 : optional string Icon (go.tag = "json:\"icon\"", agw.key = "icon") , // 资源Icon完整url
7 : optional i64 CreatorID (agw.js_conv="str", agw.key = "creator_id", api.js_conv="true", api.body="creator_id") , // 资源创建者
8 : optional string CreatorAvatar (go.tag = "json:\"creator_avatar\"", agw.key = "creator_avatar") , // 资源创建者
9 : optional string CreatorName (go.tag = "json:\"creator_name\"", agw.key = "creator_name") , // 资源创建者
10: optional string UserName (go.tag = "json:\"user_name\"", agw.key = "user_name") , // 资源创建者
11: optional PublishStatus PublishStatus (go.tag = "json:\"publish_status\"", agw.key = "publish_status") , // 资源发布状态1-未发布2-已发布
12: optional i32 BizResStatus (go.tag = "json:\"biz_res_status\"", agw.key = "biz_res_status") , // 资源状态,各类型资源自身定义
13: optional bool CollaborationEnable (go.tag = "json:\"collaboration_enable\"", agw.key = "collaboration_enable"), // 是否开启多人编辑
14: optional i64 EditTime (agw.key = "edit_time", api.js_conv="true", api.body="edit_time") , // 最近编辑时间, unix秒级时间戳
15: optional i64 SpaceID (agw.js_conv="str", agw.key = "space_id", api.js_conv="true", api.body="space_id") , // 资源所属空间ID
16: optional map<string,string> BizExtend (go.tag = "json:\"biz_extend\"", agw.key = "biz_extend") , // 业务携带的扩展信息以res_type区分每个res_type定义的schema和含义不一样使用前需要判断res_type
17: optional list<ResourceAction> Actions (go.tag = "json:\"actions\"", agw.key = "actions") , // 不同类型的不同操作按钮,由资源实现方和前端约定。返回则展示,要隐藏某个按钮,则不要返回;
18: optional bool DetailDisable (go.tag = "json:\"detail_disable\"", agw.key = "detail_disable") , // 是否禁止进详情页
19: optional bool DelFlag (go.tag = "json:\"del_flag\"", agw.key = "del_flag") , // [数据延迟优化]删除标识符true-已删除-前端隐藏该itemfalse-正常
4 : optional string Name (go.tag = "json:\"name\"", agw.key = "name") , // resource name
5 : optional string Desc (go.tag = "json:\"desc\"", agw.key = "desc") , // resource description
6 : optional string Icon (go.tag = "json:\"icon\"", agw.key = "icon") , // Resource Icon, full url
7 : optional i64 CreatorID (agw.js_conv="str", agw.key = "creator_id", api.js_conv="true", api.body="creator_id") , // Resource creator
8 : optional string CreatorAvatar (go.tag = "json:\"creator_avatar\"", agw.key = "creator_avatar") , // Resource creator
9 : optional string CreatorName (go.tag = "json:\"creator_name\"", agw.key = "creator_name") , // Resource creator
10: optional string UserName (go.tag = "json:\"user_name\"", agw.key = "user_name") , // Resource creator
11: optional PublishStatus PublishStatus (go.tag = "json:\"publish_status\"", agw.key = "publish_status") , // Resource release status, 1 - unpublished, 2 - published
12: optional i32 BizResStatus (go.tag = "json:\"biz_res_status\"", agw.key = "biz_res_status") , // Resource status, each type of resource defines itself
13: optional bool CollaborationEnable (go.tag = "json:\"collaboration_enable\"", agw.key = "collaboration_enable"), // Whether to enable multi-person editing
14: optional i64 EditTime (agw.key = "edit_time", api.js_conv="true", api.body="edit_time") , // Last edited, unix timestamp
15: optional i64 SpaceID (agw.js_conv="str", agw.key = "space_id", api.js_conv="true", api.body="space_id") , // Resource Ownership Space ID
16: optional map<string,string> BizExtend (go.tag = "json:\"biz_extend\"", agw.key = "biz_extend") , // Business carry extended information to res_type distinguish, each res_type defined schema and meaning is not the same, need to judge before use res_type
17: optional list<ResourceAction> Actions (go.tag = "json:\"actions\"", agw.key = "actions") , // Different types of different operation buttons are agreed upon by the resource implementer and the front end. Return is displayed, if you want to hide a button, do not return;
18: optional bool DetailDisable (go.tag = "json:\"detail_disable\"", agw.key = "detail_disable") , // Whether to ban entering the details page
19: optional bool DelFlag (go.tag = "json:\"del_flag\"", agw.key = "del_flag") , // [Data delay optimization] Delete identifier, true-deleted-frontend hides the item, false-normal
}
struct ProjectResourceAction{
// 一个操作对应一个唯一的keykey由资源侧约束
// An operation corresponds to a unique key, and the key is constrained by the resource side
1 : required ProjectResourceActionKey Key (go.tag = "json:\"key\"", agw.key = "key"),
//ture=可以操作该Actionfalse=置灰
//ture = can operate this Action, false = grey out
2 : required bool Enable (go.tag = "json:\"enable\"", agw.key = "enable"),
// enable=false提示文案。后端返回Starling Key注意放在同一个space下。
// When enable = false, prompt the copywriter. The backend returns the Starling Key, be careful to put it under the same space.
3: optional string Hint (go.tag = "json:\"hint\"", agw.key = "hint"),
}
// 实现方提供展示信息
// The implementer provides display information
struct ProjectResourceInfo{
// 资源id
// Resource ID
1 : i64 ResID (api.js_conv="true", api.body="res_id", agw.js_conv="str", agw.key = "res_id")
// 资源名称
// resource name
2 : string Name (go.tag = "json:\"name\"", agw.key = "name")
// 不同类型的不同操作按钮,由资源实现方和前端约定。返回则展示,要隐藏某个按钮,则不要返回;
// Different types of different operation buttons are agreed upon by the resource implementer and the front end. Return is displayed, if you want to hide a button, do not return;
3 : list<ProjectResourceAction> Actions (go.tag = "json:\"actions\"", agw.key = "actions"),
// 该用户是否对资源只读
// Is the user read-only to the resource?
// 4: bool ReadOnly (go.tag = "json:\"read_only\"", agw.key = "read_only")
// 资源类型
// resource type
5 : ResType ResType (go.tag = "json:\"res_type\"", agw.key = "res_type") ,
// 资源子类型,由资源实现方定义。Plugin1-Http; 2-App; 6-LocalKnowledge0-text; 1-table; 2-imageUI1-Card
// Resource subtype, defined by the resource implementer. Plugin: 1-Http; 2-App; 6-Local; Knowledge: 0-text; 1-table; 2-image; UI: 1-Card
6 : optional i32 ResSubType (go.tag = "json:\"res_sub_type\"", agw.key = "res_sub_type") ,
// 业务携带的扩展信息以res_type区分每个res_type定义的schema和含义不一样使用前需要判断res_type
// Business carry extended information to res_type distinguish, each res_type defined schema and meaning is not the same, need to judge before use res_type
7 : optional map<string, string> BizExtend (go.tag = "json:\"biz_extend\"", agw.key = "biz_extend"),
// 资源状态,各类型资源自身定义。前端与各资源方约定。
// Resource status, each type of resource defines itself. The front end agrees with each resource party.
8 : optional i32 BizResStatus (go.tag = "json:\"biz_res_status\"", agw.key = "biz_res_status") ,
// 当前资源的编辑态版本
// The edited version of the current resource
9 : optional string VersionStr(go.tag = "json:\"version_str\"", agw.key = "version_str")
}
struct ProjectResourceGroup{
1 : ProjectResourceGroupType GroupType (go.tag = "json:\"group_type\"", agw.key = "group_type") , // 资源分组
1 : ProjectResourceGroupType GroupType (go.tag = "json:\"group_type\"", agw.key = "group_type") , // resource grouping
2 : optional list<ProjectResourceInfo> ResourceList (go.tag = "json:\"resource_list\"", agw.key = "resource_list"),
}
@@ -136,9 +136,9 @@ struct ResourceCopyFailedReason {
2 : ResType ResType (go.tag = "json:\"res_type\"", agw.key = "res_type")
3 : string ResName (go.tag = "json:\"res_name\"", agw.key = "res_name")
4 : string Reason (go.tag = "json:\"reason\"", agw.key = "reason")
// 废弃
// abandoned
5 : optional i64 PublishVersion(go.tag = "json:\"publish_version\"", agw.key = "publish_version")
// 资源的当前版本为nil或空字符串都看作是最新版本。项目发布版本或Library发布版本。
// The current version of the resource, either nil or empty string, is considered the latest version. Project release or Library release.
6 : optional string PublishVersionStr(go.tag = "json:\"publish_version_str\"", agw.key = "publish_version_str")
}
@@ -151,9 +151,9 @@ enum TaskStatus{
struct ResourceCopyTaskDetail{
1: string task_id
2: TaskStatus status // 任务状态
3 : i64 res_id (agw.js_conv="str", api.js_conv="true") // 复制后的资源id
2: TaskStatus status // task status
3 : i64 res_id (agw.js_conv="str", api.js_conv="true") // Replicated resource id
4 : ResType res_type
5 : ResourceCopyScene scene,
6: optional string res_name, // 复制前的资源名称
6: optional string res_name, // Resource name before copy
}