feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export interface Base {
LogID?: string;
Caller?: string;
Addr?: string;
Client?: string;
TrafficEnv?: TrafficEnv;
Extra?: Record<string, string>;
}
export interface BaseResp {
StatusMessage?: string;
StatusCode?: number;
Extra?: Record<string, string>;
}
export interface TrafficEnv {
Open?: boolean;
Env?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,169 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export enum AgentType {
Start_Agent = 0,
LLM_Agent = 1,
Task_Agent = 2,
Global_Agent = 3,
Bot_Agent = 4,
}
/** 版本兼容0-旧版本 1-可回退的新版本 2-不可回退的新版本 3-可回退的新版本(不再提示) */
export enum AgentVersionCompat {
OldVersion = 0,
MiddleVersion = 1,
NewVersion = 2,
MiddleVersionNotPrompt = 3,
}
/** AnswerActions */
export enum AnswerActionsMode {
Default = 1,
Customize = 2,
}
export enum AnswerActionTriggerType {
/** 平台预设Trigger action */
Direct = 1,
/** 点击Action 显示自定义的H5页面 */
WebView = 2,
/** 点击Action 发送自定义的用户消息 */
SendMessage = 3,
}
export enum BacktrackMode {
Current = 1,
Previous = 2,
Start = 3,
MostSuitable = 4,
}
export enum BotMode {
SingleMode = 0,
MultiMode = 1,
}
export enum BotSpecies {
/** bot种类
从flow创建 */
Default = 0,
/** 从coze创建 */
Function = 1,
}
/** 上下文允许传输的类型 */
export enum ContextMode {
Chat = 0,
FunctionCall_1 = 1,
FunctionCall_2 = 2,
FunctionCall_3 = 3,
}
export enum FieldItemType {
/** 文本 String */
Text = 1,
/** 数字 Integer */
Number = 2,
/** 时间 Time */
Date = 3,
/** float Number */
Float = 4,
/** bool Boolean */
Boolean = 5,
}
export enum FileboxInfoMode {
Off = 0,
On = 1,
}
export enum KnowledgeNoRecallReplyMode {
Default = 0,
CustomizePrompt = 1,
}
export enum KnowledgeShowSourceMode {
ReplyBottom = 0,
CardList = 1,
}
export enum KnowledgeType {
Coze = 0,
Volcano = 1,
}
export enum KnowledgeTypeMode {
Coze = 0,
Volcano = 1,
}
export enum MultiAgentConnectorType {
Curve = 0,
Straight = 1,
}
export enum MultiAgentSessionType {
Flow = 1,
Host = 2,
}
/** onboarding内容生成模式 */
export enum OnboardingMode {
/** 不需要 */
NO_NEED = 1,
/** 人工指定内容多语言支持由LLM兜底 */
USE_MANUAL = 2,
/** 由LLM生成 */
USE_LLM = 3,
}
export enum RecognitionMode {
FunctionCall = 1,
Independent = 2,
}
export enum SearchStrategy {
/** 语义搜索 */
SemanticSearch = 0,
/** 混合搜索 */
HybirdSearch = 1,
/** 全文搜索 */
FullTextSearch = 20,
}
export enum SuggestReplyMode {
System = 0,
Custom = 1,
Disable = 2,
/** agent专用复用源Bot配置 */
OriBot = 3,
}
export enum TimeCapsuleMode {
/** 关 */
Off = 0,
/** 开 */
On = 1,
}
/* eslint-enable */

View File

@@ -0,0 +1,291 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as data_connector_common from './data_connector_common';
export type Int64 = string | number;
export enum ColumnType {
Unknown = 0,
/** 文本 */
Text = 1,
/** 数字 */
Number = 2,
/** 时间 */
Date = 3,
/** float */
Float = 4,
/** bool */
Boolean = 5,
/** 图片 */
Image = 6,
}
export enum DataSetStatus {
DataSetprocessing = 0,
DataSetReady = 1,
DataSetFailed = 9,
}
export enum DatasetType {
Coze = 0,
Volcano = 1,
}
export enum DocumentSourceType {
/** 本地上传 */
Document = 0,
/** url */
Web = 1,
/** 自定义类型 */
Custom = 2,
/** 三方 */
ThirdParty = 3,
/** 前端抓取 */
FrontCrawl = 4,
Notion = 101,
GoogleDrive = 102,
FeishuWeb = 103,
LarkWeb = 104,
WeChat = 109,
}
export enum DocumentStatus {
/** 上传中 */
Processing = 0,
/** 生效 */
Enable = 1,
/** 失效 */
Disable = 2,
/** 删除 */
Deleted = 3,
/** 重新分片中,前端和上游不感知该状态 */
Resegment = 4,
/** 刷新中(刷新成功后会删除) */
Refreshing = 5,
/** 失败 */
Failed = 9,
}
export enum DocumentUpdateType {
NoUpdate = 0,
Cover = 1,
Append = 2,
}
/** 文件类型 */
export enum FormatType {
/** 文本 */
Text = 0,
/** 表格 */
Table = 1,
/** 图片,暂未支持 */
Image = 2,
/** 数据库 */
Database = 3,
/** 火山结构化 火山知识库特有 */
VolcanoStructured = 4,
/** 火山非结构化 火山知识库特有 */
VolcanoUnstructured = 5,
}
export enum SliceStatus {
/** 未向量化 */
PendingVectoring = 0,
/** 已向量化 */
FinishVectoring = 1,
/** 禁用 */
Deactive = 9,
/** 审核不通过 */
AuditFailed = 1000,
}
export enum VolcanoDatasetServiceStatus {
DatasetServiceValid = 0,
DatasetServiceInvalid = 1,
}
export enum VolcanoDatasetStatus {
DatasetValid = 0,
DatasetInvalid = 1,
}
export enum WebInfoStatus {
/** 处理中 */
Handling = 0,
/** 已完成 */
Finish = 1,
/** 失败 */
Failed = 2,
}
export interface DataSetInfo {
data_set_id?: string;
/** 数据集名称 */
name?: string;
/** 文件列表 */
file_list?: Array<string>;
/** 所有文件大小 */
all_file_size?: Int64;
/** 使用Bot数 */
bot_used_count?: number;
status?: DataSetStatus;
/** 处理中的文件 */
processing_file_list?: Array<string>;
/** 更新时间,秒级时间戳 */
update_time?: number;
icon_url?: string;
description?: string;
icon_uri?: string;
/** 是否可以编辑 */
can_edit?: boolean;
/** 创建时间,秒级时间戳 */
create_time?: number;
/** 创建者ID */
creator_id?: string;
/** 空间ID */
space_id?: Int64;
creator_name?: string;
avatar_url?: string;
/** 处理失败的文件 */
failed_file_list?: Array<string>;
format_type?: FormatType;
/** 0=coze知识库 1=火山知识库 */
dataset_type?: DatasetType;
/** storage_config详细信息 */
storage_config?: StorageConfig;
}
/** 表格的列信息 */
export interface DocTableColumn {
/** 列 id */
id?: string;
/** 列名 */
column_name?: string;
/** 是否为语义匹配列 */
is_semantic?: boolean;
/** 列原本在 excel 的序号 */
sequence?: string;
/** 列类型 */
column_type?: ColumnType;
contains_empty_value?: boolean;
/** 描述 */
desc?: string;
}
export interface DocTableSheet {
/** sheet 的编号 */
id?: Int64;
/** sheet 名 */
sheet_name?: string;
/** 总行数 */
total_row?: Int64;
}
export interface DocumentInfo {
name?: string;
document_id?: string;
/** 文件链接 */
tos_uri?: string;
/** 使用的bot数量 */
bot_used_count?: number;
/** 创建时间 */
create_time?: number;
/** 更新时间 */
update_time?: number;
/** 创建人 */
creator_id?: string;
/** 包含分段数量 */
slice_count?: number;
type?: string;
/** 文件大小 字节数 */
size?: number;
/** 字符数 */
char_count?: number;
/** 状态 */
status?: DocumentStatus;
/** 命中次数 */
hit_count?: number;
/** 枚举 */
source_type?: DocumentSourceType;
/** 更新类型 */
update_type?: DocumentUpdateType;
/** 更新间隔 */
update_interval?: number;
/** 切片规则 */
rule?: string;
/** 文件类型 */
format_type?: FormatType;
/** 表格类型元数据 */
table_meta?: Array<DocTableColumn>;
/** url 地址 */
web_url?: string;
/** 状态的详细信息;如果切片失败,返回失败信息 */
status_descript?: string;
source_file_id?: string;
is_disconnect?: boolean;
/** Deprecated */
data_source_type?: data_connector_common.DataSourceType;
}
export interface SliceInfo {
slice_id?: string;
content?: string;
status?: SliceStatus;
/** 命中次数 */
hit_count?: string;
/** 字符数 */
char_count?: string;
/** token数 */
token_count?: string;
/** 序号 */
sequence?: string;
}
export interface SourceFileInfo {
/** local: 本地文件上传的 tos 地址 */
tos_uri?: string;
/** web url: 如果为第一次 url 上传,传递该值 */
submit_web_id?: string;
/** google feishu...: 三方源文件 id */
source_file_id?: string;
source_type?: DocumentSourceType;
/** custom json list<map<string, string>> */
custom_content?: string;
}
export interface StorageConfig {
volcano_dataset_config?: VolcanoDataset;
}
export interface VolcanoDataset {
/** 火山侧知识库id 字符串 */
id?: string;
/** 名称 */
name?: string;
/** 类型 结构化 or 非结构化知识库 */
format_type?: FormatType;
/** 火山知识库详情链接 */
link?: string;
/** 火山知识库状态 是否已失效 */
status?: VolcanoDatasetStatus;
}
/* eslint-enable */

View File

@@ -0,0 +1,238 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as connector_common from './connector_common';
import * as base from './base';
import * as data_connector_common from './data_connector_common';
export type Int64 = string | number;
export enum TimeFilterEnum {
TimeUnlimited = 0,
WithinAWeek = 1,
WithinAMonth = 2,
WithinAYear = 3,
}
export interface AuthInfo {
auth_id?: string;
connector_id?: connector_common.ConnectorID;
name?: string;
icon?: string;
}
export interface CancelConnectionTaskRequest {
instance_id_list: Array<string>;
Base?: base.Base;
}
export interface CancelConnectionTaskResponse {
code: Int64;
msg: string;
}
export interface ConnectionFileNode {
auth_id: string;
file_node_type: connector_common.FileNodeType;
file_node_list: Array<FileNode>;
}
export interface ConnectionInfo {
connection_id?: string;
connection_name?: string;
connection_icon?: string;
status?: connector_common.ConnectionStatus;
source_id?: Int64;
destination_id?: Int64;
instance_id?: string;
}
export interface ConnectionTask {
connection_id?: string;
status?: string;
entity_task_list?: Array<EntityTask>;
instance_id?: string;
}
export interface ConnectorPreCheckRequest {
source_connector_id?: connector_common.ConnectorID;
source_connector_param?: string;
dest_connector_id?: connector_common.ConnectorID;
dest_connector_param?: string;
Base?: base.Base;
}
export interface ConnectorPreCheckResponse {
SourcePrecheckResult?: string;
DestPrecheckResult?: string;
code: Int64;
msg: string;
}
export interface DataSourceOAuthCompleteRequest {
code: string;
state: string;
auth_code?: string;
}
export interface DataSourceOAuthCompleteResponse {
code: Int64;
msg: string;
}
export interface DataSourceOAuthConsentURLRequest {
connector_id: connector_common.ConnectorID;
redirect_url: string;
Base?: base.Base;
}
export interface DataSourceOAuthConsentURLResponse {
consent_url?: string;
code: Int64;
msg: string;
}
export interface EntityTask {
entity_id?: string;
connection_id?: string;
file_id?: string;
file_name?: string;
status?: string;
file_node_type?: data_connector_common.FileNodeType;
tos_key?: string;
file_url?: string;
error_msg?: string;
file_size?: string;
instance_id?: string;
record_id?: string;
error_code?: Int64;
}
export interface FileNode {
file_id?: string;
file_node_type?: data_connector_common.FileNodeType;
file_name?: string;
has_children_nodes?: boolean;
children_nodes?: Array<FileNode>;
icon?: string;
file_type?: string;
file_url?: string;
/** wiki, 知识空间id */
space_id?: string;
/** wiki, 表示知识空间类型(团队空间 或 个人空间) */
space_type?: string;
/** wiki, 对应文档类型的token可根据 obj_type 判断属于哪种文档类型 */
obj_token?: string;
/** wiki, 文档类型对于快捷方式该字段是对应的实体的obj_type */
obj_type?: string;
}
export interface GetConnectionEntityRequest {
entity_id: string;
Base?: base.Base;
}
export interface GetConnectionEntityResponse {
connection_id?: string;
auth_id?: string;
/** 三方数据平台文件列表 */
file_node?: FileNode;
is_exist: boolean;
is_authorized: boolean;
/** 该字段暂时不返回 */
auth_info_list?: Array<AuthInfo>;
code: Int64;
msg: string;
}
export interface GetConnectorIDListRequest {
Base?: base.Base;
}
export interface GetConnectorIDListResponse {
connector_id_list?: Array<connector_common.ConnectorID>;
code: Int64;
msg: string;
}
export interface GetDataSourceFileTreeRequest {
auth_id: string;
file_type_list: Array<data_connector_common.FileNodeType>;
folder_id?: string;
query_all?: boolean;
Base?: base.Base;
}
export interface GetDataSourceFileTreeResponse {
/** 三方数据平台文件列表 */
data_source_file_tree?: Array<FileNode>;
code: Int64;
msg: string;
}
export interface MGetAuthInfoRequest {
connector_id_list: Array<connector_common.ConnectorID>;
Base?: base.Base;
}
export interface MGetAuthInfoResponse {
auth_info_map?: Partial<
Record<connector_common.ConnectorID, Array<AuthInfo>>
>;
code: Int64;
msg: string;
}
export interface PollConnectionTaskRequest {
instance_id_list: Array<string>;
file_node_type: connector_common.FileNodeType;
Base?: base.Base;
}
export interface PollConnectionTaskResponse {
connection_task?: Array<ConnectionTask>;
code: Int64;
msg: string;
}
export interface RetryEntityTaskRequest {
entity_id: string;
instance_id?: string;
Base?: base.Base;
}
export interface RetryEntityTaskResponse {
connection_info?: ConnectionInfo;
code: Int64;
msg: string;
}
export interface SubmitConnectionTaskRequest {
connection_file_node_list: Array<ConnectionFileNode>;
Base?: base.Base;
}
export interface SubmitConnectionTaskResponse {
connection_info_list?: Array<ConnectionInfo>;
code: Int64;
msg: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export enum ConnectionStatus {
enable = 1,
delete = 2,
expire = 3,
}
export enum ConnectorID {
Notion = 101,
GoogleDrive = 102,
FeishuWeb = 103,
DestinationTos = 104,
LarkWeb = 105,
WeChat = 109,
}
export enum DocSourceType {
DocSourceTypeDrive = 1,
DocSourceTypeWiki = 2,
DocSourceTypeWeChat = 3,
}
export enum FileNodeType {
Folder = 1,
Document = 2,
Sheet = 3,
Space = 4,
}
/* eslint-enable */

View File

@@ -0,0 +1,673 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export enum Act {
RequireAction = 0,
RequireMessage = 1,
}
/** the task status */
export enum AsyncTaskStatus {
NotFinished = 0,
Interrupted = 1,
NoResults = 2,
WithResults = 3,
}
export enum BotRecommendType {
/** 不推荐 */
None = 0,
/** 精选的 */
Featured = 1,
/** 可被发现的 */
Discoverable = 2,
}
/** 上下文允许传输的类型 */
export enum ContextContentType {
/** 无任何处理版 */
USER_RES = 0,
USER_LLM_RES = 1,
USER_LLM_TOOLLEN_RES = 2,
USER_LLM_TOOL_RES = 3,
USER_LLM_TOOL = 4,
}
export enum ConversationType {
Unknown = 0,
Single = 1,
Group = 2,
}
export enum CopilotContentType {
Txt = 1,
Image = 2,
Audio = 3,
Video = 4,
Link = 6,
Music = 7,
Tako = 8,
File = 9,
Card = 50,
BotCard = 51,
Widget = 52,
APP = 100,
OutputSearchResult = 200,
OutputMultiStream = 201,
SearchIntentionResult = 300,
}
export enum CopilotResult {
Success = 1,
SystemLimitation = 2,
UserLimitation = 3,
}
export enum CopilotRole {
System = 0,
User = 1,
Assistant = 2,
/** 占位符,仅出现在模板中 */
Placeholder = 3,
/** 触发 function-call 调用的模型消息 */
LLMOutput = 4,
/** tool 返回function 角色 */
ToolOutput = 5,
/** 同 5 */
Function = 6,
}
export enum ErrCode {
ParamErr = 1,
InnerErr = 2,
WebGPT = 4,
ByteArtist = 5,
Claude = 6,
Dalle2 = 7,
GPT = 8,
Seed = 9,
StableDiffusion = 10,
RiskSecurity = 11,
RequireLocation = 12,
SigInterrupt = 702112002,
Timeout = 702112101,
AuthenticationError = 702112102,
RateLimitError = 702112103,
InvalidRequestError = 702112104,
FunctionInputError = 702112105,
EngineInternalError = 702112106,
MaximumTokenError = 702112107,
NotSupportRoleTypeError = 702112108,
AbParamsError = 702112109,
ParseTemplateError = 702112110,
ModelAKInvalidError = 702112111,
PluginRequireAuthorityError = 702112112,
}
export enum FinReason {
/** 正常结束 */
Normal = 0,
/** Plugin内部中断 */
PluginInterrupt = 1,
}
export enum HighLightType {
None = 0,
GoogleNLP = 1,
ToutiaoWiki = 2,
}
export enum InsertReferenceType {
/** 文本(默认) */
Text = 1,
/** 视频 */
Video = 2,
/** 图片 */
Image = 3,
}
export enum IntentionType {
Default = 1,
SearchText = 2,
SearchVideo = 3,
ComplexSearchText = 4,
SearchImage = 5,
SearchRichMedia = 6,
SearchRichMediaStrong = 7,
SearchRichMediaWeak = 8,
}
export enum LLMScene {
Chat = 1,
Suggest = 2,
QueryKeyword = 3,
Workflow = 4,
/** 生成 Onboarding */
OnboardingOnline = 5,
OnboardingOffline = 6,
/** 会话命名 */
Naming = 7,
/** SC生成用户画像 */
GenProfile = 8,
BrowserPlugin = 9,
BrowserPluginSearch = 10,
BrowserPluginExplain = 11,
BrowserPluginTranslate = 12,
BrowserPluginSummary = 13,
BrowserPluginGrammar = 14,
BrowserPluginRewrite = 15,
BrowserPluginWebSummary = 16,
/** 热搜词 忽略上下文 */
HotSearch = 17,
/** 离线用于生成缓存 */
HotSearchPreload = 18,
/** 输入框Sug */
InputSug = 19,
/** 新闻热点Push */
NewsPush = 20,
NewsPushPreload = 21,
/** Onboarding建议问题触发的回答 */
OnboardingSug = 22,
OnboardingSugPreload = 23,
/** web未登录用户输入问题 */
WebNotLogin = 24,
/** Onboarding welcomeback */
BackOnboardingSug = 25,
/** 通过LLM的能力生成卡片 */
GenCard = 26,
/** 高亮词 */
HighLightMsg = 27,
/** 高亮词强制搜索 */
HighLightMsgSearch = 28,
/** 划词提问场景(浏览器插件) */
BrowserPluginSelectionQuestion = 29,
/** youtube视频摘要浏览器插件 */
BrowserPluginYoutubeSummary = 30,
/** 只调用Chain场景浏览器插件 */
BrowserPluginRawChain = 31,
/** PDF理解浏览器插件 */
BrowserPluginPDFReader = 32,
/** 图片理解(浏览器插件) */
BrowserPluginImgReader = 33,
/** 复杂搜索总结 */
SearchSummary = 34,
}
export enum MediaSearchType {
Nothing = 0,
DouYin = 1,
TikTok = 2,
}
export enum MessageScene {}
export enum MessageType {
System = 1,
User = 2,
Assistant = 3,
Placeholder = 4,
Function = 5,
}
export enum MetaType {
/** 端侧直接替换 */
Replaceable = 1,
/** 插入引用 */
Insertable = 2,
/** 文档引用 */
DocumentRef = 3,
/** 知识库引用卡片 */
KnowledgeCard = 4,
/** 嵌入的多媒体信息只是alice给端上用的因为全链路复用这一个字段所以在这儿改了 */
EmbeddedMultimedia = 100,
}
export enum ModelFamily {
GPT = 1,
Seed = 2,
Claude = 3,
MiniMax = 4,
Plugin = 5,
StableDiffusion = 6,
ByteArtist = 7,
Edu = 8,
/** 方舟(火山引擎) */
Maas = 9,
/** 废弃:千帆(百度云) */
QianFan = 10,
/** gemini(google) */
Gemini = 11,
Moonshot = 12,
/** 智谱 */
GLM = 13,
/** MaaS自动同步模型 */
MaaSAutoSync = 14,
QWen = 15,
/** Command R/R+ */
Cohere = 16,
Baichuan = 17,
/** 文心一言 */
Ernie = 18,
/** deep seek */
DeekSeek = 19,
Llama = 20,
}
/** ** 业务自定义 Model ****** 命名规则 业务 + 功能
每次 Scene 新增需要手动添加提交
每次场景的新增备注说明使用的地方 */
export enum ModelListScene {
/** Prompt 评测平台 */
PromptEvaluatePlatform = 1000,
/** Flow 用户前台 */
FlowApp = 2000,
/** Flow OP 后台 */
FlowOPAdmin = 3000,
/** Flow 前台与后台的模型合集 */
FlowAll = 3001,
/** Bot 平台 Release版本 */
BotPlatform = 4000,
/** Bot 平台 Inhouse版本 */
BotPlatformInhouse = 4001,
/** Flow Workflow */
Workflow = 5000,
/** Arena */
Arena = 6000,
/** Arena Inhouse */
ArenaInhouse = 6001,
}
/** raw 模型列表 */
export enum ModelName {
GPT3dot5Turbo = 1,
GPT4_32k = 2,
GPT4 = 3,
SeedBeta = 4,
/** seed + browsing */
SeedWebGPT = 5,
/** seed strong character */
SeedSystem = 6,
SeedMusic = 7,
GPT4_32k0613 = 8,
Seed_Img2Text = 9,
/** seed sc for test */
Seed_SCTest = 10,
/** seed or test */
Seed_Test = 11,
/** seed main + browsing + (Plugin 未放开) */
Seed_WithPlugins = 12,
GPT3dot5Turbo0613 = 13,
GPT35_Turbo16k = 14,
/** sota */
SeedSota = 15,
/** sota + browsing */
SeedSotaBrowsing = 16,
/** 三合一, 主模型 + plugin + browsing, 但plugin是固定的 */
SeedOmni = 17,
/** function call */
SeedFunctionCall = 18,
/** seed main + you are right */
SeedMain = 19,
/** 联网策略实验 */
SeedBrowsingExperiment = 20,
/** browsing单模型 */
SeedBrowsingOnly = 21,
/** MiniMax abab5.5-chat模型 */
MiniMaxABAB5dot5Chat = 22,
Echo = 23,
GPT4_0613 = 24,
/** seed + system prompt + memory */
SeedSystemWithMemory = 25,
/** seed + system prompt + momory test */
SeedSystemWithMemoryTest = 26,
/** seed map */
SeedMap = 27,
SeedSuggest = 28,
SeedComplexInstruction = 29,
SeedComplexInstructionTest = 30,
Edu = 31,
SeedSuggestOffline = 32,
SeedOmniSota = 33,
SeedStrongCharacterNearlinePortrait = 34,
}
export enum ModelProxy {
/** ModelId >= 100 */
FuncBot = 1,
/** Config in TCC: model_using_chain */
Chain = 2,
/** Define in copilot.chat_with_bot#aiAgentModels or ai_agent.Chat */
Agent = 3,
/** Other */
Executor = 4,
}
/** 兼容旧逻辑里的模型 status */
export enum ModelStatus {
InUse = 1,
Pending = 5,
Deleted = 10,
}
export enum ModelType {
GPT3dot5Turbo = 1,
GPT4 = 2,
Seed = 3,
SeedMultiturn = 4,
StableDiffusion = 5,
ByteArtist = 6,
Claude = 7,
BingChat = 8,
Bard = 9,
Assistant = 10,
DallE = 11,
Midjourney = 12,
TTSearch = 13,
GPTTask = 14,
GPT4Browsing = 15,
GPT4WithPlugins = 16,
GPT3dot5WithPlugins = 17,
SeedSystem = 18,
Plugin = 20,
GPT4Plugin = 21,
WebGPT = 22,
GPT3dot5WithFunction = 23,
AutoPlugin = 24,
MiniMax = 25,
GPT3dot5WithTako = 26,
GPT4WithTako = 27,
GPT4WithTakoTikTok = 28,
GPT4WithTakoGoogle = 29,
SeedBeta = 30,
ByteArtistAnime = 31,
GenMusic = 32,
GPT48k = 33,
SeedStrongCharacterForTest = 34,
SeedForTest = 35,
SeedOmniFake = 36,
SeedOmniBrowse = 37,
SeedOmniSota = 38,
SeedOmniSotaBrowse = 39,
SeedOmniBrowseWithCard = 40,
CiciSearchMore = 41,
CiciSearchLess = 42,
CiciSearchBing = 43,
SeedOmniPlugin = 44,
CiciSearchBing_GPT35 = 45,
GPT40613 = 46,
SeedForMap = 47,
SeedForMusic = 48,
XiaoningWithMem = 49,
/** 功能性bot的模型从100开始旧版bot的模型在100以下 pangzhiqiang@bytedance.com */
GPT_35Turbo = 100,
GPT_35Turbo0301 = 101,
GPT_4 = 102,
GPT_40314 = 103,
GPT_432k = 104,
GPT_432k0314 = 105,
/** seed 主模型 */
Seed_Beta = 106,
Seed_Music = 107,
GPT4_32k0613 = 108,
Seed_Img2Text = 109,
/** seed主模型 + browsing */
Seed_WebGPT = 110,
/** seed主模型 + browsing + (plugin暂为开放) */
Seed_WithPlugins = 111,
GPT_35Turbo0613 = 112,
GPT_35Turbo16K = 113,
/** sota */
Seed_Sota = 114,
/** sota + browsing */
Seed_Sota_Browsing = 115,
/** strong character */
Seed_WithSystem = 116,
/** 三合一, 主模型 + plugin + browsing, 但plugin是固定的 */
Seed_Omni = 118,
/** seed function calling */
SeedFunctionCall = 119,
/** seed 主模型, 带"是的你说的对" */
Seed_Main = 120,
/** 联网策略实验 */
SeedBrowsingExperiment = 121,
/** browsing单模型 */
SeedBrowsingOnly = 122,
/** 虚假的 llmfunction call 协议,一直调用第一个 function */
Echo = 123,
GPT_40613 = 124,
/** for seed test */
Seed_WithSystemForTest = 125,
/** 地图 */
Seed_Map = 126,
SeedSuggest = 127,
Seed_ComplexInstructionTest = 128,
Seed_ComplexInstruction = 129,
Edu = 130,
Tako_Intent = 131,
Seed_Text2Img = 132,
GPT_4Preview_128k1106 = 133,
SeedForDouyin = 134,
SeedFunctionCallSp = 135,
SeedSuggestOffline = 136,
SkylarkChat = 137,
SeedStrongCharacterNearlinePortrait = 138,
/** 保障头条链路 */
SkylarkPro_v1_1_TT = 1704353638,
/** 保障头条链路(带联网插件) */
SkylarkPro_v1_1_TT_BROWSING = 1704696164,
/** 豆包 bot 分类模型 */
SeedBotTag = 1705216686,
/** 豆包语音链路优化模型 */
SeedStrongCharacterAudio = 1705220979,
}
export enum ModelVersion {
UNK = 0,
GPT3D5 = 1,
GPT4 = 2,
}
export enum ModuleType {
Plugin = 1,
Hook = 2,
GptEngine = 3,
Edu = 4,
}
export enum MultiStreamScene {
Unknown_MultiStreamScene = 0,
CrowdTesting = 1,
}
export enum MultiStreamStatus {
Unknown_MultiStreamStatus = 0,
Start = 1,
End = 2,
}
/** Onboarding组件类型 */
export enum OnboardingComponentType {
Prologue = 1,
SuggestedQuestion = 2,
}
/** onboarding结果的内容来源 */
export enum OnboardingResultSource {
/** LLM生成 */
LLM_GEN = 1,
/** LLM翻译自LLM生成内容 */
LLM_GEN_THEN_TRANSLATE = 2,
/** 人工指定 */
MANUAL = 3,
/** LLM翻译自人工指定 */
MANUAL_THEN_TRANSLATE = 4,
}
/** Onboarding场景 */
export enum OnboardingSceneType {
/** 新用户 */
FIRST_MET = 1,
/** 欢迎回来 */
WELCOME_BACK = 2,
}
/** onboarding内容生成模式 */
export enum OnboardingSourceMode {
/** 不需要 */
NO_NEED = 1,
/** 人工指定内容多语言支持由LLM兜底 */
USE_MANUAL = 2,
/** 由LLM生成 */
USE_LLM = 3,
}
export enum OnboardingType {
None = 0,
/** 不展示开场白 */
OnboardingNotDisplay = 1,
/** 完全使用预设开场白 */
OnboardingPreset = 2,
/** 使用llm自动生成的开场白 */
OnboardingLLMGen = 3,
}
export enum PreGenType {
PreGen_Query = 1,
PreGen_PreQuery = 2,
PreGen_Continue = 3,
PreGen_End = 4,
}
export enum PrintBehavior {
Block = 0,
Streaming = 1,
Full = 2,
}
export enum PromptTemplateFormat {
FString = 1,
Jinja2 = 2,
}
export enum ReplyType {
Answer = 1,
Suggest = 2,
LLMOutput = 3,
ToolOutput = 4,
DataSet = 5,
QueryKeyword = 6,
IntermediateOutput = 7,
Verbose = 100,
/** [copilot inner package protocol] A buffered packege in multi-agent messenger to maintain the upstream */
PlaceHolder = 101,
}
export enum ResultType {
ResultType_Default = 0,
ResultType_PluginResponse = 1,
ResultType_PluginIntent = 2,
ResultType_Variables = 3,
ResultType_None = 4,
ResultType_BotSchema = 5,
ResultType_ReferenceVariable = 6,
}
export enum ResumeScene {
/** Compatible value */
ResumeDefault = 0,
/** 插件授权场景 */
PluginAuthorized = 1,
/** 异步插件 */
PluginAsync = 2,
/** 插件打断 */
PluginInterrupt = 3,
}
export enum SearchEngineType {
Nothing = 0,
Google = 1,
DouYin = 2,
TouTiao = 4,
}
export enum SourceType {
BotStudioSubmit = 1,
BotStudioWorkflowTest = 2,
Flow = 3,
API = 4,
Aweme = 5,
}
export enum Stage {
Plan = 0,
AgentHook = 1,
}
/** 回答附带建议问题 */
export enum SuggestReplyMode {
/** 使用默认Suggest Prompt生成建议回复 */
WithDefaultPrompt = 0,
/** 使用自定义Suggest Prompt生成建议回复 */
WithCustomizedPrompt = 1,
/** 不需要Suggest */
Disable = 2,
/** (Agent)使用源bot的配置 */
UseOriginBotMode = 3,
}
export enum ToolAuthType {
/** 默认,调用插件时若无权限会报错 */
Ask = 0,
/** 仅本次允许 */
Once = 1,
/** 始终允许 */
Always = 2,
}
/** 用户上传/bot生成的文件信息 */
export interface FileInfo {
name?: string;
url?: string;
uri?: string;
md5?: string;
}
export interface ImageInfo {
name?: string;
/** 本期使用这里先不用uri */
url?: string;
uri?: string;
md5?: string;
}
export interface LocationInfo {
Longitude?: number;
Latitude?: number;
city?: string;
country?: string;
province?: string;
district?: string;
town?: string;
country_code?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,156 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as data_connector_common from './data_connector_common';
import * as base from './base';
export type Int64 = string | number;
export interface AssociateFileParam {
third_party_file_id?: string;
file_name?: string;
source_file_type?: data_connector_common.SourceFileType;
file_url?: string;
}
export interface AssociateFileRequest {
params?: Record<Int64, Array<AssociateFileParam>>;
Base?: base.Base;
}
export interface AssociateFileResponse {
file_mapping?: Record<Int64, Array<SourceFileInfo>>;
code: Int64;
msg: string;
}
export interface CheckSourceFileRequest {
source_file_id?: string;
redirect_uri?: string;
Base?: base.Base;
}
export interface CheckSourceFileResponse {
is_exist?: boolean;
is_authorized?: boolean;
/** 未授权or文件不存在会返回授权链接 */
authorization_url?: string;
/** 未授权or文件不存在会返回授权列表 */
data_source_infos?: Array<DataSourceInfo>;
code: Int64;
msg: string;
}
/** 数据源的基本信息 */
export interface DataSourceInfo {
data_source_id?: string;
data_source_type?: data_connector_common.DataSourceType;
data_source_name?: string;
data_source_icon?: string;
}
export interface FileNode {
file_id?: string;
file_type?: data_connector_common.FileNodeType;
file_name?: string;
icon_url?: string;
has_children_nodes?: boolean;
children_nodes?: Array<FileNode>;
file_url?: string;
}
export interface GetAuthorizationFileListRequest {
data_source_id?: string;
file_type: Array<data_connector_common.FileNodeType>;
Base?: base.Base;
}
export interface GetAuthorizationFileListResponse {
/** 三方数据平台文件列表 */
third_party_file_tree?: Array<FileNode>;
code: Int64;
msg: string;
}
export interface GetConnectorGrayRequest {
host?: string;
Base?: base.Base;
}
export interface GetConnectorGrayResponse {
connector_info_list?: Array<data_connector_common.DataSourceType>;
code: Int64;
msg: string;
}
export interface GetUserDataSourceListRequest {
/** 授权成功之后跳转的前端url */
redirect_url?: string;
host?: string;
Base?: base.Base;
}
export interface GetUserDataSourceListResponse {
authorization_url_map?: Partial<
Record<data_connector_common.DataSourceType, string>
>;
data_source_map?: Partial<
Record<data_connector_common.DataSourceType, Array<DataSourceInfo>>
>;
code: Int64;
msg: string;
}
export interface GetWeChatTicketRequest {
encrypt_type?: string;
timestamp?: Int64;
nonce?: string;
msg_signature?: string;
signature?: string;
Data?: Blob;
Base?: base.Base;
}
export interface GetWeChatTicketResponse {
Msg?: string;
}
export interface SourceFileInfo {
source_file_id?: string;
user_id?: string;
data_source_id?: string;
data_source_type?: data_connector_common.DataSourceType;
file_type?: data_connector_common.SourceFileType;
file_name?: string;
status?: data_connector_common.FileStatus;
}
export interface SubmitUserPolicyRecordRequest {
policy_type: string;
user_policy_action: data_connector_common.UserPolicyAction;
Base?: base.Base;
}
export interface SubmitUserPolicyRecordResponse {
code: Int64;
msg: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,56 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export enum DataSourceType {
Notion = 1,
GoogleDrive = 2,
FeishuWeb = 103,
LarkWeb = 104,
WeChat = 109,
}
export enum FileNodeType {
Folder = 1,
Document = 2,
Sheet = 3,
Space = 4,
}
export enum FileStatus {
Initialized = 1,
Processing = 2,
Success = 3,
Failed = 4,
UnAssociated = 5,
}
export enum SourceFileType {
Markdown = 1,
Excel = 2,
}
export enum UserPolicyAction {
Agree = 0,
Disagree = 1,
}
/* eslint-enable */

View File

@@ -0,0 +1,173 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
import * as common from './common';
export type Int64 = string | number;
export enum DataSetScopeType {
ScopeAll = 1,
ScopeSelf = 2,
}
/** 数据集搜索类型定义 */
export enum DataSetSearchType {
SearchByCreateTime = 1,
SearchByUpdateTime = 2,
}
export enum DataSetSource {
SourceSelf = 1,
SourceExplore = 2,
}
export enum FrequencyType {
/** 不更新 */
None = 0,
/** 每天追加最新 */
EveryDay = 1,
/** 每三天追加最新 */
EveryThreeDay = 2,
/** 每七天追加最新 */
EverySevenDay = 3,
}
export enum RecallChannel {
Embedding = 0,
BM25 = 1,
}
export interface BotSimpleInfo {
name?: string;
icon_url?: string;
bot_id?: string;
creator_id?: string;
}
export interface CopyDatasetList {
origin_dataset_id: Int64;
target_dataset_id: Int64;
}
export interface CreateDataSetRequest {
creator_id?: string;
name?: string;
description?: string;
icon_uri?: string;
space_id?: string;
Base?: base.Base;
}
export interface CreateDataSetResponse {
data_set_id?: string;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface DeleteDataSetRequest {
data_set_id?: string;
creator_id?: string;
Base?: base.Base;
}
export interface DeleteDataSetResponse {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface GetBotListByDatasetReq {
dataset_id: string;
page_size?: string;
/** 从1开始 */
page_no?: string;
Base?: base.Base;
}
export interface GetBotListByDatasetResp {
bot_list?: Array<BotSimpleInfo>;
total?: string;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface ListDataSetV2Request {
creator_id?: string;
/** 关键字搜索 */
query?: string;
/** 搜索类型 */
search_type?: DataSetSearchType;
page?: number;
size?: number;
dataset_ids?: Array<string>;
space_id?: string;
/** 搜索类型 */
scope_type?: DataSetScopeType;
/** 来源 */
source_type?: DataSetSource;
Base?: base.Base;
}
export interface ListDataSetV2Response {
data_set_infos?: Array<common.DataSetInfo>;
total?: number;
code: Int64;
msg: string;
BaseResp: base.BaseResp;
}
export interface RecallDataSetData {
memory?: Array<RecallDataSetInfo>;
}
export interface RecallDataSetInfo {
slice?: string;
score?: number;
doc_id?: string;
}
export interface RecallStrategy {
recall_channels?: Array<RecallChannel>;
rerank_model?: string;
use_rerank?: boolean;
use_rewrite?: boolean;
use_nl2sql?: boolean;
is_personal_only?: boolean;
}
export interface UpdateDataSetMetaRequest {
data_set_id?: string;
creator_id?: string;
name?: string;
icon_uri?: string;
description?: string;
Base?: base.Base;
}
export interface UpdateDataSetMetaResponse {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
/* eslint-enable */

View File

@@ -0,0 +1,450 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as common from './common';
import * as base from './base';
import * as connector_common from './connector_common';
export type Int64 = string | number;
export enum SegmentAppendType {
/** 占位 */
SegmentAppendType_None = 0,
/** 尾部追加 */
SegmentAppendType_Tail = 1,
/** 提前定义,本次不用
头部 */
SegmentAppendType_Head = 2,
/** 中间 */
SegmentAppendType_Mid = 3,
}
export enum TableDataType {
/** schema sheets 和 preview data */
AllData = 0,
/** 只需要 schema 结构 & Sheets */
OnlySchema = 1,
/** 只需要 preview data */
OnlyPreview = 2,
}
export interface AddSegmentRequest {
space_id: string;
document_id: string;
source_type: common.DocumentSourceType;
source_file: common.SourceFileInfo;
user_table_info: DocumentTableTaskInfo;
append_type: SegmentAppendType;
/** 提前定义,本次不用 */
append_sequence?: Int64;
Base?: base.Base;
}
export interface AddSegmentResponse {
document_id: string;
/** 如果失败会返回错误码 */
code: Int64;
msg: string;
}
export interface CreateDocumentRequest {
creator_id?: string;
dataset_id?: string;
document?: common.DocumentInfo;
space_id?: string;
Base?: base.Base;
}
export interface CreateDocumentResponse {
id?: string;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface DeleteUserDataSourceRequest {
data_source_id?: Int64;
/** 需要删除已经添加的文件和向量块 */
need_delete_document?: boolean;
auth_id?: string;
connector_id?: connector_common.ConnectorID;
Base?: base.Base;
}
export interface DeleteUserDataSourceResponse {
code: Int64;
msg: string;
}
export interface DelWebDataRequest {
web_id?: string;
creator_id?: string;
Base?: base.Base;
}
export interface DelWebDataResponse {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface DocumentFileInfo {
name?: string;
uri?: string;
document_id?: string;
}
export interface DocumentTableTaskInfo {
/** 用户选择的 sheet id */
sheet_id: string;
/** 用户选择的表头行数,从 0 开始编号 */
header_line_idx: string;
/** 用户选择的起始行号,从 0 开始编号 */
start_line_idx: string;
}
export interface DocumentTaskInfo {
name?: string;
uri?: string;
/** 用于重新切片 */
document_id?: string;
/** 格式类型 */
format_type?: common.FormatType;
/** 表格元数据 */
doc_table_meta?: Array<common.DocTableColumn>;
/** 表格解析信息 */
doc_table_info?: DocumentTableTaskInfo;
source_file_id?: string;
document_source_type?: common.DocumentSourceType;
}
export interface GetDocumentTableInfoRequest {
/** 如果为第一次 url 上传的表格,传递该值 */
submit_web_id?: string;
/** 如果为第一次本地文件上传的表格,传递该值 */
tos_uri?: string;
/** 如果为已有 document 的表格,传递该值 */
document_id?: string;
/** 创建人[http接口不需要传递] */
creator_id?: Int64;
source_file_id?: string;
Base?: base.Base;
}
export interface GetDocumentTableInfoResponse {
code?: number;
msg?: string;
sheet_list?: Array<common.DocTableSheet>;
/** key: sheet_id -> list<common.DocTableColumn> */
table_meta?: Record<Int64, Array<common.DocTableColumn>>;
/** key: sheet_id -> list_preview_data */
preview_data?: Record<Int64, Array<Record<Int64, string>>>;
}
export interface GetTableSchemaInfoRequest {
/** 本地文件上传的 tos 地址,传递该值(等前端上线完迁移到SourceFile) */
tos_uri?: string;
/** 表格解析信息, 默认初始值0,0,1 */
doc_table_info?: DocumentTableTaskInfo;
/** 不传默认返回所有数据 */
table_data_type?: TableDataType;
/** 如果需要拉取的是当前 document 的 schema 时传递该值 */
document_id?: string;
/** source file 的信息,新增 segment / 之前逻辑迁移到这里 */
source_file?: common.SourceFileInfo;
/** 表格预览前端需要传递原始的数据表结构 */
origin_table_meta?: Array<common.DocTableColumn>;
/** 表格预览前端需要传递用户编辑之后的数据表结构 */
preview_table_meta?: Array<common.DocTableColumn>;
Base?: base.Base;
}
export interface GetTableSchemaInfoResponse {
code?: number;
msg?: string;
sheet_list?: Array<common.DocTableSheet>;
/** 选中的 sheet 的 schema, 不选择默认返回第一个 sheet */
table_meta?: Array<common.DocTableColumn>;
/** knowledge table 场景中会返回 */
preview_data?: Array<Record<Int64, string>>;
}
export interface GetTaskProgressV2Request {
document_id?: Array<string>;
creator_id?: string;
Base?: base.Base;
}
export interface GetTaskProgressV2Response {
data?: Array<TaskProgressDataV2>;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface ListDocumentRequest {
dataset_id?: string;
/** http接口不传递 */
creator_id?: Int64;
document_id?: string;
page?: number;
size?: number;
Base?: base.Base;
}
export interface ListDocumentResponse {
documentsInfo?: Array<common.DocumentInfo>;
total?: number;
code?: Int64;
msg?: string;
}
export interface ProcessDocumentsTaskRequest {
/** http接口不需要传递 */
creator_id?: Int64;
dataset_id?: string;
document_infos?: Array<DocumentTaskInfo>;
rule?: string;
Base?: base.Base;
}
export interface ProcessDocumentsTaskResponse {
document_infos?: Array<DocumentFileInfo>;
code?: Int64;
msg?: string;
}
export interface ProcessWebDocumentsTaskRequest {
creator_id?: string;
dataset_id?: string;
document_info?: Array<WebDocumentInfo>;
formatType?: common.FormatType;
Base?: base.Base;
}
export interface ProcessWebDocumentsTaskResponse {
document_infos?: Array<DocumentFileInfo>;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface QueryWebInfoRequest {
web_ids?: Array<string>;
/** 是否包含内容 */
include_content?: boolean;
creator_id?: string;
Base?: base.Base;
}
export interface QueryWebInfoResponse {
data?: Record<Int64, WebInfoData>;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface ResegmentRequest {
dataset_id: string;
document_id: string;
rule?: string;
/** 格式类型 */
format_type?: common.FormatType;
creator_id?: string;
Base?: base.Base;
}
export interface ResegmentResponse {
code?: Int64;
msg?: string;
document_infos?: DocumentFileInfo;
BaseResp?: base.BaseResp;
}
export interface SubmitCrawlDataRequest {
/** web_document */
web_documents?: Array<WebDocument>;
/** 隶属的datasetID */
dataset_id?: string;
Base?: base.Base;
}
export interface SubmitCrawlDataResponse {
document_infos?: Array<DocumentFileInfo>;
code?: Int64;
msg?: string;
}
export interface SubmitWebContentV2Request {
web_id?: string;
content?: string;
Base?: base.Base;
}
export interface SubmitWebContentV2Response {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface SubmitWebUrlRequest {
web_url?: string;
/** 0 不包换子页面。 */
subpages_count?: number;
creator_id?: string;
/** 文件格式类型 */
format_type?: common.FormatType;
/** 网页标题 url 类型必传 */
title?: string;
Base?: base.Base;
}
export interface SubmitWebUrlResponse {
web_id?: string;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface TableSchemaValidRequest {
space_id: string;
document_id: string;
/** source file 的信息 */
source_file: common.SourceFileInfo;
user_table_info: DocumentTableTaskInfo;
Base?: base.Base;
}
export interface TableSchemaValidResponse {
column_valid_result?: Record<string, string>;
/** 如果失败会返回错误码 */
code: Int64;
msg: string;
}
export interface TaskProgressData {
document_id?: string;
progress?: number;
status?: common.DocumentStatus;
/** 状态的详细描述;如果切片失败,返回失败信息 */
status_descript?: string;
}
export interface TaskProgressDataV2 {
document_id?: string;
progress?: number;
status?: common.DocumentStatus;
/** 状态的详细描述;如果切片失败,返回失败信息 */
status_descript?: string;
document_name?: string;
}
export interface UpdateDocumentV2Request {
creator_id?: string;
document_id?: string;
status?: common.DocumentStatus;
document_name?: string;
table_meta?: Array<common.DocTableColumn>;
Base?: base.Base;
}
export interface UpdateDocumentV2Response {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface UpdateWebRuleRequest {
document_id?: string;
update_type?: common.DocumentUpdateType;
update_interval?: number;
creator_id?: string;
Base?: base.Base;
}
export interface UpdateWebRuleResponse {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface ValidateUnitNameRequest {
space_id: string;
dataset_id: string;
unit_name: string;
format_type: common.FormatType;
document_id?: string;
Base?: base.Base;
}
export interface ValidateUnitNameResponse {
/** 如果失败会返回错误码 */
code: Int64;
msg: string;
}
export interface WebDocument {
/** 标题(表名) */
title?: string;
/** 表头 */
headers?: Array<string>;
/** 抓取到的完整信息 */
content?: Array<Record<string, string>>;
/** 类型(文档/表格) */
format_type?: common.FormatType;
/** 抓取页面的URL */
url?: string;
/** 抓取信息的XPATH */
marks?: Record<string, string>;
}
export interface WebDocumentInfo {
web_id?: string;
update_type?: common.DocumentUpdateType;
/** 更新间隔天数 0表示不更新 */
update_interval?: number;
sub_web_ids?: Array<string>;
/** 如果是已有更新 */
document_id?: string;
/** 表格类型元数据 */
table_meta?: Array<common.DocTableColumn>;
/** 原有的表格类型元数据 deprecated 服务代码中没用 */
orig_table_meta?: Array<common.DocTableColumn>;
name?: string;
}
export interface WebInfo {
id?: string;
url?: string;
content?: string;
title?: string;
subpages?: Array<WebInfo>;
subpages_count?: number;
status?: common.WebInfoStatus;
}
export interface WebInfoData {
progress?: number;
web_info?: WebInfo;
status?: common.WebInfoStatus;
status_descript?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,187 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as table from './table';
import * as base from './base';
import * as project_memory from './project_memory';
export type Int64 = string | number;
export interface DelProfileMemoryRequest {
user_id?: Int64;
bot_id?: string;
keywords?: Array<string>;
connector_id?: Int64;
/** 引用信息 */
ref_info?: table.RefInfo;
project_id?: string;
Base?: base.Base;
}
export interface DelProfileMemoryResponse {
BaseResp: base.BaseResp;
}
export interface GetMemoryVariableMetaListData {
items?: Array<VariableNew>;
}
export interface GetProfileMemoryRequest {
user_id?: Int64;
bot_id?: string;
keywords?: Array<string>;
connector_id?: Int64;
version?: string;
/** 引用信息 */
ref_info?: table.RefInfo;
ext?: string;
project_id?: string;
ProjectVersion?: Int64;
VariableChannel?: project_memory.VariableChannel;
Base?: base.Base;
}
export interface GetProfileMemoryResponse {
memories?: Array<KVItem>;
BaseResp: base.BaseResp;
}
export interface GetSysVariableConfRequest {
Base?: base.Base;
}
export interface GetSysVariableConfResponse {
conf?: Array<VariableInfo>;
group_conf?: Array<GroupVariableInfo>;
BaseResp: base.BaseResp;
}
export interface GetVariableData {
items?: Array<KVItem>;
}
export interface GroupVariableInfo {
group_name?: string;
group_desc?: string;
group_ext_desc?: string;
var_info_list?: Array<VariableInfo>;
sub_group_info?: Array<GroupVariableInfo>;
}
export interface KVItem {
keyword?: string;
value?: string;
create_time?: Int64;
update_time?: Int64;
is_system?: boolean;
prompt_disabled?: boolean;
schema?: string;
}
export interface OpenGetPlaygroundVariableReq {
/** Project的用户变量传project */
app_id?: string;
/** bot id */
bot_id?: string;
connector_id?: string;
/** 渠道uid */
connector_uid?: string;
/** 变量名称 */
keywords?: Array<string>;
Base?: base.Base;
}
export interface OpenGetPlaygroundVariableResp {
code?: number;
msg?: string;
data?: GetVariableData;
BaseResp: base.BaseResp;
}
export interface OpenSetPlaygroundVariableReq {
/** Project的用户变量传project */
app_id?: string;
/** bot id */
bot_id?: string;
/** 渠道id */
connector_id?: string;
/** 渠道uid */
connector_uid?: string;
/** 要设置的值 */
data?: Array<KVItem>;
Base?: base.Base;
}
export interface OpenSetPlaygroundVariableResp {
code?: number;
msg?: string;
BaseResp: base.BaseResp;
}
export interface SetKvMemoryReq {
bot_id: string;
user_id?: Int64;
data: Array<KVItem>;
connector_id?: Int64;
/** 引用信息 */
ref_info?: table.RefInfo;
project_id?: string;
ProjectVersion?: Int64;
Base?: base.Base;
}
export interface SetKvMemoryResp {
BaseResp?: base.BaseResp;
}
export interface VariableInfo {
key?: string;
default_value?: string;
description?: string;
sensitive?: string;
must_not_use_in_prompt?: string;
can_write?: string;
example?: string;
ext_desc?: string;
group_name?: string;
group_desc?: string;
group_ext_desc?: string;
EffectiveChannelList?: Array<string>;
is_allow_modify?: string;
}
export interface VariableNew {
/** 变量名 */
keyword?: string;
/** 默认值 */
default_value?: string;
/** 变量类型 */
variable_type?: string;
/** 变量来源 */
channel?: string;
/** 变量描述 */
description?: string;
/** 是否启用 */
enable?: boolean;
/** 变量默认支持在Prompt中访问取消勾选后将不支持在Prompt中访问仅能在Workflow中访问 */
prompt_enable?: boolean;
}
/* eslint-enable */

View File

@@ -0,0 +1,45 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export interface ChatContext {
/** 上下文携带的历史消息 */
MessageContext: Array<Message>;
}
export interface Message {
Role: string;
Content: string;
}
export interface SearchItem {
/** 本轮的query */
Query: string;
}
export interface SearchResultItem {
/** 事件文本 */
Text: string;
/** 时间戳 */
EventMs?: Int64;
}
/* eslint-enable */

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export enum DeleteType {
DeleteMessage = 1,
DeleteConversation = 2,
}
export interface GetLongMemoryData {
memory?: Array<LongMemoryInfo>;
}
export interface GetShortMemoryData {
memory?: Array<ShortMemoryInfo>;
}
export interface LongMemory {
question?: string;
answer?: string;
}
export interface LongMemoryInfo {
question?: string;
answer?: string;
score?: number;
}
export interface ShortMemoryInfo {
type?: number;
content?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,152 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
export type Int64 = string | number;
export enum AttributeValueType {
Unknown = 0,
String = 1,
Boolean = 2,
StringList = 11,
BooleanList = 12,
}
export enum ResourceType {
Account = 1,
Workspace = 2,
App = 3,
Bot = 4,
Plugin = 5,
Workflow = 6,
Knowledge = 7,
PersonalAccessToken = 8,
Connector = 9,
Card = 10,
CardTemplate = 11,
Conversation = 12,
File = 13,
ServicePrincipal = 14,
Enterprise = 15,
MigrateTask = 16,
Prompt = 17,
UI = 18,
Project = 19,
Database = 23,
}
export enum VariableChannel {
Custom = 1,
System = 2,
Location = 3,
Feishu = 4,
/** 项目变量 */
APP = 5,
}
export enum VariableConnector {
Bot = 1,
Project = 2,
}
export enum VariableType {
KVVariable = 1,
ListVariable = 2,
}
export interface AttributeValue {
Type: AttributeValueType;
Value: string;
}
export interface GetMemoryVariableMetaReq {
ConnectorID?: string;
ConnectorType?: VariableConnector;
version?: string;
Base?: base.Base;
}
export interface GetMemoryVariableMetaResp {
VariableMap?: Partial<Record<VariableChannel, Array<Variable>>>;
BaseResp: base.BaseResp;
}
export interface GetProjectVariableListReq {
ProjectID?: string;
UserID?: Int64;
version?: string;
Base?: base.Base;
}
export interface GetProjectVariableListResp {
VariableList?: Array<Variable>;
CanEdit?: boolean;
GroupConf?: Array<GroupVariableInfo>;
code: Int64;
msg: string;
BaseResp: base.BaseResp;
}
export interface GroupVariableInfo {
GroupName?: string;
GroupDesc?: string;
GroupExtDesc?: string;
VarInfoList?: Array<Variable>;
SubGroupList?: Array<GroupVariableInfo>;
IsReadOnly?: boolean;
DefaultChannel?: VariableChannel;
}
export interface ResourceIdentifier {
/** 资源类型 */
Type: ResourceType;
/** 资源Id */
Id: string;
}
export interface UpdateProjectVariableReq {
ProjectID?: string;
UserID?: Int64;
VariableList?: Array<Variable>;
Base?: base.Base;
}
export interface UpdateProjectVariableResp {
code: Int64;
msg: string;
BaseResp: base.BaseResp;
}
export interface Variable {
Keyword?: string;
DefaultValue?: string;
VariableType?: VariableType;
Channel?: VariableChannel;
Description?: string;
Enable?: boolean;
/** 生效渠道 */
EffectiveChannelList?: Array<string>;
/** 新老数据都会有schema除项目变量外其他默认为string */
Schema?: string;
IsReadOnly?: boolean;
}
/* eslint-enable */

View File

@@ -0,0 +1,215 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export enum ActionKey {
/** 复制 */
Copy = 1,
/** 删除 */
Delete = 2,
/** 启用/禁用 */
EnableSwitch = 3,
/** 编辑 */
Edit = 4,
/** 切换成funcflow */
SwitchToFuncflow = 8,
/** 切换成chatflow */
SwitchToChatflow = 9,
/** 跨空间复制 */
CrossSpaceCopy = 10,
}
export enum CopyStatus {
Successful = 1,
Processing = 2,
Failed = 3,
/** 如果是KeepOrigin表示该资源不需要做变更资源方不需要设置Target相关信息引用方直接忽略即可 */
KeepOrigin = 4,
/** 表示回滚到草稿时,资源从有->无的变更 */
Deleted = 5,
}
export enum ProjectResourceActionKey {
/** 重命名 */
Rename = 1,
/** 创建副本/复制到当前项目 */
Copy = 2,
/** 复制到资源库 */
CopyToLibrary = 3,
/** 移动到资源库 */
MoveToLibrary = 4,
/** 删除 */
Delete = 5,
/** 启用 */
Enable = 6,
/** 禁用 */
Disable = 7,
/** 切换成funcflow */
SwitchToFuncflow = 8,
/** 切换成chatflow */
SwitchToChatflow = 9,
}
export enum ProjectResourceGroupType {
Workflow = 1,
Plugin = 2,
Data = 3,
}
export enum PublishStatus {
/** 未发布 */
UnPublished = 1,
/** 已发布 */
Published = 2,
}
export enum ResourceCopyScene {
/** 复制项目内的资源,浅拷贝 */
CopyProjectResource = 1,
/** 复制项目资源到Library复制后要发布 */
CopyResourceToLibrary = 2,
/** 移动项目资源到Library复制后要发布后置要删除项目资源 */
MoveResourceToLibrary = 3,
/** 复制Library资源到项目 */
CopyResourceFromLibrary = 4,
/** 复制项目,连带资源要复制。复制当前草稿。 */
CopyProject = 5,
/** 项目发布到渠道,连带资源需要发布(含商店)。以当前草稿发布。 */
PublishProject = 6,
/** 复制项目模板。 */
CopyProjectTemplate = 7,
/** 项目发布到模板,以项目的指定版本发布成临时模板。 */
PublishProjectTemplate = 8,
/** 上架模板 */
LaunchTemplate = 9,
/** 草稿版本存档 */
ArchiveProject = 10,
/** 线上版本加载到草稿,草稿版本加载到草稿 */
RollbackProject = 11,
/** 单个资源跨空间复制 */
CrossSpaceCopy = 12,
/** 项目跨空间复制 */
CrossSpaceCopyProject = 13,
}
export enum ResType {
Plugin = 1,
Workflow = 2,
Imageflow = 3,
Knowledge = 4,
UI = 5,
Database = 7,
Variable = 8,
}
export enum SyncOperation {
Upsert = 1,
Delete = 2,
}
export interface ProjectResourceAction {
/** 一个操作对应一个唯一的keykey由资源侧约束 */
key: ProjectResourceActionKey;
/** ture=可以操作该Actionfalse=置灰 */
enable: boolean;
/** enable=false时提示文案。后端返回Starling Key注意放在同一个space下。 */
hint?: string;
}
/** 实现方提供展示信息 */
export interface ProjectResourceInfo {
/** 资源id */
res_id?: string;
/** 资源名称 */
name?: string;
/** 不同类型的不同操作按钮,由资源实现方和前端约定。返回则展示,要隐藏某个按钮,则不要返回; */
actions?: Array<ProjectResourceAction>;
/** 该用户是否对资源只读
4: bool ReadOnly (go.tag = "json:\"read_only\"", agw.key = "read_only")
资源类型 */
res_type?: ResType;
/** 资源子类型由资源实现方定义。Plugin1-Http; 2-App; 6-LocalKnowledge0-text; 1-table; 2-imageUI1-Card */
res_sub_type?: number;
/** 业务携带的扩展信息以res_type区分每个res_type定义的schema和含义不一样使用前需要判断res_type */
biz_extend?: Record<string, string>;
/** 资源状态,各类型资源自身定义。前端与各资源方约定。 */
biz_res_status?: number;
/** 当前资源的编辑态版本 */
version_str?: string;
}
export interface RefTreeNode {
ResID?: Int64;
ResType?: ResType;
/** 引用的子资源子资源在不同层级的引用可以出现多次。A-B, A-C-B, A-D, B可以同时在A和C的ChildrenNodes出现 */
ChildrenNodes?: Array<RefTreeNode>;
}
export interface ResourceCopyCheckFailedReason {
ResourceLocator?: ResourceLocator;
ResName?: string;
Reason?: string;
}
export interface ResourceCopyEnv {
Scene?: ResourceCopyScene;
/** 原项目ID。如果被复制的资源在项目中则有值。场景CopyProjectResource、CopyResourceToLibrary、MoveResourceToLibrary、CopyProject */
OriginProjectID?: Int64;
/** 目标项目ID。如果复制后的资源要赋值project_id则有值。场景CopyProjectResource、CopyResourceFromLibrary、CopyProject */
TargetProjectID?: Int64;
/** 被用户选择复制/移动的资源ID。如果操作的目标是资源则有值。场景CopyProjectResource、CopyResourceToLibrary、MoveResourceToLibrary、CopyResourceFromLibrary */
ResourceLocator?: ResourceLocator;
/** 当次任务的唯一约束,控制幂等。有则传,发起任务时不用传 */
TaskUniqKey?: string;
/** 项目发布时项目版本。场景PublishProject、PublishProjectTemplate */
TargetProjectVersion?: Int64;
OriginProjectSpaceID?: Int64;
TargetProjectSpaceID?: Int64;
/** 操作者用户id */
CurrentUserID?: Int64;
/** 发布模板时原项目版本。or 复制模板时,模板的项目版本。 */
OriginProjectVersion?: Int64;
/** 0/default-app默认是app也就是之前的project; 1-bot或者叫agent */
ProjectType?: number;
}
/** 每个资源的复制结果,包含前后映射信息 */
export interface ResourceCopyResult {
OriginResourceLocator?: ResourceLocator;
TargetResourceLocator?: ResourceLocator;
CopyStatus?: CopyStatus;
/** 发布版本号或版本名0.0.1 */
TargetPublishVersionNum?: string;
/** 其他的信息比如plugin的tool映射信息。schema和各资源方约定 */
TargetResInfo?: string;
}
/** 用于定位一个资源数据的结构:某资源的某版本 */
export interface ResourceLocator {
ResID?: Int64;
ResType?: ResType;
/** 废弃,不要使用 */
PublishVersion?: Int64;
/** 资源的当前版本为nil或空字符串都看作是最新版本。项目发布版本或Library发布版本。 */
PublishVersionStr?: string;
}
/* eslint-enable */

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as copilot_common from './copilot_common';
export type Int64 = string | number;
export enum PromptTemplateFormat {
FString = 1,
Jinja2 = 2,
GoTemplate = 3,
}
export enum ReferenceType {
DocumentReference = 1,
}
export enum ResultType {
PluginResponse = 1,
PluginIntent = 2,
Variables = 3,
None = 4,
BotSchema = 5,
ReferenceVariable = 6,
/** 使用retriever的内容回复answer包不走大模型 */
Finish = 7,
}
export enum RetrieverType {
Plugin = 1,
PluginAsService = 2,
Service = 3,
}
export interface Message {
conversation_id?: Int64;
section_id?: Int64;
message_id?: Int64;
content?: string;
role?: copilot_common.CopilotRole;
location?: copilot_common.LocationInfo;
files?: Array<copilot_common.FileInfo>;
images?: Array<copilot_common.ImageInfo>;
}
/* eslint-enable */

View File

@@ -0,0 +1,118 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
import * as common from './common';
export type Int64 = string | number;
export enum SliceSource {
bot = 1,
hit_test = 2,
}
export interface BatchDeleteSliceRequest {
slice_id_list: Array<string>;
document_id: string;
Base?: base.Base;
}
export interface BatchDeleteSliceResponse {
code: Int64;
msg: string;
}
export interface ChangeSliceStatusReq {
slice_id: string;
creator_id: string;
status: common.SliceStatus;
Base?: base.Base;
}
export interface ChangeSliceStatusResp {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface CreateSliceReq {
document_id: string;
creator_id?: string;
content: string;
Base?: base.Base;
}
export interface CreateSliceResp {
slice_id?: string;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface DelSliceReq {
slice_id: string;
creator_id?: string;
Base?: base.Base;
}
export interface DelSliceResp {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface GetSliceListReq {
doc_id?: string;
/** 序号 */
sequence?: string;
/** 查询关键字 */
key_word?: string;
creator_id?: string;
/** 从1开始 */
page_no?: string;
page_size?: string;
sort_field?: string;
is_asc?: boolean;
Base?: base.Base;
}
export interface GetSliceListResp {
slice_list?: Array<common.SliceInfo>;
total?: string;
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
export interface UpdateSliceContentReq {
slice_id: string;
creator_id?: string;
/** 限制2000字 */
content: string;
Base?: base.Base;
}
export interface UpdateSliceContentResp {
code: Int64;
msg: string;
BaseResp?: base.BaseResp;
}
/* eslint-enable */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
export type Int64 = string | number;
export interface ScriptData {
DatasetList?: Array<Int64>;
}
/** --------------------空间资源权限转移-------------------------------- */
export interface SpaceItem {
UserId?: Int64;
SpaceId?: Int64;
}
/* eslint-enable */

View File

@@ -0,0 +1,293 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
export type Int64 = string | number;
export enum InstanceStatus {
Creating = 1,
Running = 2,
Deleting = 3,
Restarting = 4,
Updating = 5,
Restoring = 6,
Error = 7,
Upgrading = 8,
Released = 9,
Recycled = 10,
MasterChanging = 11,
TDEUpdating = 12,
Closed = 13,
Maintaining = 14,
CreateFailed = 15,
Closing = 16,
SSLUpdating = 17,
AllowListMaintaining = 18,
Unknown = 19,
ProxyCreating = 20,
ProxyDeleting = 21,
ChargeTypeChanging = 22,
NetWorkChanging = 23,
}
export enum TableRightStatus {
/** 有权限 */
HasRight = 1,
/** 无权限 */
HasNoRight = 2,
}
/** 火山数据库状态Coze的火山数据库其实就是一张火山数据表这里本质就是表的状态 */
export enum VolcanoDatabaseStatus {
/** 生效 */
Valid = 1,
/** 失效 */
Invalid = 2,
}
export interface BatchAssociateResult {
/** 保存table_name和database id的映射 */
table_map?: Record<string, string>;
}
export interface ConnectResult {
is_pass?: boolean;
fail_reason?: string;
}
export interface DatabaseDetail {
database_name?: string;
}
export interface DatabaseDetailList {
database_list?: Array<DatabaseDetail>;
total?: Int64;
has_more?: boolean;
}
export interface MysqlInstanceDetail {
instance_name?: string;
instance_id?: string;
status?: InstanceStatus;
}
export interface MysqlInstanceDetailList {
instance_detailes?: Array<MysqlInstanceDetail>;
total?: Int64;
has_more?: boolean;
}
export interface RegionDetail {
/** 区域id */
region_id?: string;
/** 区域名称 */
region_name?: string;
}
export interface TableDetail {
table_name?: string;
/** 是否已经被关联 */
has_associate?: boolean;
}
export interface TableDetailList {
table_list?: Array<TableDetail>;
total?: Int64;
has_more?: boolean;
}
export interface TableRightDetail {
table_name?: string;
database_id?: string;
origin_user_right?: TableRightStatus;
trans_user_right?: TableRightStatus;
}
export interface TableRightDetailList {
user_rights?: Array<TableRightDetail>;
total?: Int64;
}
export interface VolcaDatabaseBatchAssociateRequest {
space_id?: string;
region_id?: string;
database_bind_info?: VolcanoDatabaseBindInfo;
/** 火山创建的table名称列表 */
volcano_table_list?: Array<string>;
/** project id */
project_id?: string;
Base?: base.Base;
}
export interface VolcaDatabaseBatchAssociateResponse {
data?: BatchAssociateResult;
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcaDatabaseChangeTableRightRequest {
space_id?: string;
/** 这里只需要传入 user_name 和 user_pwd 就可以了 */
connect_info?: VolcanoDatabaseConnectInfo;
/** 转移权限的id列表online id */
database_ids?: Array<string>;
Base?: base.Base;
}
export interface VolcaDatabaseChangeTableRightResponse {
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcaDatabaseConnectCheckRequest {
space_id?: string;
region_id?: string;
connect_info?: VolcanoDatabaseConnectInfo;
Base?: base.Base;
}
export interface VolcaDatabaseConnectCheckResponse {
data?: ConnectResult;
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcaDatabaseGetTableRightRequest {
space_id?: string;
database_id?: string;
/** 这里只需要传入 user_name 和 user_pwd 就可以了 */
connect_info?: VolcanoDatabaseConnectInfo;
Base?: base.Base;
}
export interface VolcaDatabaseGetTableRightResponse {
data?: TableRightDetailList;
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcaDatabaseListDatabaseRequest {
space_id: string;
/** 区域id */
region_id: string;
connect_info?: VolcanoDatabaseConnectInfo;
page_num?: Int64;
page_size?: Int64;
Base?: base.Base;
}
export interface VolcaDatabaseListDatabaseResponse {
data?: DatabaseDetailList;
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcaDatabaseListInstanceRequest {
space_id: string;
project_name: string;
/** 区域id */
region_id: string;
page_num?: Int64;
page_size?: Int64;
Base?: base.Base;
}
export interface VolcaDatabaseListInstanceResponse {
data?: MysqlInstanceDetailList;
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcaDatabaseListProjectRequest {
space_id: string;
Base?: base.Base;
}
export interface VolcaDatabaseListProjectResponse {
data?: VolcanoProjectList;
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcaDatabaseListTableRequest {
space_id: string;
/** 区域id */
region_id?: string;
/** 传入user_name、user_pwd、instance_id */
database_bind_info?: VolcanoDatabaseBindInfo;
page_num?: Int64;
page_size?: Int64;
Base?: base.Base;
}
export interface VolcaDatabaseListTableResponse {
data?: TableDetailList;
code?: Int64;
msg?: string;
BaseResp: base.BaseResp;
}
export interface VolcanoDatabaseBindInfo {
connect_info?: VolcanoDatabaseConnectInfo;
db_name?: string;
}
export interface VolcanoDatabaseConnectInfo {
user_name?: string;
user_pwd?: string;
instance_id?: string;
}
/** 火山数据库详情 */
export interface VolcanoDatabaseDetail {
mysql_instance_detail?: MysqlInstanceDetail;
/** 火山数据库名 */
volcano_db_name?: string;
/** 火山数据表名 */
volcano_table_name?: string;
/** 火山数据库详情连接 */
link?: string;
/** 火山数据库状态 */
status?: VolcanoDatabaseStatus;
}
export interface VolcanoProject {
display_name?: string;
description?: string;
region_list?: Array<RegionDetail>;
}
export interface VolcanoProjectList {
volcano_project_list?: Array<VolcanoProject>;
}
export interface VolcanoStorageConfig {
volcano_database_config?: VolcanoDatabaseDetail;
}
/* eslint-enable */

View File

@@ -0,0 +1,90 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
/* eslint-disable */
/* tslint:disable */
// @ts-nocheck
import * as base from './base';
export type Int64 = string | number;
/** typedef string SubLinkDiscoveryTaskStatus
const SubLinkDiscoveryTaskStatus SUB_LINK_DISCOVERY_TASK_STATUS_RUNNING = "running"
const SubLinkDiscoveryTaskStatus SUB_LINK_DISCOVERY_TASK_STATUS_SUCCESS = "finished"
const SubLinkDiscoveryTaskStatus SUB_LINK_DISCOVERY_TASK_STATUS_ABORTED = "aborted" */
export enum SubLinkDiscoveryTaskStatus {
SUB_LINK_DISCOVERY_TASK_STATUS_UNKNOWN = 0,
SUB_LINK_DISCOVERY_TASK_STATUS_RUNNING = 1,
SUB_LINK_DISCOVERY_TASK_STATUS_SUCCESS = 2,
SUB_LINK_DISCOVERY_TASK_STATUS_ABORTED = 3,
SUB_LINK_DISCOVERY_TASK_STATUS_FINISHED_WITH_ERROR = 4,
}
export interface AbortSubLinkDiscoveryTaskRequest {
task_id?: string;
Base?: base.Base;
}
export interface AbortSubLinkDiscoveryTaskResponse {
BaseResp?: base.BaseResp;
}
export interface CreateSubLinkDiscoveryTaskRequest {
url?: string;
creator_id?: Int64;
Base?: base.Base;
}
export interface CreateSubLinkDiscoveryTaskResponse {
task_id?: string;
BaseResp?: base.BaseResp;
}
export interface GetSubLinkDiscoveryTaskRequest {
task_id?: string;
Base?: base.Base;
}
export interface GetSubLinkDiscoveryTaskResponse {
urls?: Array<string>;
status?: SubLinkDiscoveryTaskStatus;
BaseResp?: base.BaseResp;
}
export interface ParseSiteMapRequest {
sitemap_url?: string;
creator_id?: Int64;
Base?: base.Base;
}
export interface ParseSiteMapResponse {
urls?: Array<string>;
BaseResp?: base.BaseResp;
}
export interface SubmitBatchCrawlTaskRequest {
web_urls?: Array<string>;
creator_id?: Int64;
Base?: base.Base;
}
export interface SubmitBatchCrawlTaskResponse {
web_ids?: Array<string>;
BaseResp: base.BaseResp;
}
/* eslint-enable */