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

@@ -9,17 +9,17 @@ import (
"github.com/apache/thrift/lib/go/thrift"
)
// 类型
// type
type FormatType int64
const (
// 文本
// Text
FormatType_Text FormatType = 0
// 表格
// table
FormatType_Table FormatType = 1
// 图片
// image
FormatType_Image FormatType = 2
// 数据库
// database
FormatType_Database FormatType = 3
)
@@ -158,9 +158,9 @@ func (p *ContentSchema) Value() (driver.Value, error) {
type CaptionType int64
const (
// 智能标注
// intelligent annotation
CaptionType_Auto CaptionType = 0
// 人工标注
// manual annotation
CaptionType_Manual CaptionType = 1
)
@@ -202,19 +202,19 @@ func (p *CaptionType) Value() (driver.Value, error) {
type DocumentStatus int64
const (
// 上传中
// Uploading
DocumentStatus_Processing DocumentStatus = 0
// 生效
// take effect
DocumentStatus_Enable DocumentStatus = 1
// 失效
// failure
DocumentStatus_Disable DocumentStatus = 2
// 删除
// delete
DocumentStatus_Deleted DocumentStatus = 3
// 重新分片中,调用方不感知该状态
// In rescaling, the caller is not aware of the state
DocumentStatus_Resegment DocumentStatus = 4
// 刷新中(刷新成功后会删除)
// Refreshing (will be deleted after successful refresh)
DocumentStatus_Refreshing DocumentStatus = 5
// 失败
// fail
DocumentStatus_Failed DocumentStatus = 9
)
@@ -276,9 +276,9 @@ func (p *DocumentStatus) Value() (driver.Value, error) {
type DocumentSource int64
const (
// 本地文件上传
// local file upload
DocumentSource_Document DocumentSource = 0
// 自定义类型
// custom type
DocumentSource_Custom DocumentSource = 2
)
@@ -320,9 +320,9 @@ func (p *DocumentSource) Value() (driver.Value, error) {
type ParsingType int64
const (
//快速解析
//fast parse
ParsingType_FastParsing ParsingType = 0
//精准解析
//accurate analysis
ParsingType_AccurateParsing ParsingType = 1
)
@@ -361,7 +361,7 @@ func (p *ParsingType) Value() (driver.Value, error) {
return int64(*p), nil
}
// 排序字段
// sort field
type OrderField int64
const (
@@ -404,7 +404,7 @@ func (p *OrderField) Value() (driver.Value, error) {
return int64(*p), nil
}
// 排序规则
// OrderType
type OrderType int64
const (
@@ -450,13 +450,13 @@ func (p *OrderType) Value() (driver.Value, error) {
type ReviewStatus int64
const (
// 处理中
// Processing
ReviewStatus_Processing ReviewStatus = 0
// 已完成
// Completed.
ReviewStatus_Enable ReviewStatus = 1
// 失败
// fail
ReviewStatus_Failed ReviewStatus = 2
// 失败
// fail
ReviewStatus_ForceStop ReviewStatus = 3
)
@@ -504,23 +504,23 @@ func (p *ReviewStatus) Value() (driver.Value, error) {
}
type ChunkStrategy struct {
// 分隔符,如句号
// A separator, such as a period
Separator string `thrift:"separator,1" form:"separator" json:"separator" query:"separator"`
// 分片的最大token数
// Maximum number of tokens for sharding
MaxTokens int64 `thrift:"max_tokens,2" form:"max_tokens" json:"max_tokens" query:"max_tokens"`
// 替换掉连续的空格、换行符和制表符
// Replace consecutive spaces, newlines, and tabs
RemoveExtraSpaces bool `thrift:"remove_extra_spaces,3" form:"remove_extra_spaces" json:"remove_extra_spaces" query:"remove_extra_spaces"`
// 是否去除url和email
// Remove URL and email
RemoveUrlsEmails bool `thrift:"remove_urls_emails,4" form:"remove_urls_emails" json:"remove_urls_emails" query:"remove_urls_emails"`
// 如果为0, 则不使用以上字段的配置
// If 0, the configuration of the above fields is not used
ChunkType ChunkType `thrift:"chunk_type,5" form:"chunk_type" json:"chunk_type" query:"chunk_type"`
// 图片类型,图片描述文字的标注方式
// Image type, image description text annotation method
CaptionType *CaptionType `thrift:"caption_type,7,optional" form:"caption_type" json:"caption_type,omitempty" query:"caption_type"`
//分段重叠度
//segmented overlap
Overlap *int64 `thrift:"overlap,8,optional" form:"overlap" json:"overlap,omitempty" query:"overlap"`
//最大层级数(按层级分段时生效)
//Maximum number of levels (effective when segmented by level)
MaxLevel *int64 `thrift:"max_level,9,optional" form:"max_level" json:"max_level,omitempty" query:"max_level"`
//切片保留层级标题(按层级分段时生效)
//Slice preserves level headers (effective when segmented by level)
SaveTitle *bool `thrift:"save_title,10,optional" form:"save_title" json:"save_title,omitempty" query:"save_title"`
}
@@ -1057,13 +1057,13 @@ func (p *ChunkStrategy) String() string {
}
type ParsingStrategy struct {
//解析类型
//parse type
ParsingType *ParsingType `thrift:"parsing_type,1,optional" form:"parsing_type" json:"parsing_type,omitempty" query:"parsing_type"`
//是否开启图片元素提取(精准解析时生效)
//Whether to enable image element extraction (effective when accurately parsing)
ImageExtraction *bool `thrift:"image_extraction,2,optional" form:"image_extraction" json:"image_extraction,omitempty" query:"image_extraction"`
//是否开启表格元素提取(精准解析时生效)
//Whether to enable table element extraction (effective when accurately parsing)
TableExtraction *bool `thrift:"table_extraction,3,optional" form:"table_extraction" json:"table_extraction,omitempty" query:"table_extraction"`
//是否开启图片OCR精准解析时生效
//Whether to turn on picture OCR (effective when accurate analysis)
ImageOcr *bool `thrift:"image_ocr,4,optional" form:"image_ocr" json:"image_ocr,omitempty" query:"image_ocr"`
}
@@ -1380,13 +1380,13 @@ func (p *ParsingStrategy) String() string {
}
type IndexStrategy struct {
//是否开启向量索引(默认为true
//Whether to enable vector indexing (default is true)
VectorIndexing *bool `thrift:"vector_indexing,1,optional" form:"vector_indexing" json:"vector_indexing,omitempty" query:"vector_indexing"`
//是否开启关键词索引(默认为true
//Whether to enable keyword indexing (default is true)
KeywordIndexing *bool `thrift:"keyword_indexing,2,optional" form:"keyword_indexing" json:"keyword_indexing,omitempty" query:"keyword_indexing"`
//是否开启分层索引
//Whether to enable hierarchical indexing
HierarchicalIndexing *bool `thrift:"hierarchical_indexing,3,optional" form:"hierarchical_indexing" json:"hierarchical_indexing,omitempty" query:"hierarchical_indexing"`
//向量模型
//vector model
Model *string `thrift:"model,4,optional" form:"model" json:"model,omitempty" query:"model"`
}
@@ -1702,7 +1702,7 @@ func (p *IndexStrategy) String() string {
}
type FilterStrategy struct {
//过滤页数
//filter pages
FilterPage []int32 `thrift:"filter_page,1,optional" form:"filter_page" json:"filter_page,omitempty" query:"filter_page"`
}
@@ -1873,7 +1873,7 @@ func (p *FilterStrategy) String() string {
}
type SinkStrategy struct {
// 是否检查索引成功
// Check whether the index was successful
CheckIndex bool `thrift:"check_index,1" form:"check_index" json:"check_index" query:"check_index"`
}

View File

@@ -3,11 +3,11 @@
package dataset
import (
"github.com/coze-dev/coze-studio/backend/api/model/base"
"database/sql"
"database/sql/driver"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/coze-dev/coze-studio/backend/api/model/base"
)
type DatasetStatus int64
@@ -15,9 +15,9 @@ type DatasetStatus int64
const (
DatasetStatus_DatasetProcessing DatasetStatus = 0
DatasetStatus_DatasetReady DatasetStatus = 1
// 软删
// soft delete
DatasetStatus_DatasetDeleted DatasetStatus = 2
// 不启用
// Do not enable
DatasetStatus_DatasetForbid DatasetStatus = 3
DatasetStatus_DatasetFailed DatasetStatus = 9
)
@@ -154,18 +154,18 @@ func (p *DatasetSource) Value() (driver.Value, error) {
}
type CreateDatasetRequest struct {
// 知识库名称长度不超过100个字符
// Knowledge base name, no more than 100 characters in length
Name string `thrift:"name,1" form:"name" json:"name" query:"name"`
// 知识库描述
// Knowledge Base Description
Description string `thrift:"description,2" form:"description" json:"description" query:"description"`
// 空间ID
// Space ID
SpaceID int64 `thrift:"space_id,3" form:"space_id" json:"space_id,string" query:"space_id"`
// 知识库头像URI
// Knowledge Base Avatar URI
IconURI string `thrift:"icon_uri,4" form:"icon_uri" json:"icon_uri" query:"icon_uri"`
FormatType FormatType `thrift:"format_type,5" form:"format_type" json:"format_type" query:"format_type"`
// 开放给第三方的业务标识, coze 传 0 或者不传
// Open to third-party business identity, coze pass 0 or no pass
BizID int64 `thrift:"biz_id,6" form:"biz_id" json:"biz_id,string" query:"biz_id"`
//新增project ID
//project ID
ProjectID int64 `thrift:"project_id,7" form:"project_id" json:"project_id,string" query:"project_id"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -920,7 +920,7 @@ func (p *CreateDatasetResponse) String() string {
type DatasetDetailRequest struct {
DatasetIDs []string `thrift:"DatasetIDs,1" form:"dataset_ids" json:"dataset_ids"`
//新增project ID
// project ID
ProjectID int64 `thrift:"project_id,3" form:"project_id" json:"project_id,string" query:"project_id"`
SpaceID int64 `thrift:"space_id,2" form:"space_id" json:"space_id,string" query:"space_id"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
@@ -1549,44 +1549,44 @@ func (p *DatasetDetailResponse) String() string {
type Dataset struct {
DatasetID int64 `thrift:"dataset_id,1" form:"dataset_id" json:"dataset_id,string" query:"dataset_id"`
// 数据集名称
// Dataset name
Name string `thrift:"name,2" form:"name" json:"name" query:"name"`
// 文件列表
// file list
FileList []string `thrift:"file_list,3" form:"file_list" json:"file_list" query:"file_list"`
// 所有文件大小
// All file sizes
AllFileSize int64 `thrift:"all_file_size,4" form:"all_file_size" json:"all_file_size,string" query:"all_file_size"`
// 使用Bot
// Bot count
BotUsedCount int32 `thrift:"bot_used_count,5" form:"bot_used_count" json:"bot_used_count" query:"bot_used_count"`
Status DatasetStatus `thrift:"status,6" form:"status" json:"status" query:"status"`
// 处理中的文件名称列表,兼容老逻辑
// List of file names in process, compatible with old logic
ProcessingFileList []string `thrift:"processing_file_list,7" form:"processing_file_list" json:"processing_file_list" query:"processing_file_list"`
// 更新时间,秒级时间戳
// Update time, second timestamp
UpdateTime int32 `thrift:"update_time,8" form:"update_time" json:"update_time" query:"update_time"`
IconURL string `thrift:"icon_url,9" form:"icon_url" json:"icon_url" query:"icon_url"`
Description string `thrift:"description,10" form:"description" json:"description" query:"description"`
IconURI string `thrift:"icon_uri,11" form:"icon_uri" json:"icon_uri" query:"icon_uri"`
// 是否可以编辑
// Can it be edited?
CanEdit bool `thrift:"can_edit,12" form:"can_edit" json:"can_edit" query:"can_edit"`
// 创建时间,秒级时间戳
// create_time, second timestamp
CreateTime int32 `thrift:"create_time,13" form:"create_time" json:"create_time" query:"create_time"`
// 创建者ID
// creator ID
CreatorID int64 `thrift:"creator_id,14" form:"creator_id" json:"creator_id,string" query:"creator_id"`
// 空间ID
// Space ID
SpaceID int64 `thrift:"space_id,15" form:"space_id" json:"space_id,string" query:"space_id"`
// 处理失败的文件
// Processing failed files
FailedFileList []string `thrift:"failed_file_list,18" form:"failed_file_list" json:"failed_file_list" query:"failed_file_list"`
FormatType FormatType `thrift:"format_type,19" form:"format_type" json:"format_type" query:"format_type"`
// 分段数量
// number of segments
SliceCount int32 `thrift:"slice_count,20" form:"slice_count" json:"slice_count" query:"slice_count"`
// 命中次数
// hit count
HitCount int32 `thrift:"hit_count,21" form:"hit_count" json:"hit_count" query:"hit_count"`
// 文档数量
// number of documents
DocCount int32 `thrift:"doc_count,22" form:"doc_count" json:"doc_count" query:"doc_count"`
// 切片规则
// slicing rule
ChunkStrategy *ChunkStrategy `thrift:"chunk_strategy,23" form:"chunk_strategy" json:"chunk_strategy" query:"chunk_strategy"`
// 处理中的文件ID列表
// List of file IDs in process
ProcessingFileIDList []string `thrift:"processing_file_id_list,24" form:"processing_file_id_list" json:"processing_file_id_list" query:"processing_file_id_list"`
//新增project ID
//project ID
ProjectID string `thrift:"project_id,25" form:"project_id" json:"project_id" query:"project_id"`
}
@@ -2784,17 +2784,17 @@ type ListDatasetRequest struct {
Page *int32 `thrift:"page,3,optional" form:"page" json:"page,omitempty" query:"page"`
Size *int32 `thrift:"size,4,optional" form:"size" json:"size,omitempty" query:"size"`
SpaceID int64 `thrift:"space_id,5" form:"space_id" json:"space_id,string" query:"space_id"`
// 排序字段
// sort field
OrderField *OrderField `thrift:"order_field,6,optional" form:"order_field" json:"order_field,omitempty" query:"order_field"`
// 排序规则
// order_type
OrderType *OrderType `thrift:"order_type,7,optional" form:"order_type" json:"order_type,omitempty" query:"order_type"`
// 如果传了指定值, 就放开校验
// If the specified value is passed, the verification is released
SpaceAuth *string `thrift:"space_auth,8,optional" form:"space_auth" json:"space_auth,omitempty" query:"space_auth"`
// 开放给第三方的业务标识
// Business identity open to third parties
BizID *int64 `thrift:"biz_id,9,optional" form:"biz_id" json:"biz_id,string,omitempty" query:"biz_id"`
// 是否需要拉取引用bots的数量会增加响应延时
// Whether the number of reference bots needs to be pulled will increase the response delay
NeedRefBots *bool `thrift:"need_ref_bots,10,optional" form:"need_ref_bots" json:"need_ref_bots,omitempty" query:"need_ref_bots"`
//新增project ID
//project ID
ProjectID *string `thrift:"project_id,11,optional" form:"project_id" json:"project_id,omitempty" query:"project_id"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -3848,15 +3848,15 @@ func (p *ListDatasetResponse) String() string {
}
type DatasetFilter struct {
// 如果都设置了And 关系
// The following conditions are related to and
Name *string `thrift:"name,1,optional" form:"name" json:"name,omitempty" query:"name"`
// 知识库id列表
// Knowledge id list
DatasetIds []string `thrift:"dataset_ids,2,optional" form:"dataset_ids" json:"dataset_ids,omitempty" query:"dataset_ids"`
// 来源
// source
SourceType *DatasetSource `thrift:"source_type,3,optional" form:"source_type" json:"source_type,omitempty" query:"source_type"`
// 搜索类型
// search type
ScopeType *DatasetScopeType `thrift:"scope_type,4,optional" form:"scope_type" json:"scope_type,omitempty" query:"scope_type"`
// 类型
// type
FormatType *FormatType `thrift:"format_type,5,optional" form:"format_type" json:"format_type,omitempty" query:"format_type"`
}
@@ -4694,13 +4694,13 @@ func (p *DeleteDatasetResponse) String() string {
}
type UpdateDatasetRequest struct {
// 知识库id
// Knowledge ID
DatasetID int64 `thrift:"dataset_id,1" form:"dataset_id" json:"dataset_id,string" query:"dataset_id"`
// 知识库名称,不能为空
// Knowledge base name, cannot be empty
Name string `thrift:"name,2" form:"name" json:"name" query:"name"`
// 知识库icon
// Knowledge base icon
IconURI string `thrift:"icon_uri,3" form:"icon_uri" json:"icon_uri" query:"icon_uri"`
// 知识库描述
// Knowledge Base Description
Description string `thrift:"description,4" form:"description" json:"description" query:"description"`
Status *DatasetStatus `thrift:"status,5,optional" form:"status" json:"status,omitempty" query:"status"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`

View File

@@ -3,28 +3,28 @@
package dataset
import (
"github.com/coze-dev/coze-studio/backend/api/model/base"
"database/sql"
"database/sql/driver"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/coze-dev/coze-studio/backend/api/model/base"
)
type ColumnType int64
const (
ColumnType_Unknown ColumnType = 0
// 文本
// Text
ColumnType_Text ColumnType = 1
// 数字
// number
ColumnType_Number ColumnType = 2
// 时间
// time
ColumnType_Date ColumnType = 3
// float
ColumnType_Float ColumnType = 4
// bool
ColumnType_Boolean ColumnType = 5
// 图片
// picture
ColumnType_Image ColumnType = 6
)
@@ -86,11 +86,11 @@ func (p *ColumnType) Value() (driver.Value, error) {
type TableDataType int64
const (
// schema sheets preview data
// Schema sheets and preview data
TableDataType_AllData TableDataType = 0
// 只需要 schema 结构 & Sheets
// Only need schema structure & Sheets
TableDataType_OnlySchema TableDataType = 1
// 只需要 preview data
// Just preview the data
TableDataType_OnlyPreview TableDataType = 2
)
@@ -138,7 +138,7 @@ type ListDocumentRequest struct {
DocumentIds []string `thrift:"document_ids,2,optional" form:"document_ids" json:"document_ids,omitempty" query:"document_ids"`
Page *int32 `thrift:"page,3,optional" form:"page" json:"page,omitempty" query:"page"`
Size *int32 `thrift:"size,4,optional" form:"size" json:"size,omitempty" query:"size"`
// 根据名称搜索
// Search by name
Keyword *string `thrift:"keyword,5,optional" form:"keyword" json:"keyword,omitempty" query:"keyword"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -948,55 +948,55 @@ func (p *ListDocumentResponse) String() string {
type DocumentInfo struct {
Name string `thrift:"name,1" form:"name" json:"name" query:"name"`
DocumentID int64 `thrift:"document_id,2" form:"document_id" json:"document_id,string" query:"document_id"`
// 文件链接
// file link
TosURI *string `thrift:"tos_uri,3,optional" form:"tos_uri" json:"tos_uri,omitempty" query:"tos_uri"`
// 创建时间
// create_time
CreateTime int32 `thrift:"create_time,5" form:"create_time" json:"create_time" query:"create_time"`
// 更新时间
// update time
UpdateTime int32 `thrift:"update_time,6" form:"update_time" json:"update_time" query:"update_time"`
// 创建人
// creator_id
CreatorID *int64 `thrift:"creator_id,7,optional" form:"creator_id" json:"creator_id,string,omitempty"`
// 包含分段数量
// number of segments included
SliceCount int32 `thrift:"slice_count,8" form:"slice_count" json:"slice_count" query:"slice_count"`
// 文件后缀 csv, pdf
// File suffix csv, pdf, etc
Type string `thrift:"type,9" form:"type" json:"type" query:"type"`
// 文件大小 字节数
// File size, number of bytes
Size int32 `thrift:"size,10" form:"size" json:"size" query:"size"`
// 字符数
// character count
CharCount int32 `thrift:"char_count,11" form:"char_count" json:"char_count" query:"char_count"`
// 状态
// status
Status DocumentStatus `thrift:"status,12" form:"status" json:"status" query:"status"`
// 命中次数
// hit count
HitCount int32 `thrift:"hit_count,13" form:"hit_count" json:"hit_count" query:"hit_count"`
// 来源
// source
SourceType DocumentSource `thrift:"source_type,14" form:"source_type" json:"source_type" query:"source_type"`
// 文件类型
// file type
FormatType FormatType `thrift:"format_type,18" form:"format_type" json:"format_type" query:"format_type"`
// 表格类型元数据
// Table type metadata
TableMeta []*TableColumn `thrift:"table_meta,19,optional" form:"table_meta" json:"table_meta,omitempty" query:"table_meta"`
// url 地址
// URL address
WebURL *string `thrift:"web_url,20,optional" form:"web_url" json:"web_url,omitempty" query:"web_url"`
// 状态的详细信息;如果切片失败,返回失败信息
// Details of the status; if the slice fails, return the failure information
StatusDescript *string `thrift:"status_descript,21,optional" form:"status_descript" json:"status_descript,omitempty" query:"status_descript"`
// 空间id
// Space ID
SpaceID *int64 `thrift:"space_id,24,optional" form:"space_id" json:"space_id,string,omitempty" query:"space_id"`
// 以下字段仅针对重构后的表格类型有用,用于前端判断
// The following fields are only useful for the reconstructed table type and are used for front-end judgment
EditableAppendContent *bool `thrift:"editable_append_content,26,optional" form:"editable_append_content" json:"editable_append_content,omitempty" query:"editable_append_content"`
// 切片规则
// slicing rule
ChunkStrategy *ChunkStrategy `thrift:"chunk_strategy,27" form:"chunk_strategy" json:"chunk_strategy" query:"chunk_strategy"`
// imagex 存储的文件链接
// File links stored by ImageX
ImagexURI *string `thrift:"imagex_uri,28,optional" form:"imagex_uri" json:"imagex_uri,omitempty" query:"imagex_uri"`
// 层级分段文档树Json (未使用)
// Hierarchical Segmentation Document Tree Json (unused)
DocOutline *string `thrift:"doc_outline,29,optional" form:"doc_outline" json:"doc_outline,omitempty" query:"doc_outline"`
// 解析策略
// parsing strategy
ParsingStrategy *ParsingStrategy `thrift:"parsing_strategy,30,optional" form:"parsing_strategy" json:"parsing_strategy,omitempty" query:"parsing_strategy"`
// 过滤策略
// filtering strategy
FilterStrategy *FilterStrategy `thrift:"filter_strategy,32,optional" form:"filter_strategy" json:"filter_strategy,omitempty" query:"filter_strategy"`
// 层级分段文档树 tos_url
// Hierarchical segmented document tree tos_url
DocTreeTosURL *string `thrift:"doc_tree_tos_url,33,optional" form:"doc_tree_tos_url" json:"doc_tree_tos_url,omitempty" query:"doc_tree_tos_url"`
// 预览用的原文档 tos_url
// Preview the original document tos_url
PreviewTosURL *string `thrift:"preview_tos_url,34,optional" form:"preview_tos_url" json:"preview_tos_url,omitempty" query:"preview_tos_url"`
// 预览用的原文档 tos_url
// Preview the original document tos_url
ReviewID *int64 `thrift:"review_id,35,optional" form:"review_id" json:"review_id,omitempty" query:"review_id"`
}
@@ -2454,18 +2454,18 @@ func (p *DocumentInfo) String() string {
}
type TableColumn struct {
// 列 id
// Column ID
ID int64 `thrift:"id,1" form:"id" json:"id,string"`
// 列名
// column_name
ColumnName string `thrift:"column_name,2" form:"column_name" json:"column_name" query:"column_name"`
// 是否为语义匹配列
// Is it a semantically matched column?
IsSemantic bool `thrift:"is_semantic,3" form:"is_semantic" json:"is_semantic" query:"is_semantic"`
// 列原本在 excel 的序号
// List the serial number originally in excel
Sequence int64 `thrift:"sequence,4" form:"sequence" json:"sequence,string"`
// 列类型
// column type
ColumnType *ColumnType `thrift:"column_type,5,optional" form:"column_type" json:"column_type,omitempty" query:"column_type"`
ContainsEmptyValue *bool `thrift:"contains_empty_value,6,optional" form:"contains_empty_value" json:"contains_empty_value,omitempty" query:"contains_empty_value"`
// 描述
// describe
Desc *string `thrift:"desc,7,optional" form:"desc" json:"desc,omitempty" query:"desc"`
}
@@ -2903,7 +2903,7 @@ func (p *TableColumn) String() string {
}
type DeleteDocumentRequest struct {
// 要删除的文档ID列表
// List of document IDs to delete
DocumentIds []string `thrift:"document_ids,2" form:"document_ids" json:"document_ids" query:"document_ids"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -3374,9 +3374,9 @@ func (p *DeleteDocumentResponse) String() string {
type UpdateDocumentRequest struct {
DocumentID int64 `thrift:"document_id,1" form:"document_id" json:"document_id,string" query:"document_id"`
// 需要更新就传, 更新名称
// If you need to update, please upload it and update the name.
DocumentName *string `thrift:"document_name,3,optional" form:"document_name" json:"document_name,omitempty" query:"document_name"`
// 更新表结构
// Update table structure
TableMeta []*TableColumn `thrift:"table_meta,5,optional" form:"table_meta" json:"table_meta,omitempty" query:"table_meta"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -3951,9 +3951,9 @@ func (p *UpdateDocumentResponse) String() string {
}
type UpdatePhotoCaptionRequest struct {
// 文档ID
// Document ID
DocumentID int64 `thrift:"document_id,1,required" form:"document_id,required" json:"document_id,string,required" query:"document_id,required"`
// 要更新的图片描述信息
// Picture description information to be updated
Caption string `thrift:"caption,2,required" form:"caption,required" json:"caption,required" query:"caption,required"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -4462,11 +4462,11 @@ func (p *UpdatePhotoCaptionResponse) String() string {
}
type ListPhotoRequest struct {
// 知识库ID
// Knowledge ID
DatasetID int64 `thrift:"dataset_id,1,required" form:"dataset_id,required" json:"dataset_id,string,required" query:"dataset_id,required"`
// 页数,从 1 开始
// Number of pages, starting from 1
Page *int32 `thrift:"page,2,optional" form:"page" json:"page,omitempty" query:"page"`
// 每页大小
// page size
Size *int32 `thrift:"size,3,optional" form:"size" json:"size,omitempty" query:"size"`
Filter *PhotoFilter `thrift:"filter,4,optional" form:"filter" json:"filter,omitempty" query:"filter"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
@@ -4830,11 +4830,11 @@ func (p *ListPhotoRequest) String() string {
}
type PhotoFilter struct {
// true 筛选 “已标注” 的图片false 筛选 “未标注” 的图片
// True to filter "marked" images, false to filter "unmarked" images
HasCaption *bool `thrift:"has_caption,1,optional" form:"has_caption" json:"has_caption,omitempty" query:"has_caption"`
// 搜索关键字,对图片名称和图片描述进行搜索
// Search keywords, search for image names and picture descriptions
Keyword *string `thrift:"keyword,2,optional" form:"keyword" json:"keyword,omitempty" query:"keyword"`
// 状态
// status
Status *DocumentStatus `thrift:"status,3,optional" form:"status" json:"status,omitempty" query:"status"`
}
@@ -5463,27 +5463,27 @@ func (p *ListPhotoResponse) String() string {
}
type PhotoInfo struct {
// 图片型知识库一个图片对应一个文档
// Picture Knowledge Base One picture corresponds to one document
Name string `thrift:"name,1" form:"name" json:"name" query:"name"`
// 文档ID
// Document ID
DocumentID int64 `thrift:"document_id,2" form:"document_id" json:"document_id,string" query:"document_id"`
// 图片链接
// image link
URL string `thrift:"url,3" form:"url" json:"url" query:"url"`
// 图片描述信息
// picture description information
Caption string `thrift:"caption,4" form:"caption" json:"caption" query:"caption"`
// 创建时间
// create_time
CreateTime int32 `thrift:"create_time,5" form:"create_time" json:"create_time" query:"create_time"`
// 更新时间
// update time
UpdateTime int32 `thrift:"update_time,6" form:"update_time" json:"update_time" query:"update_time"`
// 创建人
// creator_id
CreatorID int64 `thrift:"creator_id,7" form:"creator_id" json:"creator_id,string"`
// 图片后缀 jpg, png
// Image suffix jpg, png, etc
Type string `thrift:"type,8" form:"type" json:"type" query:"type"`
// 图片大小
// image size
Size int32 `thrift:"size,9" form:"size" json:"size" query:"size"`
// 状态
// status
Status DocumentStatus `thrift:"status,10" form:"status" json:"status" query:"status"`
// 来源
// source
SourceType DocumentSource `thrift:"source_type,11" form:"source_type" json:"source_type" query:"source_type"`
}
@@ -6063,9 +6063,9 @@ func (p *PhotoInfo) String() string {
}
type PhotoDetailRequest struct {
// 文档ID列表
// Document ID List
DocumentIds []string `thrift:"document_ids,1,required" form:"document_ids,required" json:"document_ids,required" query:"document_ids,required"`
// 知识库ID
// Knowledge ID
DatasetID int64 `thrift:"dataset_id,2,required" form:"dataset_id,required" json:"dataset_id,string,required" query:"dataset_id,required"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -6337,7 +6337,7 @@ func (p *PhotoDetailRequest) String() string {
}
type PhotoDetailResponse struct {
// 文档ID到图片信息的映射
// Mapping document ID to image information
PhotoInfos map[string]*PhotoInfo `thrift:"photo_infos,1" form:"photo_infos" json:"photo_infos" query:"photo_infos"`
Code int64 `thrift:"code,253,required" form:"code,required" json:"code,required" query:"code,required"`
Msg string `thrift:"msg,254,required" form:"msg,required" json:"msg,required" query:"msg,required"`
@@ -6669,15 +6669,15 @@ func (p *PhotoDetailResponse) String() string {
}
type ResegmentRequest struct {
// 知识库ID
// Knowledge ID
DatasetID int64 `thrift:"dataset_id,1" form:"dataset_id" json:"dataset_id,string" query:"dataset_id"`
// 要重新分段的文档
// Document to be re-segmented
DocumentIds []string `thrift:"document_ids,2" form:"document_ids" json:"document_ids" query:"document_ids"`
// 分段策略
// segmentation strategy
ChunkStrategy *ChunkStrategy `thrift:"chunk_strategy,3" form:"chunk_strategy" json:"chunk_strategy" query:"chunk_strategy"`
// 解析策略
// parsing strategy
ParsingStrategy *ParsingStrategy `thrift:"parsing_strategy,5,optional" form:"parsing_strategy" json:"parsing_strategy,omitempty" query:"parsing_strategy"`
// 过滤策略
// filtering strategy
FilterStrategy *FilterStrategy `thrift:"filter_strategy,7,optional" form:"filter_strategy" json:"filter_strategy,omitempty" query:"filter_strategy"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -7088,7 +7088,7 @@ func (p *ResegmentRequest) String() string {
}
type ResegmentResponse struct {
// 老版需要. 仅返回id 和名称即可
// The old version requires. Just return the id and name.
DocumentInfos []*DocumentInfo `thrift:"document_infos,1" form:"document_infos" json:"document_infos" query:"document_infos"`
Code int64 `thrift:"code,253,required" form:"code,required" json:"code,required" query:"code,required"`
Msg string `thrift:"msg,254,required" form:"msg,required" json:"msg,required" query:"msg,required"`
@@ -7406,17 +7406,17 @@ func (p *ResegmentResponse) String() string {
}
type CreateDocumentRequest struct {
// 要插入文档的知识库id
// The knowledge base id of the document to insert.
DatasetID int64 `thrift:"dataset_id,1" form:"dataset_id" json:"dataset_id,string" query:"dataset_id"`
// 知识库的类型,目前支持文本、表格、图片三种知识库
// Types of knowledge bases, currently supporting text, tables, and images
FormatType FormatType `thrift:"format_type,4" form:"format_type" json:"format_type" query:"format_type"`
// 表格类型一次只能创建一个
// Only one table type can be created at a time
DocumentBases []*DocumentBase `thrift:"document_bases,6" form:"document_bases" json:"document_bases" query:"document_bases"`
// 只在知识库中没有文档时需要传递,已有则从知识库获取.切片规则,为空则自动按段落切片
// 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
ChunkStrategy *ChunkStrategy `thrift:"chunk_strategy,17,optional" form:"chunk_strategy" json:"chunk_strategy,omitempty" query:"chunk_strategy"`
// 为 true 时向已有的 document 追加内容。text 类型不能使用
// Appends content to an existing document when true. The text type cannot be used
IsAppend *bool `thrift:"is_append,31,optional" form:"is_append" json:"is_append,omitempty" query:"is_append"`
// 解析策略
// parsing strategy
ParsingStrategy *ParsingStrategy `thrift:"parsing_strategy,32,optional" form:"parsing_strategy" json:"parsing_strategy,omitempty" query:"parsing_strategy"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -8197,18 +8197,18 @@ func (p *CreateDocumentResponse) String() string {
}
// 用于创建文档的基本信息
// Basic information for creating a document
type DocumentBase struct {
// 文档名称
// Document name
Name string `thrift:"name,1" form:"name" json:"name" query:"name"`
SourceInfo *SourceInfo `thrift:"source_info,2" form:"source_info" json:"source_info" query:"source_info"`
// 以下参数表格类型需要传递
// The following parameter table types need to be passed
TableMeta []*TableColumn `thrift:"table_meta,4,optional" form:"table_meta" json:"table_meta,omitempty" query:"table_meta"`
// 表格解析信息
// Table parsing information
TableSheet *TableSheet `thrift:"table_sheet,5,optional" form:"table_sheet" json:"table_sheet,omitempty" query:"table_sheet"`
// 过滤策略
// filtering strategy
FilterStrategy *FilterStrategy `thrift:"filter_strategy,6,optional" form:"filter_strategy" json:"filter_strategy,omitempty" query:"filter_strategy"`
// 图片类型知识库,人工标注时的图片描述
// Image type knowledge base, picture description when manually annotated
Caption *string `thrift:"caption,7,optional" form:"caption" json:"caption,omitempty" query:"caption"`
}
@@ -8631,18 +8631,18 @@ func (p *DocumentBase) String() string {
}
// 支持多种数据源
// Supports multiple data sources
type SourceInfo struct {
// 本地上传返回的 uri
// Upload the returned URI locally.
TosURI *string `thrift:"tos_uri,1,optional" form:"tos_uri" json:"tos_uri,omitempty"`
DocumentSource *DocumentSource `thrift:"document_source,4,optional" form:"document_source" json:"document_source,omitempty"`
// document_source 自定义原始内容: 表格型知识库需要符合的格式json list<map<string, string>>
// document_source custom raw content: Format required for a tabular knowledge base: json list < map < string, string > >
CustomContent *string `thrift:"custom_content,5,optional" form:"custom_content" json:"custom_content,omitempty"`
// document_source 本地: 如果不传 tos 地址, 则需要传文件 base64, 类型
// document_source local: If you don't send the tos address, you need to send the file base64, type
FileBase64 *string `thrift:"file_base64,7,optional" form:"file_base64" json:"file_base64,omitempty" query:"file_base64"`
// 文件类型, 比如 pdf
// File type, such as PDF
FileType *string `thrift:"file_type,8,optional" form:"file_type" json:"file_type,omitempty" query:"file_type"`
// 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
ImagexURI *string `thrift:"imagex_uri,10,optional" form:"imagex_uri" json:"imagex_uri,omitempty" query:"imagex_uri"`
}
@@ -9069,11 +9069,11 @@ func (p *SourceInfo) String() string {
}
type TableSheet struct {
// 用户选择的 sheet id
// User selected sheet id
SheetID int64 `thrift:"sheet_id,1" form:"sheet_id" json:"sheet_id,string"`
// 用户选择的表头行数,从 0 开始编号
// The number of header rows selected by the user, numbered from 0
HeaderLineIdx int64 `thrift:"header_line_idx,2" form:"header_line_idx" json:"header_line_idx,string"`
// 用户选择的起始行号,从 0 开始编号
// User-selected starting line number, numbered from 0
StartLineIdx int64 `thrift:"start_line_idx,3" form:"start_line_idx" json:"start_line_idx,string"`
}
@@ -9831,13 +9831,13 @@ func (p *GetDocumentProgressResponse) String() string {
type DocumentProgress struct {
DocumentID int64 `thrift:"document_id,1" form:"document_id" json:"document_id,string" query:"document_id"`
// 知识库进度百分比
// Knowledge Base Progress Percentage
Progress int32 `thrift:"progress,2" form:"progress" json:"progress" query:"progress"`
Status DocumentStatus `thrift:"status,3" form:"status" json:"status" query:"status"`
// 状态的详细描述;如果切片失败,返回失败信息
// A detailed description of the status; if the slice fails, a failure message is returned
StatusDescript *string `thrift:"status_descript,4,optional" form:"status_descript" json:"status_descript,omitempty" query:"status_descript"`
DocumentName string `thrift:"document_name,5" form:"document_name" json:"document_name" query:"document_name"`
// 剩余时间单位秒
// Remaining time in seconds
RemainingTime *int64 `thrift:"remaining_time,6,optional" form:"remaining_time" json:"remaining_time,omitempty" query:"remaining_time"`
Size *int64 `thrift:"size,7,optional" form:"size" json:"size,omitempty" query:"size"`
Type *string `thrift:"type,8,optional" form:"type" json:"type,omitempty" query:"type"`
@@ -10386,19 +10386,19 @@ func (p *DocumentProgress) String() string {
}
// 获取 database 上传的表格文件元信息
// Get the table file meta information uploaded by the database
type GetTableSchemaRequest struct {
// 表格解析信息, 默认初始值0,0,1表示第1个表格表头行为第1行数据行从第2行开始
// 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
TableSheet *TableSheet `thrift:"table_sheet,1,optional" form:"table_sheet" json:"table_sheet,omitempty" query:"table_sheet"`
// 不传默认返回所有数据
// All data is returned by default without passing it on.
TableDataType *TableDataType `thrift:"table_data_type,2,optional" form:"table_data_type" json:"table_data_type,omitempty" query:"table_data_type"`
// 兼容重构前的版本:如果需要拉取的是当前 document 的 schema 时传递该值
// Compatible with pre-refactoring versions: pass this value if you need to pull the schema of the current document
DocumentID *int64 `thrift:"document_id,3,optional" form:"document_id" json:"document_id,string,omitempty"`
// source file 的信息,新增 segment / 之前逻辑迁移到这里
// Source file information, add segment/before logic migrate here
SourceFile *SourceInfo `thrift:"source_file,4,optional" form:"source_file" json:"source_file,omitempty" query:"source_file"`
// 表格预览前端需要传递原始的数据表结构
// The table preview front end needs to pass the original data table structure
OriginTableMeta []*TableColumn `thrift:"origin_table_meta,5,optional" form:"origin_table_meta" json:"origin_table_meta,omitempty" query:"origin_table_meta"`
// 表格预览前端需要传递用户编辑之后的数据表结构
// The table preview front end needs to pass the data table structure edited by the user
PreviewTableMeta []*TableColumn `thrift:"preview_table_meta,6,optional" form:"preview_table_meta" json:"preview_table_meta,omitempty" query:"preview_table_meta"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -10912,11 +10912,11 @@ func (p *GetTableSchemaRequest) String() string {
}
type DocTableSheet struct {
// sheet 的编号
// Number of sheet
ID int64 `thrift:"id,1" form:"id" json:"id" query:"id"`
// sheet
// Sheet name
SheetName string `thrift:"sheet_name,2" form:"sheet_name" json:"sheet_name" query:"sheet_name"`
// 总行数
// total number of rows
TotalRow int64 `thrift:"total_row,3" form:"total_row" json:"total_row" query:"total_row"`
}
@@ -11147,9 +11147,9 @@ type GetTableSchemaResponse struct {
Code int32 `thrift:"code,1,required" form:"code,required" json:"code,required" query:"code,required"`
Msg string `thrift:"msg,2,required" form:"msg,required" json:"msg,required" query:"msg,required"`
SheetList []*DocTableSheet `thrift:"sheet_list,3" form:"sheet_list" json:"sheet_list" query:"sheet_list"`
// 选中的 sheet 的 schema, 不选择默认返回第一个 sheet
// The schema of the selected sheet, not selected to return the first sheet by default
TableMeta []*TableColumn `thrift:"table_meta,4" form:"table_meta" json:"table_meta" query:"table_meta"`
// knowledge table 场景中会返回
// The knowledge table will return
PreviewData []map[string]string `thrift:"preview_data,5" form:"preview_data" json:"preview_data"`
BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"-" json:"-" query:"-"`
}
@@ -11621,15 +11621,15 @@ func (p *GetTableSchemaResponse) String() string {
}
// 判断用户配置的 schema 是否和对应 document id 的一致
// Determine whether the schema configured by the user is consistent with the corresponding document id
type ValidateTableSchemaRequest struct {
// 空间ID
// Space ID
SpaceID int64 `thrift:"space_id,1" form:"space_id" json:"space_id,string"`
// 要校验的文档ID
// Document ID to verify
DocumentID int64 `thrift:"document_id,2" form:"document_id" json:"document_id,string"`
// source file 的信息
// Information from the source file
SourceInfo *SourceInfo `thrift:"source_info,3" form:"source_file" json:"source_file"`
// 表格解析信息, 默认初始值0,0,1表示第1个表格表头行为第1行数据行从第2行开始
// 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
TableSheet *TableSheet `thrift:"table_sheet,4" form:"table_sheet" json:"table_sheet"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -11967,7 +11967,7 @@ func (p *ValidateTableSchemaRequest) String() string {
type ValidateTableSchemaResponse struct {
ColumnValidResult map[string]string `thrift:"ColumnValidResult,1,optional" form:"column_valid_result" json:"column_valid_result,omitempty"`
// 如果失败会返回错误码
// If it fails, an error code will be returned.
Code int64 `thrift:"code,253,required" form:"code,required" json:"code,required" query:"code,required"`
Msg string `thrift:"msg,254,required" form:"msg,required" json:"msg,required" query:"msg,required"`
BaseResp *base.BaseResp `thrift:"BaseResp,255,optional" form:"-" json:"-" query:"-"`
@@ -12504,7 +12504,7 @@ func (p *ExtractPhotoCaptionRequest) String() string {
}
type ExtractPhotoCaptionResponse struct {
// 图片描述
// picture description
Caption string `thrift:"caption,1" form:"caption" json:"caption" query:"caption"`
Code int64 `thrift:"code,253,required" form:"code,required" json:"code,required" query:"code,required"`
Msg string `thrift:"msg,254,required" form:"msg,required" json:"msg,required" query:"msg,required"`

View File

@@ -9,7 +9,7 @@ import (
)
type DatasetService interface {
// 知识库相关
// Knowledge base related
GetIconForDataset(ctx context.Context, req *GetIconRequest) (r *GetIconResponse, err error)
CreateDataset(ctx context.Context, req *CreateDatasetRequest) (r *CreateDatasetResponse, err error)
@@ -21,7 +21,7 @@ type DatasetService interface {
DeleteDataset(ctx context.Context, req *DeleteDatasetRequest) (r *DeleteDatasetResponse, err error)
UpdateDataset(ctx context.Context, req *UpdateDatasetRequest) (r *UpdateDatasetResponse, err error)
// Document相关
// Document related
CreateDocument(ctx context.Context, req *CreateDocumentRequest) (r *CreateDocumentResponse, err error)
ListDocument(ctx context.Context, req *ListDocumentRequest) (r *ListDocumentResponse, err error)
@@ -45,7 +45,7 @@ type DatasetService interface {
GetTableSchema(ctx context.Context, req *GetTableSchemaRequest) (r *GetTableSchemaResponse, err error)
ValidateTableSchema(ctx context.Context, req *ValidateTableSchemaRequest) (r *ValidateTableSchemaResponse, err error)
// slice相关
// Slice related
DeleteSlice(ctx context.Context, req *DeleteSliceRequest) (r *DeleteSliceResponse, err error)
CreateSlice(ctx context.Context, req *CreateSliceRequest) (r *CreateSliceResponse, err error)
@@ -53,7 +53,7 @@ type DatasetService interface {
UpdateSlice(ctx context.Context, req *UpdateSliceRequest) (r *UpdateSliceResponse, err error)
ListSlice(ctx context.Context, req *ListSliceRequest) (r *ListSliceResponse, err error)
/** 预分片相关 **/
/** Pre-sharding related **/
CreateDocumentReview(ctx context.Context, req *CreateDocumentReviewRequest) (r *CreateDocumentReviewResponse, err error)
MGetDocumentReview(ctx context.Context, req *MGetDocumentReviewRequest) (r *MGetDocumentReviewResponse, err error)

View File

@@ -3,9 +3,9 @@
package dataset
import (
"github.com/coze-dev/coze-studio/backend/api/model/base"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/coze-dev/coze-studio/backend/api/model/base"
)
type ReviewInput struct {
@@ -298,7 +298,7 @@ type Review struct {
DocumentName string `thrift:"document_name,2" form:"document_name" json:"document_name" query:"document_name"`
DocumentType string `thrift:"document_type,3" form:"document_type" json:"document_type" query:"document_type"`
TosURL string `thrift:"tos_url,4" form:"tos_url" json:"tos_url" query:"tos_url"`
// 状态
// status
Status *ReviewStatus `thrift:"status,5,optional" form:"status" json:"status,omitempty" query:"status"`
DocTreeTosURL *string `thrift:"doc_tree_tos_url,6,optional" form:"doc_tree_tos_url" json:"doc_tree_tos_url,omitempty" query:"doc_tree_tos_url"`
PreviewTosURL *string `thrift:"preview_tos_url,7,optional" form:"preview_tos_url" json:"preview_tos_url,omitempty" query:"preview_tos_url"`

View File

@@ -3,21 +3,21 @@
package dataset
import (
"github.com/coze-dev/coze-studio/backend/api/model/base"
"database/sql"
"database/sql/driver"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/coze-dev/coze-studio/backend/api/model/base"
)
type SliceStatus int64
const (
// 未向量化
// unvectorized
SliceStatus_PendingVectoring SliceStatus = 0
// 已向量化
// vectorized
SliceStatus_FinishVectoring SliceStatus = 1
// 禁用
// disable
SliceStatus_Deactive SliceStatus = 9
)
@@ -61,7 +61,7 @@ func (p *SliceStatus) Value() (driver.Value, error) {
}
type DeleteSliceRequest struct {
// 要删除的分片ID列表
// List of sharding IDs to delete
SliceIds []string `thrift:"slice_ids,4,optional" form:"slice_ids" json:"slice_ids,omitempty"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -537,11 +537,11 @@ func (p *DeleteSliceResponse) String() string {
}
type CreateSliceRequest struct {
// 新增分片插入的文档ID
// Add sharding inserted document ID
DocumentID int64 `thrift:"document_id,2,required" form:"document_id,required" json:"document_id,string,required" query:"document_id,required"`
// 新增分片的内容
// Add sharding content
RawText *string `thrift:"raw_text,5,optional" form:"raw_text" json:"raw_text,omitempty" query:"raw_text"`
// 分片插入位置1表示文档开头最大值为最后一个分片位置+1
// Sharding insertion position, 1 indicates the beginning of the document, and the maximum value is the last sharding position + 1
Sequence *int64 `thrift:"sequence,6,optional" form:"sequence" json:"sequence,string,omitempty" query:"sequence"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -852,7 +852,7 @@ func (p *CreateSliceRequest) String() string {
}
type CreateSliceResponse struct {
// 新增分片ID
// Add sharding ID
SliceID int64 `thrift:"slice_id,1" form:"slice_id" json:"slice_id,string" query:"slice_id"`
Code int64 `thrift:"code,253,required" form:"code,required" json:"code,required" query:"code,required"`
Msg string `thrift:"msg,254,required" form:"msg,required" json:"msg,required" query:"msg,required"`
@@ -1150,9 +1150,9 @@ func (p *CreateSliceResponse) String() string {
}
type UpdateSliceRequest struct {
// 要更新的分片ID
// The sharding ID to update
SliceID int64 `thrift:"slice_id,2,required" form:"slice_id,required" json:"slice_id,string,required" query:"slice_id,required"`
// 要更新的内容
// Content to be updated
RawText *string `thrift:"raw_text,7,optional" form:"raw_text" json:"raw_text,omitempty" query:"raw_text"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -1660,15 +1660,15 @@ func (p *UpdateSliceResponse) String() string {
}
type ListSliceRequest struct {
// 要list的分片所属的文档ID
// The document ID of the sharding to list
DocumentID *int64 `thrift:"document_id,2,optional" form:"document_id" json:"document_id,string,omitempty" query:"document_id"`
// 分片序号表示从该序号的分片开始list
// Sharding serial number, indicating that the list starts from the sharding of this serial number
Sequence *int64 `thrift:"sequence,3,optional" form:"sequence" json:"sequence,string,omitempty" query:"sequence"`
// 查询关键字
// query keyword
Keyword *string `thrift:"keyword,4,optional" form:"keyword" json:"keyword,omitempty" query:"keyword"`
// 如果只传 dataset_id,则返回该知识库下的分片
// If only dataset_id, return sharding under that knowledge base
DatasetID *int64 `thrift:"dataset_id,5,optional" form:"dataset_id" json:"dataset_id,string,omitempty" query:"dataset_id"`
// 每页大小
// page size
PageSize int64 `thrift:"page_size,21" form:"page_size" json:"page_size,string" query:"page_size"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -2081,11 +2081,11 @@ func (p *ListSliceRequest) String() string {
}
type ListSliceResponse struct {
// 返回的分片列表
// Returned list of shardings
Slices []*SliceInfo `thrift:"slices,1" form:"slices" json:"slices" query:"slices"`
// 总分片数
// Total shardings
Total int64 `thrift:"total,2" form:"total" json:"total,string" query:"total"`
// 是否还有更多分片
// Is there more sharding?
Hasmore bool `thrift:"hasmore,3" form:"hasmore" json:"hasmore" query:"hasmore"`
Code int64 `thrift:"code,253,required" form:"code,required" json:"code,required" query:"code,required"`
Msg string `thrift:"msg,254,required" form:"msg,required" json:"msg,required" query:"msg,required"`
@@ -2491,21 +2491,21 @@ func (p *ListSliceResponse) String() string {
}
type SliceInfo struct {
// 分片ID
// Sharding ID
SliceID int64 `thrift:"slice_id,1" form:"slice_id" json:"slice_id,string" query:"slice_id"`
// 分片内容
// Sharding content
Content string `thrift:"content,2" form:"content" json:"content" query:"content"`
// 分片状态
// Sharding state
Status SliceStatus `thrift:"status,3" form:"status" json:"status" query:"status"`
// 命中次数
// hit count
HitCount int64 `thrift:"hit_count,4" form:"hit_count" json:"hit_count,string" query:"hit_count"`
// 字符数
// character count
CharCount int64 `thrift:"char_count,5" form:"char_count" json:"char_count,string" query:"char_count"`
// 序号
// serial number
Sequence int64 `thrift:"sequence,7" form:"sequence" json:"sequence,string" query:"sequence"`
// 分片所属的文档ID
// The document ID to which sharding belongs
DocumentID int64 `thrift:"document_id,8" form:"document_id" json:"document_id,string" query:"document_id"`
// 分片相关的元信息, 透传 slice 表里的 extra->chunk_info 字段 (json)
// Meta information related to sharding, extra- > chunk_info field in the transparent slice table (json)
ChunkInfo string `thrift:"chunk_info,9" form:"chunk_info" json:"chunk_info" query:"chunk_info"`
}

View File

@@ -3,19 +3,19 @@
package coze
import (
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/coze-dev/coze-studio/backend/api/model/base"
"github.com/coze-dev/coze-studio/backend/api/model/flow/devops/debugger/domain/infra"
"github.com/coze-dev/coze-studio/backend/api/model/flow/devops/debugger/domain/testcase"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
)
// ========== TestCase =========== //
type SaveCaseDataReq struct {
// 业务信息
// business information
BizCtx *infra.BizCtx `thrift:"bizCtx,1,optional" form:"bizCtx" json:"bizCtx,omitempty" query:"bizCtx"`
BizComponentSubject *infra.ComponentSubject `thrift:"bizComponentSubject,2,optional" form:"bizComponentSubject" json:"bizComponentSubject,omitempty" query:"bizComponentSubject"`
// case基本数据
// Case basic data
CaseBase *testcase.CaseDataBase `thrift:"caseBase,3,optional" form:"caseBase" json:"caseBase,omitempty" query:"caseBase"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -632,9 +632,9 @@ func (p *SaveCaseDataResp) String() string {
}
type DeleteCaseDataReq struct {
// 业务信息
// business information
BizCtx *infra.BizCtx `thrift:"bizCtx,1,optional" form:"bizCtx" json:"bizCtx,omitempty" query:"bizCtx"`
// 单次上限20
// A single maximum of 20
CaseIDs []int64 `thrift:"caseIDs,2,optional" form:"caseIDs" json:"caseIDs,omitempty" query:"caseIDs"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
}
@@ -1246,7 +1246,7 @@ func (p *DeleteCaseDataResp) String() string {
type CheckCaseDuplicateReq struct {
BizCtx *infra.BizCtx `thrift:"bizCtx,1,optional" form:"bizCtx" json:"bizCtx,omitempty" query:"bizCtx"`
// case名称
// Case name
CaseName *string `thrift:"caseName,2,optional" form:"caseName" json:"caseName,omitempty" query:"caseName"`
BizComponentSubject *infra.ComponentSubject `thrift:"bizComponentSubject,3,optional" form:"bizComponentSubject" json:"bizComponentSubject,omitempty" query:"bizComponentSubject"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
@@ -1556,7 +1556,7 @@ func (p *CheckCaseDuplicateReq) String() string {
type CheckCaseDuplicateResp struct {
IsPass *bool `thrift:"isPass,1,optional" form:"isPass" json:"isPass,omitempty" query:"isPass"`
// pass=false时,给出具体的校验不通过的原因
// When pass = false, give the specific reason why the check failed
FailReason *string `thrift:"failReason,2,optional" form:"failReason" json:"failReason,omitempty" query:"failReason"`
FailCode *int32 `thrift:"failCode,3,optional" form:"failCode" json:"failCode,omitempty" query:"failCode"`
Code *int32 `thrift:"code,253,optional" form:"code" json:"code,omitempty" query:"code"`
@@ -1983,7 +1983,7 @@ func (p *CheckCaseDuplicateResp) String() string {
}
type GetSchemaByIDReq struct {
// 业务信息
// business information
BizCtx *infra.BizCtx `thrift:"bizCtx,1,optional" form:"bizCtx" json:"bizCtx,omitempty" query:"bizCtx"`
BizComponentSubject *infra.ComponentSubject `thrift:"bizComponentSubject,2,optional" form:"bizComponentSubject" json:"bizComponentSubject,omitempty" query:"bizComponentSubject"`
Base *base.Base `thrift:"Base,255,optional" form:"Base" json:"Base,omitempty" query:"Base"`
@@ -2237,7 +2237,7 @@ func (p *GetSchemaByIDReq) String() string {
}
type GetSchemaByIDResp struct {
// Json格式的组件input信息Input Json Schema保持一致不包含Value值信息
// Component input information in JSON format, consistent with Input JSON Schema, does not contain Value information
SchemaJson *string `thrift:"schemaJson,1,optional" form:"schemaJson" json:"schemaJson,omitempty" query:"schemaJson"`
Code *int32 `thrift:"code,253,optional" form:"code" json:"code,omitempty" query:"code"`
Msg *string `thrift:"msg,254,optional" form:"msg" json:"msg,omitempty" query:"msg"`

View File

@@ -9,7 +9,7 @@ import (
"github.com/apache/thrift/lib/go/thrift"
)
// ComponentType 支持组件类型
// ComponentType Supports component types
type ComponentType int64
const (
@@ -20,23 +20,23 @@ const (
ComponentType_CozeTool ComponentType = 10001
// Coze Workflow
ComponentType_CozeWorkflow ComponentType = 10002
// Coze SubWorkflow即在Workflow中被引用的子Workflow
// Coze SubWorkflow, which is referenced in Workflow.
ComponentType_CozeSubWorkflow ComponentType = 10003
// Coze workflow中的LLM节点
// LLM nodes in Coze workflow
ComponentType_CozeLLMNode ComponentType = 10004
// Coze workflow中的Code节点
// Coding nodes in a Coze workflow
ComponentType_CozeCodeNode ComponentType = 10005
// Coze workflow中的Knowledge节点
// Knowledge nodes in Coze workflow
ComponentType_CozeKnowledgeNode ComponentType = 10006
// Coze workflow中的Tool节点
// Tools nodes in Coze workflow
ComponentType_CozeToolNode ComponentType = 10007
// Coze workflow中的start节点
// Coze workflow start node
ComponentType_CozeStartNode ComponentType = 10008
// Coze workflow中的variable节点
// Cozing variable nodes in workflow
ComponentType_CozeVariableNode ComponentType = 10009
// Coze 虚拟节点用于标识 variable 依赖的bot
// Coze virtual nodes to identify variable dependent bots
ComponentType_CozeVariableBot ComponentType = 20000
// Coze 虚拟节点用于标识 variable 依赖的chat
// Coze virtual nodes to identify variable dependent chats
ComponentType_CozeVariableChat ComponentType = 20001
)
@@ -119,18 +119,18 @@ func (p *ComponentType) Value() (driver.Value, error) {
return int64(*p), nil
}
// TrafficScene 流量请求场景
// TrafficScene traffic request scenario
type TrafficScene int64
const (
TrafficScene_Undefined TrafficScene = 0
// 单Agent调试页
// Single Agent Debug Page
TrafficScene_CozeSingleAgentDebug TrafficScene = 10000
// 多Agent调试页
// Multi-Agent Debug Page
TrafficScene_CozeMultiAgentDebug TrafficScene = 10001
// Tool调试页
// Tool Debug Page
TrafficScene_CozeToolDebug TrafficScene = 10002
// Workflow调试页
// Workflow debugging page
TrafficScene_CozeWorkflowDebug TrafficScene = 10003
)
@@ -181,7 +181,7 @@ func (p *TrafficScene) Value() (driver.Value, error) {
return int64(*p), nil
}
// ComponentMappingType 组件映射类型
// ComponentMappingType Component Mapping Types
type ComponentMappingType int64
const (
@@ -264,7 +264,7 @@ func (p *OrderBy) Value() (driver.Value, error) {
type DebugScene int64
const (
// 默认play ground Debug场景
// Default play ground Debug scene
DebugScene_Debug DebugScene = 0
)
@@ -302,7 +302,7 @@ func (p *DebugScene) Value() (driver.Value, error) {
type CozeChannel int64
const (
// 默认为Coze, 未来扩展到其他渠道
// Default to Coze, expand to other channels in the future
CozeChannel_Coze CozeChannel = 0
)
@@ -337,19 +337,19 @@ func (p *CozeChannel) Value() (driver.Value, error) {
return int64(*p), nil
}
// BizCtx 业务上下文
// BizCtx Business Context
type BizCtx struct {
// connectorID
ConnectorID *string `thrift:"connectorID,1,optional" form:"connectorID" json:"connectorID,omitempty" query:"connectorID"`
// connector下用户ID
// User ID under connector
ConnectorUID *string `thrift:"connectorUID,2,optional" form:"connectorUID" json:"connectorUID,omitempty" query:"connectorUID"`
// 业务场景
// business scenario
TrafficScene *TrafficScene `thrift:"trafficScene,3,optional" form:"trafficScene" json:"trafficScene,omitempty" query:"trafficScene"`
// 业务场景组件ID比如Bot调试页trafficSceneIDBotID
// Business Scenario Component ID, such as Bot Debug Page, where trafficSceneID is BotID
TrafficCallerID *string `thrift:"trafficCallerID,4,optional" form:"trafficCallerID" json:"trafficCallerID,omitempty" query:"trafficCallerID"`
// 业务线SpaceID用于访问控制
// Line of business SpaceID for access control
BizSpaceID *string `thrift:"bizSpaceID,5,optional" form:"bizSpaceID" json:"bizSpaceID,omitempty" query:"bizSpaceID"`
// 额外信息
// Additional information
Ext map[string]string `thrift:"ext,6,optional" form:"ext" json:"ext,omitempty" query:"ext"`
}
@@ -804,15 +804,15 @@ func (p *BizCtx) String() string {
}
// ComponentSubject 业务组件的二级结构
// Secondary structure of the ComponentSubject business component
type ComponentSubject struct {
// 组件ID例如Tool IDNode ID
// Component IDs, such as Tool ID, Node ID, etc
ComponentID *string `thrift:"componentID,1,optional" form:"componentID" json:"componentID,omitempty" query:"componentID"`
// 组件类型
// component type
ComponentType *ComponentType `thrift:"componentType,2,optional" form:"componentType" json:"componentType,omitempty" query:"componentType"`
// 父组件ID例如Tool->Plugin, Node->Workflow
// Parent component ID, e.g. Tool- > Plugin, Node- > Workflow
ParentComponentID *string `thrift:"parentComponentID,3,optional" form:"parentComponentID" json:"parentComponentID,omitempty" query:"parentComponentID"`
// 父组件类型
// Parent component type
ParentComponentType *ComponentType `thrift:"parentComponentType,4,optional" form:"parentComponentType" json:"parentComponentType,omitempty" query:"parentComponentType"`
}

View File

@@ -3,17 +3,17 @@
package testcase
import (
"github.com/coze-dev/coze-studio/backend/api/model/flow/devops/debugger/domain/infra"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/coze-dev/coze-studio/backend/api/model/flow/devops/debugger/domain/infra"
)
type CaseDataBase struct {
// 新增时不填,更新时填写
// Do not fill in when adding, fill in when updating
CaseID *int64 `thrift:"caseID,1,optional" json:"caseID,string" form:"caseID" query:"caseID"`
Name *string `thrift:"name,2,optional" form:"name" json:"name,omitempty" query:"name"`
Description *string `thrift:"description,3,optional" form:"description" json:"description,omitempty" query:"description"`
// json格式的输入信息
// Input information in JSON format
Input *string `thrift:"input,4,optional" form:"input" json:"input,omitempty" query:"input"`
IsDefault *bool `thrift:"isDefault,5,optional" form:"isDefault" json:"isDefault,omitempty" query:"isDefault"`
}
@@ -389,7 +389,7 @@ type CaseDataDetail struct {
CreatorID *string `thrift:"creatorID,2,optional" form:"creatorID" json:"creatorID,omitempty" query:"creatorID"`
CreateTimeInSec *int64 `thrift:"createTimeInSec,3,optional" form:"createTimeInSec" json:"createTimeInSec,omitempty" query:"createTimeInSec"`
UpdateTimeInSec *int64 `thrift:"updateTimeInSec,4,optional" form:"updateTimeInSec" json:"updateTimeInSec,omitempty" query:"updateTimeInSec"`
// schema不兼容
// Schema incompatibility
SchemaIncompatible *bool `thrift:"schemaIncompatible,5,optional" form:"schemaIncompatible" json:"schemaIncompatible,omitempty" query:"schemaIncompatible"`
Updater *infra.Creator `thrift:"updater,6,optional" form:"updater" json:"updater,omitempty" query:"updater"`
}

View File

@@ -12,13 +12,13 @@ import (
type FollowType int64
const (
// 无关系
// Unknown
FollowType_Unknown FollowType = 0
// 关注
// followee
FollowType_Followee FollowType = 1
// 粉丝
// follower
FollowType_Follower FollowType = 2
// 互相关注
// MutualFollow
FollowType_MutualFollow FollowType = 3
)
@@ -66,11 +66,11 @@ func (p *FollowType) Value() (driver.Value, error) {
}
type Price struct {
// 金额
// amount
Amount int64 `thrift:"Amount,1" form:"amount" json:"amount,string"`
// 币种如USD、CNY
// Currencies such as USD and CNY
Currency string `thrift:"Currency,2" form:"currency" json:"currency"`
// 小数位数
// decimal places
DecimalNum int8 `thrift:"DecimalNum,3" form:"decimal_num" json:"decimal_num"`
}

View File

@@ -3,11 +3,11 @@
package product_common
import (
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/marketplace_common"
"database/sql"
"database/sql/driver"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
"github.com/coze-dev/coze-studio/backend/api/model/flow/marketplace/marketplace_common"
)
type ProductEntityType int64
@@ -18,28 +18,28 @@ const (
// Workflow = 3 ,
ProductEntityType_SocialScene ProductEntityType = 4
ProductEntityType_Project ProductEntityType = 6
// 历史工作流,后续不会再有(废弃)
// History workflow, no more in the future (abandoned)
ProductEntityType_WorkflowTemplate ProductEntityType = 13
// 历史图像流模板,后续不会再有(废弃)
// Historical image stream template, no more in the future (obsolete)
ProductEntityType_ImageflowTemplate ProductEntityType = 15
// 模板通用标识,仅用于绑定模板相关的配置,不绑定商品
// Template universal identification, only used to bind template-related configurations, not bind products
ProductEntityType_TemplateCommon ProductEntityType = 20
// Bot 模板
// Bot template
ProductEntityType_BotTemplate ProductEntityType = 21
// 工作流模板
// workflow template
ProductEntityType_WorkflowTemplateV2 ProductEntityType = 23
// 图像流模板(该类型已下线,合并入 workflow但历史数据会保留前端视作 workflow 展示)
// 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)
ProductEntityType_ImageflowTemplateV2 ProductEntityType = 25
// 项目模板
// project template
ProductEntityType_ProjectTemplate ProductEntityType = 26
// coze token 类商品,理论上只会有一个
// Coze token products, theoretically there will only be one
ProductEntityType_CozeToken ProductEntityType = 50
// 订阅 credit 的流量包,理论上只会有一个
// Subscribe to the traffic package of credit, theoretically there will only be one
ProductEntityType_MsgCredit ProductEntityType = 55
// 消息订阅类商品,理论上只有一个
// There is only one subscription product in theory
ProductEntityType_SubsMsgCredit ProductEntityType = 60
ProductEntityType_Common ProductEntityType = 99
// 专题(兼容之前的设计)
// Special Topics (Compatible with previous designs)
ProductEntityType_Topic ProductEntityType = 101
)
@@ -139,9 +139,9 @@ type SortType int64
const (
SortType_Heat SortType = 1
SortType_Newest SortType = 2
// 收藏时间
// collection time
SortType_FavoriteTime SortType = 3
// 相关性,只用于搜索场景
// Correlation, only for search scenarios
SortType_Relative SortType = 4
)
@@ -233,9 +233,9 @@ func (p *ProductPublishMode) Value() (driver.Value, error) {
type ProductListSource int64
const (
// 推荐列表页
// recommended list page
ProductListSource_Recommend ProductListSource = 1
// 个性化推荐
// personalized recommendation
ProductListSource_CustomizedRecommend ProductListSource = 2
)
@@ -362,7 +362,7 @@ func (p *ProductPaidType) Value() (driver.Value, error) {
type ProductStatus int64
const (
// 从未上架
// NeverListed
ProductStatus_NeverListed ProductStatus = 0
ProductStatus_Listed ProductStatus = 1
ProductStatus_Unlisted ProductStatus = 2
@@ -415,15 +415,15 @@ func (p *ProductStatus) Value() (driver.Value, error) {
type ProductDraftStatus int64
const (
// 默认
// default
ProductDraftStatus_Default ProductDraftStatus = 0
// 审核中
// Under review.
ProductDraftStatus_Pending ProductDraftStatus = 1
// 审核通过
// approved
ProductDraftStatus_Approved ProductDraftStatus = 2
// 审核不通过
// The review failed.
ProductDraftStatus_Rejected ProductDraftStatus = 3
// 已废弃
// Abandoned
ProductDraftStatus_Abandoned ProductDraftStatus = 4
)
@@ -576,27 +576,27 @@ func (p *PluginParamTypeFormat) Value() (driver.Value, error) {
type WorkflowNodeType int64
const (
// 开始
// start
WorkflowNodeType_Start WorkflowNodeType = 1
// 结束
// end
WorkflowNodeType_End WorkflowNodeType = 2
// 大模型
// Large model
WorkflowNodeType_LLM WorkflowNodeType = 3
// 插件
// plugin
WorkflowNodeType_Api WorkflowNodeType = 4
// 代码
// code
WorkflowNodeType_Code WorkflowNodeType = 5
// 知识库
// Knowledge Base
WorkflowNodeType_Dataset WorkflowNodeType = 6
// 选择器
// selector
WorkflowNodeType_If WorkflowNodeType = 8
// 工作流
// Workflow
WorkflowNodeType_SubWorkflow WorkflowNodeType = 9
// 变量
// variable
WorkflowNodeType_Variable WorkflowNodeType = 11
// 数据库
// database
WorkflowNodeType_Database WorkflowNodeType = 12
// 消息
// message
WorkflowNodeType_Message WorkflowNodeType = 13
)
@@ -721,9 +721,9 @@ func (p *SocialSceneRoleType) Value() (driver.Value, error) {
type UIPreviewType int64
const (
// UI 预览类型,定义对齐 UI Builder目前用于 Project
// UI preview type, defining alignment UI Builder, currently used in Project
UIPreviewType_Web UIPreviewType = 1
// 移动端
// mobile end
UIPreviewType_Client UIPreviewType = 2
)
@@ -765,7 +765,7 @@ func (p *UIPreviewType) Value() (driver.Value, error) {
type FavoriteListSource int64
const (
// 用户自己创建的
// Created by users themselves
FavoriteListSource_CreatedByMe FavoriteListSource = 1
)
@@ -1837,7 +1837,7 @@ func (p *ImageInfo) String() string {
}
type OpeningDialog struct {
// Bot开场白
// Bot OpeningDialog
Content string `thrift:"content,1" form:"content" json:"content"`
}
@@ -2166,13 +2166,13 @@ type FavoriteEntity struct {
Name string `thrift:"Name,4" form:"name" json:"name"`
IconURL string `thrift:"IconURL,5" form:"icon_url" json:"icon_url"`
Description string `thrift:"Description,6" form:"description" json:"description"`
// 废弃,使用UserInfo
// Abandoned, using UserInfo
Seller *SellerInfo `thrift:"Seller,7" form:"seller" json:"seller"`
// 用于跳转到Bot编辑页
// Use to jump to the bot edit page
SpaceID int64 `thrift:"SpaceID,8" form:"space_id" json:"space_id,string"`
// 用户是否有该实体所在Space的权限
// Does the user have permissions to the space where the entity is located?
HasSpacePermission bool `thrift:"HasSpacePermission,9" form:"has_space_permission" json:"has_space_permission"`
// 收藏时间
// collection time
FavoriteAt int64 `thrift:"FavoriteAt,10" form:"favorite_at" json:"favorite_at,string"`
ProductExtra *FavoriteProductExtra `thrift:"ProductExtra,11,optional" form:"product_extra" json:"product_extra,omitempty"`
UserInfo *UserInfo `thrift:"UserInfo,12" form:"user_info" json:"user_info"`

View File

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