tenyun
Version:
Promise based and chained Tencent Cloud OpenAPI client for NodeJS
2,272 lines (2,137 loc) • 181 kB
TypeScript
/// <reference types="node" />
import { AxiosPromise, AxiosRequestConfig } from "axios";
/** 智能通话 */
declare interface AICallConfig {
/** 启用语音互动功能 */
EnableVoiceInteract?: boolean | null;
/** 启用语音通话 */
EnableVoiceCall?: boolean | null;
/** 启用数智人 */
EnableDigitalHuman?: boolean | null;
/** 音色配置 */
Voice?: VoiceConfig | null;
/** 数智人配置 */
DigitalHuman?: DigitalHumanConfig | null;
}
/** Agent 的定义 */
declare interface Agent {
/** AgentID */
AgentId?: string;
/** WorkflowID,非空则当前Agent从workflow转换而来 */
WorkflowId?: string;
/** Agent名称,同一个应用内,Agent名称不能重复 */
Name?: string;
/** Agent图标url */
IconUrl?: string;
/** Agent指令;当该Agent被调用时,将作为“系统提示词”使用,描述Agent应执行的操作和响应方式 */
Instructions?: string;
/** 当Agent作为转交目标时的描述,用于让其他Agent的LLM理解其功能和转交时机 */
HandoffDescription?: string;
/** Agent可转交的子AgentId列表 */
Handoffs?: string[];
/** Agent调用LLM时使用的模型配置 */
Model?: AgentModelInfo;
/** Agent可使用的工具列表 */
Tools?: AgentToolInfo[];
/** Agent可使用的插件列表 */
Plugins?: AgentPluginInfo[];
/** 当前Agent是否是启动Agent */
IsStartingAgent?: boolean;
/** Agent类型; 0: 未指定类型; 1: 知识库检索Agent */
AgentType?: number;
/** 0 自由转交,1 计划与执行 */
AgentMode?: number;
/** 高级设置 */
AdvancedConfig?: AgentAdvancedConfig;
}
/** Agent高级设置 */
declare interface AgentAdvancedConfig {
/** 是否开启澄清询问 */
EnableClarification?: boolean;
/** 思考模式,0为效果优先,1为速度优先 */
ThinkingMode?: number;
/** 最大推理轮数 */
MaxReasoningRound?: number;
/** 上下文轮数 */
HistoryLimit?: number;
/** 是否开启结构化输出 */
EnableStructuredOutput?: boolean;
/** 结构化输出配置 */
StructuredOutputConfig?: StructuredOutputConfig;
/** Agent输出配置 */
AgentOutputConfig?: AgentOutputConfig;
/** 澄清询问配置 */
ClarificationConfig?: ClarificationConfig;
}
/** Agent调试信息 */
declare interface AgentDebugInfo {
/** 工具、大模型的输入信息,json */
Input?: string | null;
/** 工具、大模型的输出信息,json */
Output?: string | null;
/** 模型名 */
ModelName?: string;
}
/** Agent转交高级设置 */
declare interface AgentHandoffAdvancedSetting {
/** 对话流转策略;0-由上一轮回复用户的 Agent 继续发起,1- 回到主Agent */
ConversationPolicy?: number;
}
/** Agent输入值,支持直接赋值和引用 */
declare interface AgentInput {
/** 输入来源类型:0 用户输入,3 自定义变量(API参数) */
InputType?: number;
/** 用户手写输入 */
UserInputValue?: AgentInputUserInputValue;
/** 自定义变量(API参数) */
CustomVarId?: string;
/** 环境变量参数 */
EnvVarId?: string;
/** 应用变量参数 */
AppVarId?: string;
/** 系统参数 */
SystemVariable?: AgentInputSystemVariable;
/** 工具参数 */
ToolParam?: string;
}
/** 系统参数 */
declare interface AgentInputSystemVariable {
/** 系统参数名 */
Name?: string;
/** 对话历史轮数的配置;如果Input是系统变量中的“对话历史”时才使用; */
DialogHistoryLimit?: number;
}
/** 用户手写输入 */
declare interface AgentInputUserInputValue {
/** 用户输入的值 */
Values?: string[];
}
/** Agent 知识库检索插件支持多知识库搜索 */
declare interface AgentKnowledge {
/** 知识库id */
KnowledgeBizId?: string;
/** 0-应用内知识库1-共享知识库 */
KnowledgeType?: number;
/** 0-全部知识1-按文档和问答2-按标签 */
Filter?: number;
/** 文档id */
DocBizIds?: string[];
/** true:包含所有问答false:不包含问答 */
AllQa?: boolean;
/** 文档标签过滤器 */
Tag?: AgentKnowledgeFilterTag;
}
/** 标签过滤器 */
declare interface AgentKnowledgeAttrLabel {
/** 属性ID */
AttributeBizId?: string;
/** 标签值,标签值之间是或的关系,只有匹配的,才会进行知识检索,否则报检索不到 */
Inputs?: AgentInput[];
}
/** 知识检索筛选范围 */
declare interface AgentKnowledgeFilter {
/** 知识检索筛选方式; 0: 全部知识; 1:按文档和问答; 2: 按标签 */
FilterType?: number;
/** 文档和问答过滤器 */
DocAndAnswer?: AgentKnowledgeFilterDocAndAnswer;
/** 标签过滤器 */
Tag?: AgentKnowledgeFilterTag;
/** 知识库列表 */
KnowledgeList?: AgentKnowledge[];
/** 是否检索全部知识 */
AllKnowledge?: boolean;
}
/** 文档和问答过滤器 */
declare interface AgentKnowledgeFilterDocAndAnswer {
/** 文档ID列表 */
DocBizIds?: string[];
/** 问答 */
AllQa?: boolean;
}
/** 标签过滤器 */
declare interface AgentKnowledgeFilterTag {
/** 标签之间的关系;0:AND, 1:OR */
Operator?: number;
/** 标签 */
Labels?: AgentKnowledgeAttrLabel[];
}
/** 知识库问答插件 */
declare interface AgentKnowledgeQAPlugin {
/** 知识检索筛选范围 */
Filter?: AgentKnowledgeFilter;
}
/** mcp的服务信息 */
declare interface AgentMCPServerInfo {
/** mcp server URL地址 */
McpServerUrl?: string;
/** mcp server header信息 */
Headers?: AgentPluginHeader[];
/** 超时时间,单位秒 */
Timeout?: number;
/** sse服务超时时间,单位秒 */
SseReadTimeout?: number;
/** mcp server query信息 */
Query?: AgentPluginQuery[];
}
/** Agent 配置里面的模型定义 */
declare interface AgentModelInfo {
/** 模型名称 */
ModelName?: string;
/** 模型别名 */
ModelAliasName?: string;
/** 模型温度 */
Temperature?: number;
/** 模型TopP */
TopP?: number;
/** 模型是否可用 */
IsEnabled?: boolean;
/** 对话历史条数限制 */
HistoryLimit?: number;
/** 模型上下文长度字符限制 */
ModelContextWordsLimit?: string;
/** 指令长度字符限制 */
InstructionsWordsLimit?: number;
/** 单次会话最大推理轮数 */
MaxReasoningRound?: number;
/** 模型参数 */
ModelParams?: ModelParams;
}
/** Agent输出配置 */
declare interface AgentOutputConfig {
/** 输出类型,1-文本 2-json 3-widget */
OutputType?: number;
/** Json结构化输出参数列表 */
StructuredOutputParams?: ParameterConfig[];
/** widget id */
WidgetId?: string;
}
/** 应用配置MCP插件header信息 */
declare interface AgentPluginHeader {
/** 参数名称 */
ParamName?: string;
/** 参数值 */
ParamValue?: string;
/** header参数配置是否隐藏不可见 */
GlobalHidden?: boolean;
/** 输入的值 */
Input?: AgentInput;
/** 参数是否可以为空 */
IsRequired?: boolean;
}
/** Agent 的插件信息 */
declare interface AgentPluginInfo {
/** 插件id */
PluginId?: string;
/** 应用配置的插件header信息 */
Headers?: AgentPluginHeader[];
/** 插件调用LLM时使用的模型配置,一般用于指定知识库问答插件的生成模型 */
Model?: AgentModelInfo;
/** 插件信息类型; 0: 未指定类型; 1: 知识库问答插件 */
PluginInfoType?: number;
/** 知识库问答插件配置 */
KnowledgeQa?: AgentKnowledgeQAPlugin;
/** 是否使用一键授权 */
EnableRoleAuth?: boolean | null;
/** 应用配置的插件query信息 */
Query?: AgentPluginQuery[];
/** MCP类型 */
McpType?: number;
}
/** 应用配置MCP插件query信息 */
declare interface AgentPluginQuery {
/** 参数名称 */
ParamName?: string;
/** 参数值 */
ParamValue?: string;
/** query参数配置是否隐藏不可见,true-隐藏不可见,false-可见 */
GlobalHidden?: boolean;
/** 参数是否可以为空 */
IsRequired?: boolean;
/** 输入的值 */
Input?: AgentInput;
}
/** 思考事件过程信息 */
declare interface AgentProcedure {
/** 索引 */
Index?: number | null;
/** 执行过程英语名 */
Name?: string | null;
/** 中文名, 用于展示 */
Title?: string | null;
/** 状态常量: 使用中: processing, 成功: success, 失败: failed */
Status?: string | null;
/** 图标 */
Icon?: string | null;
/** Agent调试信息 */
Debugging?: AgentProcedureDebugging | null;
/** 是否切换Agent,取值为"main"或者"workflow",不切换为空 */
Switch?: string | null;
/** 工作流名称 */
WorkflowName?: string | null;
/** 当前请求执行时间, 单位 ms */
Elapsed?: number | null;
/** 工作流节点名称 */
NodeName?: string | null;
/** 用于展示思考放在哪个回复气泡中 */
ReplyIndex?: number | null;
/** 主agent */
SourceAgentName?: string | null;
/** 挂号agent */
TargetAgentName?: string | null;
/** Agent的图标 */
AgentIcon?: string | null;
}
/** Agent思考过程调试信息 */
declare interface AgentProcedureDebugging {
/** 模型思考内容 */
Content?: string | null;
/** 展示的具体文本内容 */
DisplayContent?: string | null;
/** 1:搜索引擎参考来源;2:知识库参考来源 */
DisplayType?: number | null;
/** 搜索引擎展示的索引 */
QuoteInfos?: QuoteInfo[] | null;
/** 具体的参考来源 */
References?: AgentReference[] | null;
/** 展示正在执行的状态 */
DisplayStatus?: string | null;
/** 云桌面的URL地址 */
SandboxUrl?: string | null;
/** 云桌面里面通过浏览器打开的URL地址 */
DisplayUrl?: string | null;
}
/** Agent中的参考来源 */
declare interface AgentReference {
/** 来源文档ID */
DocId?: string | null;
/** id */
Id?: string | null;
/** 名称 */
Name?: string | null;
/** 类型 */
Type?: number | null;
/** 链接 */
Url?: string | null;
/** 文档业务ID */
DocBizId?: string | null;
/** 文档名称 */
DocName?: string | null;
/** 问答业务ID */
QaBizId?: string | null;
/** 搜索引擎索引 */
Index?: number | null;
/** 标题 */
Title?: string | null;
/** 知识库名称 */
KnowledgeName?: string | null;
/** 知识库标识 */
KnowledgeBizId?: string | null;
}
/** Agent的思考过程 */
declare interface AgentThought {
/** 会话 ID */
SessionId?: string | null;
/** 请求 ID */
RequestId?: string | null;
/** 对应哪条会话, 会话 ID, 用于回答的消息存储使用, 可提前生成, 保存消息时使用 */
RecordId?: string | null;
/** 当前请求执行时间, 单位 ms */
Elapsed?: number | null;
/** 当前是否为工作流 */
IsWorkflow?: boolean | null;
/** 如果当前是工作流,工作流名称 */
WorkflowName?: string | null;
/** 具体思考过程详情 */
Procedures?: AgentProcedure[] | null;
/** TraceId */
TraceId?: string | null;
/** 文件信息 */
Files?: FileInfo[] | null;
}
/** Agent的工具信息 */
declare interface AgentToolInfo {
/** 插件id */
PluginId?: string;
/** 插件名称 */
PluginName?: string;
/** 插件图标url */
IconUrl?: string;
/** 0 自定义插件1 官方插件2 第三方插件 目前用于第三方实现的mcp server */
PluginType?: number;
/** 工具id */
ToolId?: string;
/** 工具名称 */
ToolName?: string;
/** 工具描述 */
ToolDesc?: string;
/** 输入参数 */
Inputs?: AgentToolReqParam[];
/** 输出参数 */
Outputs?: AgentToolRspParam[];
/** 创建方式,0:服务创建,1:代码创建,2:MCP创建 */
CreateType?: number;
/** MCP插件的配置信息 */
McpServer?: AgentMCPServerInfo;
/** 该工具是否和知识库绑定 */
IsBindingKnowledge?: boolean;
/** 插件状态,1:可用,2:不可用 */
Status?: number;
/** header信息 */
Headers?: AgentPluginHeader[];
/** NON_STREAMING: 非流式 STREAMIN: 流式 */
CallingMethod?: string | null;
/** query信息 */
Query?: AgentPluginQuery[];
/** 工具计费状态 0-不计费 1-可用 2-不可用(欠费、无资源等) */
FinanceStatus?: number;
/** 工具来源: 0-来自插件,1-来自工作流 */
ToolSource?: number;
/** 计费状态;0-不计费,1-限时免费,2-官方收费 */
FinanceType?: number;
/** 工具高级设置 */
ToolAdvanceConfig?: ToolAdvanceConfig;
}
/** Agent工具的请求参数定义 */
declare interface AgentToolReqParam {
/** 参数名称 */
Name?: string;
/** 参数描述 */
Desc?: string;
/** 参数类型,0:string, 1:int, 2:float,3:bool 4:object 5:array_string, 6:array_int, 7:array_float, 8:array_bool, 9:array_object */
Type?: number;
/** 参数是否必填 */
IsRequired?: boolean;
/** 参数默认值 */
DefaultValue?: string;
/** 子参数,ParamType 是OBJECT 或 ARRAY<>类型有用 */
SubParams?: AgentToolReqParam[];
/** 是否隐藏不可见 */
GlobalHidden?: boolean;
/** agent模式下模型是否可见 */
AgentHidden?: boolean;
/** 其中任意 */
AnyOf?: AgentToolReqParam[];
/** 其中一个 */
OneOf?: AgentToolReqParam[];
/** 输入 */
Input?: AgentInput;
}
/** Agent工具的响应参数定义 */
declare interface AgentToolRspParam {
/** 参数名称 */
Name?: string;
/** 参数描述 */
Desc?: string;
/** 参数类型,0:string, 1:int, 2:float,3:bool 4:object 5:array_string, 6:array_int, 7:array_float, 8:array_bool, 9:array_object */
Type?: number;
/** 子参数,ParamType 是OBJECT 或 ARRAY<>类型有用 */
SubParams?: AgentToolRspParam[];
/** agent模式下模型是否可见 */
AgentHidden?: boolean;
/** 是否隐藏不可见 */
GlobalHidden?: boolean;
/** COVER: 覆盖解析 INCREMENT:增量解析 */
AnalysisMethod?: string;
}
/** 自定义变量和标签关系数据 */
declare interface ApiVarAttrInfo {
/** 自定义变量id */
ApiVarId?: string | null;
/** 标签id */
AttrBizId?: string | null;
}
/** 应用基础信息 */
declare interface AppBaseInfo {
/** 应用ID */
AppBizId?: string;
/** 应用名称 */
AppName?: string | null;
}
/** 应用配置 */
declare interface AppConfig {
/** 知识问答管理应用配置 */
KnowledgeQa?: KnowledgeQaConfig | null;
/** 知识摘要应用配置 */
Summary?: SummaryConfig | null;
/** 标签提取应用配置 */
Classify?: ClassifyConfig | null;
}
/** 应用详情 */
declare interface AppInfo {
/** 应用类型;knowledge_qa-知识问答管理;summary-知识摘要;classifys-知识标签提取 */
AppType?: string | null;
/** 应用类型描述 */
AppTypeDesc?: string | null;
/** 应用ID */
AppBizId?: string | null;
/** 应用名称 */
Name?: string | null;
/** 应用头像 */
Avatar?: string | null;
/** 应用描述 */
Desc?: string | null;
/** 应用状态,1:未上线,2:运行中,3:停用 */
AppStatus?: number | null;
/** 状态说明 */
AppStatusDesc?: string | null;
/** 修改时间 */
UpdateTime?: string | null;
/** 最后修改人 */
Operator?: string | null;
/** 模型名称 */
ModelName?: string | null;
/** 生成模型别名 */
ModelAliasName?: string | null;
/** 应用模式 standard:标准模式, agent: agent模式,single_workflow:单工作流模式 */
Pattern?: string | null;
/** 思考模型别名 */
ThoughtModelAliasName?: string | null;
/** 权限位信息 */
PermissionIds?: string[];
/** 创建人昵称 */
Creator?: string | null;
}
/** 应用模型配置 */
declare interface AppModel {
/** 模型名称 */
Name?: string | null;
/** 模型描述 */
Desc?: string | null;
/** 上下文指代轮次 */
ContextLimit?: number | null;
/** 模型别名 */
AliasName?: string | null;
/** token余量 */
TokenBalance?: number | null;
/** 是否使用上下文指代轮次 */
IsUseContext?: boolean | null;
/** 上下文记忆轮数 */
HistoryLimit?: number | null;
/** 使用类型 */
UsageType?: string | null;
/** 模型温度 */
Temperature?: string | null;
/** 模型TopP */
TopP?: string | null;
/** 模型资源状态 1:资源可用;2:资源已用尽 */
ResourceStatus?: number | null;
/** 模型参数 */
ModelParams?: ModelParams | null;
}
/** 模型详情 */
declare interface AppModelDetailInfo {
/** 模型名称 */
ModelName?: string;
/** 模型参数 */
ModelParams?: ModelParams;
/** 限制 */
HistoryLimit?: number;
/** 模型别名 */
AliasName?: string;
}
/** 标签详情信息 */
declare interface AttrLabel {
/** 标签来源 */
Source?: number | null;
/** 标签ID */
AttrBizId?: string | null;
/** 标签标识 */
AttrKey?: string | null;
/** 标签名称 */
AttrName?: string | null;
/** 标签值 */
Labels?: Label[] | null;
}
/** 标签详情 */
declare interface AttrLabelDetail {
/** 标签ID */
AttrBizId?: string | null;
/** 标签标识 */
AttrKey?: string | null;
/** 标签名称 */
AttrName?: string | null;
/** 标签值名称 */
LabelNames?: string[] | null;
/** 标签是否在更新中 */
IsUpdating?: boolean | null;
/** 发布状态(1 待发布 2 发布中 3 已发布 4 发布失败) */
Status?: number | null;
/** 状态描述 */
StatusDesc?: string | null;
/** 标签值总数 */
LabelTotalCount?: string;
}
/** 标签引用信息 */
declare interface AttrLabelRefer {
/** 标签来源,1:标签 */
Source?: number;
/** 标签ID */
AttributeBizId?: string;
/** 标签值ID */
LabelBizIds?: string[];
}
/** 导出知识标签过滤器 */
declare interface AttributeFilters {
/** 检索,属性或标签名称 */
Query?: string;
}
/** 标签值 */
declare interface AttributeLabel {
/** 标准词ID */
LabelBizId?: string | null;
/** 标准词名称 */
LabelName?: string | null;
/** 同义词名称 */
SimilarLabels?: string[] | null;
}
/** 标签值引用的工作流详情 */
declare interface AttributeLabelRefByWorkflow {
/** 标签值id */
AttributeLabelBizId?: string;
/** 标签值引用的工作流列表 */
WorkflowList?: WorkflowRef[];
}
/** 背景图相关配置 */
declare interface BackgroundImageConfig {
/** 横图(pc) */
LandscapeImageUrl?: string;
/** 原始图 */
OriginalImageUrl?: string;
/** 长图(手机) */
PortraitImageUrl?: string;
/** 主题色 */
ThemeColor?: string;
/** 亮度值 */
Brightness?: number;
}
/** 应用基础配置 */
declare interface BaseConfig {
/** 应用名称 */
Name: string;
/** 应用头像url,在CreateApp和ModifyApp中作为入参必填。作为入参传入说明:1. 传入的url图片限制为jpeg和png,大小限制为500KB,url链接需允许head请求。2. 如果用户没有对象存储,可使用“获取文件上传临时密钥”(DescribeStorageCredential)接口,获取cos临时密钥和上传路径,自行上传头像至cos中并获取访问链接。 */
Avatar: string;
/** 应用描述 */
Desc?: string;
}
/** 调用类型 */
declare interface CallDetail {
/** 关联ID */
Id?: string | null;
/** 调用时间 */
CallTime?: string | null;
/** 总token消耗 */
TotalTokenUsage?: number | null;
/** 输入token消耗 */
InputTokenUsage?: number | null;
/** 输出token消耗 */
OutputTokenUsage?: number | null;
/** 搜索服务调用次数 */
SearchUsage?: number | null;
/** 模型名称 */
ModelName?: string | null;
/** 调用类型 */
CallType?: string | null;
/** 账号 */
UinAccount?: string | null;
/** 应用名称 */
AppName?: string | null;
/** 总消耗页数 */
PageUsage?: number | null;
/** 筛选子场景 */
SubScene?: string | null;
/** 账单明细对应的自定义tag */
BillingTag?: string;
}
/** 分类信息 */
declare interface CateInfo {
/** 分类ID */
CateBizId?: string | null;
/** 分类名称 */
Name?: string | null;
/** 分类下的Record(如文档、同义词等)数量 */
Total?: number | null;
/** 是否可新增 */
CanAdd?: boolean | null;
/** 是否可编辑 */
CanEdit?: boolean | null;
/** 是否可删除 */
CanDelete?: boolean | null;
/** 子分类 */
Children?: CateInfo[] | null;
/** 是否为叶子节点 */
IsLeaf?: boolean | null;
}
/** 渠道详情信息 */
declare interface ChannelListInfo {
/** 渠道类型 10000 微信订阅号 10001 微信服务号 10002 企微应用 */
ChannelType?: number;
/** 渠道状态 1未发布 2运行中 3已下线 */
ChannelStatus?: number;
/** 渠道名称 */
ChannelName?: string;
/** 渠道id 数据库主键 */
ChannelId?: string;
/** 备注 */
Comment?: string;
/** 更新时间 */
UpdateTime?: string;
/** 创建时间 */
CreateTime?: string;
/** 最后更新人 */
UpdatedUser?: string;
/** 智能体应用可见范围,public-所有人可见 private-仅自己可见 share-通过分享可见 */
YuanQiInfo?: YuanQi | null;
}
/** 澄清询问配置 */
declare interface ClarificationConfig {
/** 输出类型,1-文本 3-widget */
OutputType?: number;
/** 澄清widget配置 */
WidgetConfigs?: ClarificationWidgetConfig[];
}
/** 澄清widget配置 */
declare interface ClarificationWidgetConfig {
/** widget id */
WidgetId?: string;
/** 澄清widget类型 */
ClarificationWidgetType?: number;
/** Widget名称 */
WidgetName?: string;
/** Widget预览 */
WidgetPreview?: string;
/** 是否启用该Widget作为澄清样式 */
Enabled?: boolean;
}
/** 标签提取配置 */
declare interface ClassifyConfig {
/** 模型配置 */
Model?: AppModel | null;
/** 标签列表 */
Labels?: ClassifyLabel[] | null;
/** 欢迎语,200字符以内 */
Greeting?: string | null;
}
/** 标签信息 */
declare interface ClassifyLabel {
/** 标签名称 */
Name?: string | null;
/** 标签描述 */
Description?: string | null;
/** 标签取值范围 */
Values?: string[] | null;
}
/** 对话记录内容详情 */
declare interface Content {
/** 消息内容类型text:文本image:图片file:文件option_cards:选项卡custom_params:用户自定义业务参数sandbox:云桌面custom_variables:自定义输入参数web_search: 网页搜索内容file_collection:文件收集信息widget:widget信息widget_action:用户端widget动作信息 */
Type?: string;
/** 文本内容 */
Text?: string | null;
/** 引用信息 */
QuoteInfos?: QuoteInfo[] | null;
/** 参考文献信息 */
References?: ContentReference[] | null;
/** 图片信息 */
Image?: ImageInfoContent | null;
/** 文件信息 */
File?: FileInfoContent | null;
/** 选项卡信息 */
OptionCards?: string[] | null;
/** 用户自定义业务参数信息 */
CustomParams?: string[] | null;
/** 自定义变量 */
CustomVariables?: string[] | null;
/** 沙盒信息 */
Sandbox?: SandboxContent | null;
/** 网页搜索内容 */
WebSearch?: WebSearchContent | null;
/** 文件收集信息 */
FileCollection?: FileCollection | null;
/** Widget信息 */
Widget?: Widget | null;
/** Widget动作信息 */
WidgetAction?: WidgetAction | null;
}
/** 会话内容参考文献信息 */
declare interface ContentReference {
/** 引用来源索引ID */
Index?: number | null;
/** 参考来源名称 */
Name?: string;
/** 参考来源类型1:问答2:文档片段4:联网检索到的内容 */
Type?: number;
/** 文档片段参考信息 */
DocRefer?: DocReference | null;
/** 问答参考信息 */
QaRefer?: QaReference | null;
/** 联网检索内容参考信息 */
WebSearchRefer?: WebSearchReference | null;
}
/** 获取不满意回复上下文响 */
declare interface Context {
/** 消息记录ID信息 */
RecordBizId?: string | null;
/** 是否为用户 */
IsVisitor?: boolean | null;
/** 昵称 */
NickName?: string | null;
/** 头像 */
Avatar?: string | null;
/** 消息内容 */
Content?: string | null;
/** 文档信息 */
FileInfos?: MsgFileInfo[] | null;
/** 回复方式,15:澄清确认回复 */
ReplyMethod?: number | null;
}
/** 临时密钥结构 */
declare interface Credentials {
/** token */
Token?: string | null;
/** 临时证书密钥ID */
TmpSecretId?: string | null;
/** 临时证书密钥Key */
TmpSecretKey?: string | null;
/** 临时证书appid */
AppId?: number | null;
}
/** 工作流的API参数 */
declare interface CustomVariable {
/** 参数名称 */
Name?: string;
/** 参数的值 */
Value?: string;
}
/** 数智人配置 */
declare interface DigitalHumanConfig {
/** 数智人资产key */
AssetKey?: string;
/** 数智人名称 */
Name?: string;
/** 图像 */
Avatar?: string;
/** 预览图 */
PreviewUrl?: string;
}
/** 文档列表筛选标识位 */
declare interface DocFilterFlag {
/** 标识位 */
Flag?: string;
/** 标识值 */
Value?: boolean;
}
/** 文档类参考来源信息 */
declare interface DocReference {
/** 文档业务ID */
DocBizId?: number;
/** 文档片段参考ID */
ReferBizId?: number | null;
/** 文档名称 */
DocName?: string | null;
/** 文档所在知识库业务ID */
KnowledgeBizId?: number | null;
/** 文档所在知识库名称 */
KnowledgeName?: string | null;
/** 文档访问地址 */
Url?: string | null;
}
/** 文档片段 */
declare interface DocSegment {
/** 片段ID */
Id?: string | null;
/** 业务ID */
BusinessId?: string | null;
/** 文件类型(markdown,word,txt) */
FileType?: string | null;
/** 文档切片类型(segment-文档切片 table-表格) */
SegmentType?: string | null;
/** 标题 */
Title?: string | null;
/** 段落内容 */
PageContent?: string | null;
/** 段落原文 */
OrgData?: string | null;
/** 文章ID */
DocId?: string | null;
/** 文档业务ID */
DocBizId?: string | null;
/** 文档链接 */
DocUrl?: string | null;
/** 文档的自定义链接 */
WebUrl?: string;
/** 页码信息 */
PageInfos?: number[];
}
/** 重复文档处理方式 */
declare interface DuplicateFileHandle {
/** 重复文档判断方式,1:按文档内容,即cos_hash字段判断是否重复 */
CheckType?: number;
/** 重复文档处理方式,1:返回报错,2:跳过,返回重复的文档业务ID */
HandleType?: number;
}
/** 扩展信息 */
declare interface ExtraInfo {
/** ECharts信息 */
EChartsInfo?: string[] | null;
}
/** 文件收集信息 */
declare interface FileCollection {
/** 最大上传文件的数量 */
MaxFileCount: number;
/** 支持的上传文件类型 */
SupportedFileTypes: string[] | null;
}
/** 实时上传的文件信息 */
declare interface FileInfo {
/** 文件名称 */
FileName?: string | null;
/** 文件大小 */
FileSize?: string | null;
/** 文件的URL地址,COS地址 */
FileUrl?: string | null;
/** 文件类型 */
FileType?: string | null;
/** 解析后返回的DocID */
DocId?: string | null;
/** 创建时间 */
CreatedAt?: string | null;
}
/** 文件信息内容 */
declare interface FileInfoContent {
/** 实时文档解析接口返回的 DocBizId */
DocBizId?: number;
/** 文件名称 */
FileName?: string | null;
/** 文件类型 */
FileType?: string | null;
/** 文件大小 */
FileSize?: number | null;
/** 文件 URL */
FileUrl?: string | null;
}
/** 不满意回复检索过滤 */
declare interface Filters {
/** 检索,用户问题或答案 */
Query?: string;
/** 错误类型检索 */
Reasons?: string[];
/** 处理状态 0-待处理 1-已拒答 2-已忽略 3-已添加为新问答 4-已添加为相似问 */
HandlingStatuses?: number[];
}
/** 获取ws token label */
declare interface GetWsTokenReq_Label {
/** 标签名 */
Name?: string;
/** 标签值 */
Values?: string[];
}
/** 分片高亮内容 */
declare interface Highlight {
/** 高亮起始位置 */
StartPos?: string | null;
/** 高亮结束位置 */
EndPos?: string | null;
/** 高亮子文本 */
Text?: string | null;
}
/** 多轮历史信息 */
declare interface HistorySummary {
/** 助手 */
Assistant?: string | null;
/** 用户 */
User?: string | null;
}
/** 图片信息 */
declare interface ImageInfoContent {
/** 图片文件链接 */
Url?: string;
}
/** 输入框配置 */
declare interface InputBoxConfig {
/** 输入框按钮,1:上传图片、2:上传文档,3:腾讯文档,4:联网搜索 */
InputBoxButtons?: number[];
}
/** 意图达成方式 */
declare interface IntentAchievement {
/** 意图达成方式,qa:问答回复、doc:文档回复、workflow:工作流回复,llm:大模型回复 */
Name?: string;
/** 意图达成方式描述 */
Desc?: string;
}
/** 请求的API信息 */
declare interface InvokeAPI {
/** 请求方法,如GET/POST等 */
Method?: string | null;
/** 请求地址 */
Url?: string | null;
/** header参数 */
HeaderValues?: StrValue[] | null;
/** 入参Query */
QueryValues?: StrValue[] | null;
/** Post请求的原始数据 */
RequestPostBody?: string | null;
/** 返回的原始数据 */
ResponseBody?: string | null;
/** 出参 */
ResponseValues?: ValueInfo[] | null;
/** 异常信息 */
FailMessage?: string | null;
}
/** 知识库高级设置 */
declare interface KnowledgeAdvancedConfig {
/** 重排序模型 */
RerankModel?: string | null;
/** 召回数量 */
RerankRecallNum?: number | null;
}
/** 共享知识库基础信息 */
declare interface KnowledgeBaseInfo {
/** 共享知识库业务ID */
KnowledgeBizId?: string;
/** 共享知识库名称 */
KnowledgeName?: string;
/** 共享知识库描述 */
KnowledgeDescription?: string | null;
/** Embedding模型 */
EmbeddingModel?: string | null;
/** 问答提取模型 */
QaExtractModel?: string | null;
/** 更新时间 */
UpdateTime?: string | null;
/** 共享知识库类型,0普通,1公众号 */
KnowledgeType?: number;
/** 拥有者id */
OwnerStaffId?: string;
/** 知识库文档数量,当前仅支持公众号知识库 */
DocTotal?: number | null;
/** 知识库处理中状态标记,1:向量embedding变更中 */
ProcessingFlags?: number[] | null;
/** 知识库拥有者的名字 */
OwnerStaffName?: string;
}
/** 知识库容量饼图详情 */
declare interface KnowledgeCapacityPieGraphDetail {
/** 当前应用名称 */
AppName?: string | null;
/** 当前应用使用的字符数 */
UsedCharSize?: string | null;
/** 当前应用对于总用量的占比 */
Proportion?: number | null;
/** 知识库类型:0默认1共享 */
KnowledgeType?: number;
}
/** 应用使用知识库容量详情 */
declare interface KnowledgeDetail {
/** 应用名称 */
AppName?: string | null;
/** 已用字符数 */
UsedCharSize?: string | null;
/** 使用占比 */
Proportion?: number | null;
/** 超量字符数 */
ExceedCharSize?: string | null;
/** 废弃 */
IsSharedKnowledge?: boolean | null;
/** 知识库类型:0默认1共享 */
KnowledgeType?: number;
}
/** 知识库详情信息 */
declare interface KnowledgeDetailInfo {
/** 知识库信息 */
Knowledge?: KnowledgeBaseInfo | null;
/** 应用列表 */
AppList?: AppBaseInfo[] | null;
/** 用户信息 */
User?: UserBaseInfo | null;
/** 权限位信息 */
PermissionIds?: string[];
}
/** 知识库模型设置 */
declare interface KnowledgeModelConfig {
/** 向量模型,该字段只有共享知识库有,应用知识库没有 */
EmbeddingModel?: string | null;
/** 问答对生成模型 */
QaExtractModel?: string | null;
/** schema生成模型 */
SchemaModel?: string | null;
}
/** 应用配置关联的agent信息 */
declare interface KnowledgeQaAgent {
/** 协同方式,1:自由转交,2:工作流编排,3:Plan-and-Execute */
AgentCollaboration?: number | null;
/** 应用配置agent关联的工作流 */
Workflow?: KnowledgeQaWorkflowInfo | null;
}
/** 知识问答配置 */
declare interface KnowledgeQaConfig {
/** 欢迎语,200字符以内 */
Greeting?: string | null;
/** 角色描述,4000字符以内。通过填写描述,设定应用的 #角色名称、 #风格特点 及可达成的#意图。建议按照下面的模板填写,且自定义意图建议不超过5个。#角色名称:#风格特点:#输出要求:#能力限制:能够达成以下用户意图##意图名称:##意图描述:##意图示例:##意图实现: */
RoleDescription?: string | null;
/** 生成模型配置 */
Model?: AppModel | null;
/** 知识搜索配置 */
Search?: KnowledgeQaSearch[] | null;
/** 知识管理输出配置 */
Output?: KnowledgeQaOutput | null;
/** 工作流程配置 */
Workflow?: KnowledgeWorkflow | null;
/** 检索范围 */
SearchRange?: SearchRange | null;
/** 应用模式,standard:标准模式, agent: agent模式,single_workflow:单工作流模式 */
Pattern?: string | null;
/** 检索策略 */
SearchStrategy?: SearchStrategy | null;
/** 单工作流ID,Pattern为single_workflow时传入 */
SingleWorkflow?: KnowledgeQaSingleWorkflow | null;
/** 应用关联插件 */
Plugins?: KnowledgeQaPlugin[] | null;
/** 思考模型配置 */
ThoughtModel?: AppModel | null;
/** 意图达成方式优先级 */
IntentAchievements?: IntentAchievement[] | null;
/** 是否开启图文检索 */
ImageTextRetrieval?: boolean | null;
/** 配置语音通话参数 */
AiCall?: AICallConfig | null;
/** 共享知识库关联配置 */
ShareKnowledgeBases?: ShareKnowledgeBase[] | null;
/** 背景图相关信息 */
BackgroundImage?: BackgroundImageConfig | null;
/** 开场问题 */
OpeningQuestions?: string[] | null;
/** 长期记忆开关 */
LongMemoryOpen?: boolean;
/** 长期记忆时效 */
LongMemoryDay?: number;
/** agent配置信息 */
Agent?: KnowledgeQaAgent | null;
/** 知识库模型 */
KnowledgeModelConfig?: KnowledgeModelConfig | null;
/** 知识库高级设置 */
KnowledgeAdvancedConfig?: KnowledgeAdvancedConfig | null;
}
/** 应用管理输出配置 */
declare interface KnowledgeQaOutput {
/** 输出方式 1:流式 2:非流式 */
Method?: number | null;
/** 通用模型回复 */
UseGeneralKnowledge?: boolean | null;
/** 未知回复语,300字符以内 */
BareAnswer?: string | null;
/** 是否展示问题澄清开关 */
ShowQuestionClarify?: boolean | null;
/** 是否打开问题澄清 */
UseQuestionClarify?: boolean | null;
/** 问题澄清关键词列表 */
QuestionClarifyKeywords?: string[] | null;
/** 是否打开推荐问题开关 */
UseRecommended?: boolean | null;
/** 推荐问模式,0.结合知识库&对话历史推荐问题Prompt(默认) 1.仅结合知识库输出推荐问的prompt */
RecommendedPromptMode?: number | null;
/** 输入框按钮配置 */
InputBoxConfig?: InputBoxConfig;
}
/** 应用关联插件信息 */
declare interface KnowledgeQaPlugin {
/** 插件ID */
PluginId?: string | null;
/** 插件名称 */
PluginName?: string;
/** 插件图标 */
PluginIcon?: string;
/** 工具ID */
ToolId?: string;
/** 工具名称 */
ToolName?: string;
/** 工具描述 */
ToolDesc?: string;
/** 工具输入参数 */
Inputs?: PluginToolReqParam[];
/** 插件是否和知识库绑定 */
IsBindingKnowledge?: boolean;
}
/** 检索配置 */
declare interface KnowledgeQaSearch {
/** 知识来源 doc:文档,qa:问答 taskflow:业务流程,search:搜索增强,database:数据库 */
Type?: string | null;
/** 问答-回复灵活度 1:已采纳答案直接回复 2:已采纳润色后回复 */
ReplyFlexibility?: number | null;
/** 搜索增强-搜索引擎状态 */
UseSearchEngine?: boolean | null;
/** 是否显示搜索引擎检索状态 */
ShowSearchEngine?: boolean | null;
/** 知识来源,是否选择 */
IsEnabled?: boolean | null;
/** 问答最大召回数量, 默认2,限制5 */
QaTopN?: number | null;
/** 文档最大召回数量, 默认3,限制5 */
DocTopN?: number | null;
/** 检索置信度,针对文档和问答有效,最小0.01,最大0.99 */
Confidence?: number | null;
/** 资源状态 1:资源可用;2:资源已用尽 */
ResourceStatus?: number | null;
}
/** 问答知识库单工作流模式下指定单工作流配置 */
declare interface KnowledgeQaSingleWorkflow {
/** 工作流ID */
WorkflowId?: string;
/** 工作流名称 */
WorkflowName?: string;
/** 工作流描述 */
WorkflowDesc?: string;
/** 工作流状态,发布状态(UNPUBLISHED: 待发布 PUBLISHING: 发布中 PUBLISHED: 已发布 FAIL:发布失败) */
Status?: string;
/** 工作流是否启用 */
IsEnable?: boolean;
/** 是否开启异步调用工作流 */
AsyncWorkflow?: boolean;
}
/** 应用配置关联的工作流信息 */
declare interface KnowledgeQaWorkflowInfo {
/** 工作流ID */
WorkflowId?: string;
/** 工作流名称 */
WorkflowName?: string;
/** 工作流描述 */
WorkflowDesc?: string;
/** 工作流状态,发布状态(UNPUBLISHED: 待发布 PUBLISHING: 发布中 PUBLISHED: 已发布 FAIL:发布失败) */
Status?: string;
/** 工作流是否启用 */
IsEnable?: boolean;
}
/** 检索知识 */
declare interface KnowledgeSummary {
/** 1是问答 2是文档片段 */
Type?: number | null;
/** 知识内容 */
Content?: string | null;
}
/** 共享知识库更新信息 */
declare interface KnowledgeUpdateInfo {
/** 共享知识库名称 */
KnowledgeName?: string;
/** 共享知识库描述 */
KnowledgeDescription?: string | null;
/** Embedding模型 */
EmbeddingModel?: string | null;
/** 问答提取模型 */
QaExtractModel?: string | null;
/** 拥有者id */
OwnerStaffId?: string;
}
/** 问答知识库工作流配置 */
declare interface KnowledgeWorkflow {
/** 是否启用工作流 */
IsEnabled?: boolean | null;
/** 是否启用PDL */
UsePdl?: boolean | null;
}
/** 标签ID */
declare interface Label {
/** 标签ID */
LabelBizId?: string | null;
/** 标签名称 */
LabelName?: string | null;
}
/** 文档列表详情描述 */
declare interface ListDocItem {
/** 文档ID */
DocBizId?: string | null;
/** 文件名称 */
FileName?: string | null;
/** 重命名的新文档名称,在重命名提交之后,文档发布之前都是这个名称 */
NewName?: string;
/** 文件类型 */
FileType?: string | null;
/** cos路径 */
CosUrl?: string | null;
/** 更新时间 */
UpdateTime?: string | null;
/** 文档状态 */
Status?: number | null;
/** 文档状态描述 */
StatusDesc?: string | null;
/** 原因 */
Reason?: string | null;
/** 答案中是否引用 */
IsRefer?: boolean | null;
/** 问答对数量 */
QaNum?: number | null;
/** 是否已删除 */
IsDeleted?: boolean | null;
/** 文档来源 */
Source?: number | null;
/** 文档来源描述 */
SourceDesc?: string | null;
/** 是否允许重新生成 */
IsAllowRestart?: boolean | null;
/** qa是否已删除 */
IsDeletedQa?: boolean | null;
/** 问答是否生成中 */
IsCreatingQa?: boolean | null;
/** 是否允许删除 */
IsAllowDelete?: boolean | null;
/** 是否允许操作引用开关 */
IsAllowRefer?: boolean | null;
/** 问答是否生成过 */
IsCreatedQa?: boolean | null;
/** 文档字符量 */
DocCharSize?: string | null;
/** 属性标签适用范围 */
AttrRange?: number | null;
/** 属性标签 */
AttrLabels?: AttrLabel[] | null;
/** 是否允许编辑 */
IsAllowEdit?: boolean | null;
/** 外部引用链接类型 0:系统链接 1:自定义链接值为1时,WebUrl 字段不能为空,否则不生效。 */
ReferUrlType?: number | null;
/** 网页(或自定义链接)地址 */
WebUrl?: string | null;
/** 有效开始时间,unix时间戳 */
ExpireStart?: string | null;
/** 有效结束时间,unix时间戳,0代表永久有效 */
ExpireEnd?: string | null;
/** 是否允许重试,0:否,1:是 */
IsAllowRetry?: boolean | null;
/** 0:文档比对处理 1:文档生成问答 */
Processing?: number[] | null;
/** 文档创建落库时间 */
CreateTime?: string | null;
/** 文档所属分类ID */
CateBizId?: string;
/** 文档的用户自定义ID */
CustomerKnowledgeId?: string;
/** 文档的属性标记,0: 不做用户外部权限校验 */
AttributeFlags?: number[];
/** false:未停用,ture:已停用 */
IsDisabled?: boolean;
/** 员工名称 */
StaffName?: string;
/** 文档生效域: 1-停用;2-仅开发域;3-仅发布域;4-全域 */
EnableScope?: number | null;
}
/** 问答详情数据 */
declare interface ListQaItem {
/** 问答ID */
QaBizId?: string;
/** 问题 */
Question?: string;
/** 答案 */
Answer?: string;
/** 来源 */
Source?: number;
/** 来源描述 */
SourceDesc?: string;
/** 更新时间 */
UpdateTime?: string;
/** 状态 */
Status?: number;
/** 状态描述 */
StatusDesc?: string;
/** 文档ID */
DocBizId?: string;
/** 创建时间 */
CreateTime?: string;
/** 是否允许编辑 */
IsAllowEdit?: boolean;
/** 是否允许删除 */
IsAllowDelete?: boolean;
/** 是否允许校验 */
IsAllowAccept?: boolean;
/** 文档名称 */
FileName?: string;
/** 文档类型 */
FileType?: string;
/** 问答字符数 */
QaCharSize?: string;
/** 有效开始时间,unix时间戳 */
ExpireStart?: string;
/** 有效结束时间,unix时间戳,0代表永久有效 */
ExpireEnd?: string;
/** 属性标签适用范围 1:全部,2:按条件 */
AttrRange?: number;
/** 属性标签 */
AttrLabels?: AttrLabel[];
/** 相似问个数 */
SimilarQuestionNum?: number;
/** 返回问答关联的相似问,联动搜索,仅展示一条 */
SimilarQuestionTips?: string;
/** 问答是否停用,false:未停用,ture:已停用 */
IsDisabled?: boolean;
/** 员工名称 */
StaffName?: string;
/** 问答生效域: 1-停用;2-仅开发域;3-仅发布域;4-全域 */
EnableScope?: number | null;
/** 问答关联的文档生效域 */
DocEnableScope?: number;
}
/** 发布列表详情 */
declare interface ListReleaseItem {
/** 版本ID */
ReleaseBizId?: string;
/** 发布人 */
Operator?: string;
/** 发布描述 */
Desc?: string;
/** 更新时间 */
UpdateTime?: string;
/** 发布状态,1:待发布,2:发布中,3:发布成功,5:发布失败 */
Status?: number;
/** 发布状态描述 */
StatusDesc?: string;
/** 失败原因 */
Reason?: string;
/** 发布成功数 */
SuccessCount?: number;
/** 发布失败数 */
FailCount?: number;
/** 版本号,格式是 v{date}{time} */
ReleaseVersion?: string;
/** 是否可还原 */
CanRollback?: boolean;
}
/** 模型信息 */
declare interface ModelInfo {
/** 模型名称 */
ModelName?: string | null;
/** 模型描述 */
ModelDesc?: string | null;
/** 模型名称 */
AliasName?: string | null;
/** 资源状态 1:资源可用;2:资源已用尽 */
ResourceStatus?: number | null;
/** 提示词内容字符限制 */
PromptWordsLimit?: string | null;
/** 通过核心采样控制内容生成的多样性,较高的Top P值会导致生成更多样的内容 */
TopP?: ModelParameter | null;
/** 温度控制随机性 */
Temperature?: ModelParameter | null;
/** 最多能生成的token数量 */
MaxTokens?: ModelParameter | null;
/** 模型来源 Hunyuan:腾讯混元大模型,Industry:腾讯云行业大模型,Experience:新模型体验,Custom自定义模型 */
Source?: string;
/** 模型图标 */
Icon?: string;
/** 是否免费 */
IsFree?: boolean;
/** 模型对话框可输入的上限 */
InputLenLimit?: number | null;
/** 支持工作流的类型 0:模型不支持; 1: 模型支持工作流; 2: 模型支持效果不佳; */
SupportWorkflowStatus?: number | null;
/** 模型类别 generate:生成模型,thought:思考模型 */
ModelCategory?: string;
/** 是否默认模型 */
IsDefault?: boolean;
/** 角色提示词输入长度限制 */
RoleLenLimit?: number;
/** 是否专属并发模型 */
IsExclusive?: boolean;
/** 模型支持智能通话效果 */
SupportAiCallStatus?: number;
/** 专属并发数 */
Concurrency?: number;
/** 模型标签 */
ModelTags?: string[] | null;
/** 模型超参定义 */
ModelParams?: ModelParameter[] | null;
/** 提供商名称 */
ProviderName?: string;
/** 提供商别名 */
ProviderAliasName?: string;
/** 提供商类型 Self:提供商,Custom:自定义模型提供商,Third:第三方模型提供商 */
ProviderType?: string;
/** 是否关闭模型超参 */
IsCloseModelParams?: boolean;
/** 是否支持深度思考 */
IsDeepThinking?: boolean;
}
/** 模型参数范围 */
declare interface ModelParameter {
/** 超参名称 */
Name?: string | null;
/** 类型 */
Type?: string;
/** 默认值 */
DefaultValue?: string;
/** 枚举值 */
EnumValues?: string[];
/** 默认值 */
Default?: number | null;
/** 最小值 */
Min?: number | null;
/** 最大值 */
Max?: number | null;
}
/** 模型参数 */
declare interface ModelParams {
/** 温度 */
Temperature?: number;
/** Top_P */
TopP?: number;
/** 随机种子 */
Seed?: number;
/** 存在惩罚 */
PresencePenalty?: number;
/** 频率惩罚 */
FrequencyPenalty?: number;
/** 重复惩罚 */
RepetitionPenalty?: number;
/** 最大输出长度 */
MaxTokens?: number;
/** 停止序列 */
StopSequences?: string[];
/** 输出格式 */
ReplyFormat?: string;
/** 深度思考值disabledenabled */
DeepThinking?: string | null;
/** 效果 disabled low medium high */
ReasoningEffort?: string | null;
}
/** 文档信息 */
declare interface MsgFileInfo {
/** 文档名称 */
FileName?: string | null;
/** 文档大小 */
FileSize?: string | null;
/** 文档URL */
FileUrl?: string | null;
/** 文档类型 */
FileType?: string | null;
/** 文档ID */
DocId?: string | null;
}
/** 消息详情 */
declare interface MsgRecord {
/** 内容 */
Content?: string;
/** 当前记录所对应的 Session ID */
SessionId?: string | null;
/** 记录ID */
RecordId?: string;
/** 关联记录ID */
RelatedRecordId?: string;
/** 是否来自自己 */
IsFromSelf?: boolean;
/** 发送者名称 */
FromName?: string;
/** 发送者头像 */
FromAvatar?: string;
/** 时间戳 */
Timestamp?: string;
/** 是否已读 */
HasRead?: boolean;
/** 评价 */
Score?: number;
/** 是否评分 */
CanRating?: boolean;
/** 是否展示反馈按钮 */
CanFeedback?: boolean | null;
/** 记录类型 */
Type?: number;
/** 引用来源 */
References?: MsgRecordReference[];
/** 评价原因 */
Reasons?: string[];
/** 是否大模型 */
IsLlmGenerated?: boolean;
/** 图片链接,可公有读 */
ImageUrls?: string[] | null;
/** 当次 token 统计信息 */
TokenStat?: TokenStat | null;
/** 回复方式1:大模型直接回复;2:保守回复, 未知问题回复;3:拒答问题回复;4:敏感回复;5:问答对直接回复, 已采纳问答对优先回复;6:欢迎语回复;7:并发超限回复;8:全局干预知识;9:任务流程过程回复, 当历史记录中 task_flow.type = 0 时, 为大模型回复;10:任务流程答案回复;11:搜索引擎回复;12:知识润色后回复;13:图片理解回复;14:实时文档回复; */
ReplyMethod?: number | null;
/** 选项卡, 用于多轮对话 */
OptionCards?: string[] | null;
/** 任务信息 */
TaskFlow?: TaskFlowInfo | null;
/** 用户传入的文件信息 */
FileInfos?: FileInfo[] | null;
/** 参考来源引用位置信息 */
QuoteInfos?: QuoteInfo[] | null;
/** Agent的思考过程信息 */
AgentThought?: AgentThought | null;
/** 扩展信息 */
ExtraInfo?: ExtraInfo | null;
/** 工作流信息 */
WorkFlow?: WorkflowInfo | null;
/** Widget信息 */
Widgets?: Widget[] | null;
/** Widget动作信息 */
WidgetAction?: WidgetAction | null;
}
/** 聊天详情Refer */
declare interface MsgRecordReference {
/** id */
Id?: string;
/** 链接 */
Url?: string;
/** 类型 */
Type?: number;
/** 名称 */
Name?: string;
/** 来源文档ID */
DocId?: string;
/** 知识库名称 */
KnowledgeName?: string;
/** 知识库业务id */
KnowledgeBizId?: string;
/** 文档业务id */
DocBizId?: string;
/** 问答业务id */
QaBizId?: string;
/** 文档索引id */
Index?: number;
}
/** Nl2Sql模型配置 */
declare interface NL2SQLModelConfig {
/** 模型配置 */
Model?: AppModelDetailInfo | null;
}
/** 节点运行的基本信息 */
declare interface NodeRunBase {
/** 节点运行的ID */
NodeRunId?: string;
/** 节点ID */
NodeId?: string;
/** 工作流运行实例的ID */
WorkflowRunId?: string;
/** 节点名称 */
NodeName?: string;
/** 节点类型。1: 开始节点2:参数提取节点3:大模型节点4:知识问答节点5:知识检索节点6:标签提取节点7:代码执行节点8:工具节点9:逻辑判断节点10:回复节点11:选项卡节点12:循环节点13:意图识别节点14:工作流节点15:插件节点16:结束节点17: 变量聚合节点数据18: 批处理节点19: 消息队列节点 */
NodeType?: number;
/** 运行状态。0: 初始状态;1: 运行中;2: 运行成功; 3: 运行失败; 4: 已取消 */
State?: number;
/** 错误码 */
FailCode?: string;
/** 错误信息 */
FailMessage?: string;
/** 消耗时间(毫秒) */
CostMilliseconds?: number;
/** 消耗的token总数 */
TotalTokens?: number;
}
/** 工作流节点运行详情 */
declare interface NodeRunDetail {
/** 节点运行的ID */
NodeRunId?: string;
/** 节点ID */
NodeId?: string;
/** 工作流运行实例的ID */
WorkflowRunId?: string;
/** 节点名称 */
NodeName?: string;
/** 节点类型。1: 开始节点2:参数提取节点3:大模型节点4:知识问答节点5:知识检索节点6:标签提取节点7:代码执行节点8:工具节点9:逻辑判断节点10:回复节点11:选项卡节点12:循环节点13:意图识别节点14:工作流节点15:插件节点16:结束节点17: 变量聚合节点数据18: 批处理节点19: 消息队列节点 */
NodeType?: number;
/** 运行状态。0: 初始状态;1: 运行中;2: 运行成功; 3: 运行失败; 4: 已取消 */
State?: number;
/** 错误码 */
FailCode?: string;
/** 错误信息 */
FailMessage?: string;
/** 消耗时间(毫秒) */
CostMilliseconds?: number;
/** 消耗的token总数 */
TotalTokens?: number;
/** 输入变量信息 */
Input?: string;
/** 节点的输入的完整内容的链接。(当Input内容超过限制的时候此字段才有值) */
InputRef?: string;
/** 输出变量信息 */
Output?: string;
/** 节点的输出的完整内容的链接。(当Output内容超过限制的时候此字段才有值) */
OutputRef?: string;
/** 原始输出信息。部分节点才有值,如工具节点、代码节点 */
TaskOutput?: string;
/** 任务的原始输出的完整内容的链接。(当TaskOutput内容超过限制的时候此字段才有值) */
TaskOutputRef?: string;
/** 节点的日志 */
Log?: string;
/** 节点的日志的完整内容的链接志(当Log内容超过限制的时候才有值) */
LogRef?: string;
/** 开始时间戳(毫秒) */
StartTime?: string;
/** 结束时间戳(毫秒) */
EndTime?: string;
/** LLM统计信息。 */
StatisticInfos?: StatisticInfo[];
}
/** 下拉框选项 */
declare interface Option {
/** 文本 */
Text?: string | null;
/** 值 */
Value?: string | null;
/** 文件字符数 */
CharSize?: string | null;
/** 文件类型 */
FileType?: string | null;
}
/** 选项卡索引 */
declare interface OptionCardIndex {
/** 唯一标识 */
RecordId?: string;
/** 选项卡索引 */
Index?: number;
}
/** Widget输出参数配置 */
declare interface OutputWidgetConfig {
/** widget id */
WidgetId?: string;
/** widget名字 */
WidgetName?: string;
/** 展示结果 */
WidgetParam?: WidgetParam[];
}
/** 参数配置列表 */
declare interface ParameterConfig {
/** 字段名称 */
Name?: string;
/** 字段描述 */
Description?: string;
/** 字段类型 */
Type?: number;
/** 是否必填 */
IsRequired?: boolean;
/** 子参数 */
SubParams?: ParameterConfig[];
/** OneOf类型的参数 */
OneOf?: ParameterConfig[];
/** AnyOf类型的参数 */
AnyOf?: ParameterConfig[];
}
/** 插件参数请求结构 */
declare interface PluginToolReqParam {
/** 参数名称 */
Name?: string;
/** 参数描述 */
Desc?: string;
/** 参数类型,0:string, 1:int, 2:float,3:bool 4:object 5:array_string, 6:array_int, 7:array_float, 8:array_bool, 9:array_object, 99:null, 100:upspecified */
Type?: number;
/** 参数是否必填 */
IsRequired?: boolean;
/** 参数默认值 */
DefaultValue?: string;
/** 子参数,ParamType 是OBJECT 或 ARRAY<>类型有用 */
SubParams?: PluginToolReqParam[];
/** 插件参数配置是否隐藏不可见,true-隐藏不可见,false-可见 */
GlobalHidden?: boolean;
/** OneOf类型参数 */
OneOf?: PluginToolReqParam[];
/** AnyOf类型参数 */
AnyOf?: PluginToolReqParam[];
}
/** 执行过程信息记录 */
declare interface Procedure {
/** 执行过程英语名 */
Name?: string | null;
/** 中文名, 用于展示 */
Title?: string | null;
/** 状态常量: 使用中: processing, 成功: success, 失败: failed */
Status?: string | null;
/** 消耗 token 数 */
Count?: number | null;
/** 调试信息 */
Debugging?: ProcedureDebugging | null;
/** 计费资源状态,1:可用,2:不可用 */
ResourceStatus?: number | null;
/** 输入消耗 token 数 */
InputCount?: number;
/** 输出消耗 token 数 */
OutputCount?: number;
}
/** 调试信息 */
declare interface ProcedureDebugging {
/** 检索query */
Content?: string | null;
/** 系统prompt */
System?: string | null;
/** 多轮历史信息 */
Histories?: HistorySummary[] | null;
/** 检索知识 */
Knowledge?: KnowledgeSummary[] | null;
/** 任务流程 */
TaskFlow?: TaskFlowSummary | null;
/** 工作流调试信息 */
WorkFlow?: WorkFlowSummary | null;
/** Agent调试信息 */
Agent?: AgentDebugInfo | null;
/** 自定义参数 */
CustomVariables?: string[] | null;
}
/** 获取QA分类分组 */
declare interface QACate {
/** QA分类的业务ID */
CateBizId?: string | null;
/** 分类名称 */
Name?: string | null;
/** 分类下QA数量 */
Total?: number | null;
/** 是否可新增 */
CanAdd?: boolean | null;
/** 是否可编辑 */
CanEdit?: boolean | null;
/** 是否可删除 */
CanDelete?: boolean | null;
/** 子分类 */
Children?: QACate[] | null;
/** 是否是叶子节点 */
IsLeaf?: boolean | null;
}
/** 问答列表 */
declare interface QAList {
/** 问答ID */
QaBizId: string;
/** 是否采纳 */
IsAccepted?: boolean;
/** 分类ID */
CateBizId?: string;
/** 问题 */
Question?: string;
/** 答案 */
Answer?: string;
}
/** QA查询参数 */
declare interface QAQuery {
/** 页码 */
PageNumber: number;
/** 每页数量 */
PageSize: number;
/** 应用ID */
BotBizId: string;
/** 查询内容 */
Query?: string;
/** 分类ID */
CateBizId?: string;
/** 校验状态 */
AcceptStatus?: number[];
/** 发布状态 */
ReleaseStatus?: number[];
/** 文档ID */
DocBizId?: string;
/** QAID */
QaBizId?: string;
/** 来源 */
Source?: number;
/** 查询答案 */
QueryAnswer?: string;
/** 查询类型 filename 名称、 attribute 标签 */
QueryType?: string;
}
/** 问答对参考信息 */
declare interface QaReference {
/** 问答业务ID */
QaBizId?: number;
/** 文档片段参考ID */
ReferBizId?: number | null;
/** 问答所在知识库业务ID */
KnowledgeBizId?: number | null;
/** 问答所在知识库名称 */
KnowledgeName?: string | null;
}
/** 搜索引擎参考来源索引 */
declare interface QuoteInfo {
/** 参考来源位置 */
Position?: number | null;
/** 参考来源索引顺序 */
Index?: string | null;
}
/** 引用来源详情 */
declare interface ReferDetail {
/** 引用ID */
ReferBizId?: string | null;
/** 文档类型 (1 QA, 2 文档段) */
DocType?: number | null;
/** 文档名称 */
DocName?: string | null;
/** 分片内容 */
PageContent?: string | null;
/** 问题 */
Question?: string | null;
/** 答案 */
Answer?: string | null;
/** 置信度 */
Confidence?: number | null;
/** 标记 */
Mark?: number | null;
/** 分片高亮内容 */
Highlights?: Highlight[] | null;
/** 原始内容 */
OrgData?: string | null;
/** 页码信息 */
PageInfos?: number[] | null;
/** sheet信息 */
SheetInfos?: string[] | null;
/** 文档ID */
DocBizId?: string | null;
/** 知识库ID */
KnowledgeBizId?: string;
}
/** 发布拒答 */
declare interface RejectedQuestion {
/** 拒答问题ID */
RejectedBizId?: string | null;
/** 被拒答的问题 */
Question?: string | null;
/** 发布状态(1 待发布 2 发布中 3 已发布 4 发布失败) */
Status?: number | null;
/** 状态描述 */
StatusDesc?: string | null;
/** 更新时间, 秒级时间戳 */
UpdateTime?: string | null;
/** 是否允许编辑 */
IsAllowEdit?: boolean | null;
/** 是否允许删除 */
IsAllowDelete?: boolean | null;
/** 操作人 */
Operator?: string | null;
}
/** 发布配置项 */
declare interface ReleaseConfigs {
/** 配置项描述 */
ConfigItem?: string | null;
/** 更新时间 */
UpdateTime?: string | null;
/** 状态 */
Action?: number | null;
/** 变更后的内容 */
Value?: string | null;
/** 变更前的内容 */
LastValue?: string | null;
/** 变更内容(优先级展示content内容,content为空取value内容) */
Content?: string | null;
/** 失败原因 */
Message?: string | null;
}
/** 发布文档详情 */
declare interface ReleaseDoc {
/** 文件名 */
FileName?: string;
/** 文件类型 */
FileType?: string;
/** 更新时间 */
UpdateTime?: string;
/** 状态 */
Action?: number;
/** 状态描述 */
ActionDesc?: string;
/** 失败原因 */
Message?: string;
/** 文档业务ID */
DocBizId?: string;
}
/** 发布问答 */
declare interface ReleaseQA {
/** 问题 */
Question?: string;
/** 更新时间 */
UpdateTime?: string;
/** 状态 */
Action?: number;
/** 状态描述 */
ActionDesc?: string;
/** 来源1:文档生成,2:批量导入,3:手动添加 */
Source?: number;
/** 来源描述 */
SourceDesc?: string;
/** 文件名字 */
FileName?: string;
/** 文档类型 */
FileType?: string;
/** 失败原因 */
Message?: string;
/** 发布状态 */
ReleaseStatus?: number;
/** QAID */
QaBizId?: string;
/** 文档业务ID */
DocBizId?: string;
}
/** 发布拒答 */
declare interface ReleaseRejectedQuestion {
/** 问题 */
Question?: string | null;
/** 更新时间 */
UpdateTime?: string | null;
/** 状态 */
Action?: number | null;
/** 状态描述 */
ActionDesc?: string | null;
/** 失败原因 */
Message?: string | null;
}
/** 节点信息 */
declare interface RunNodeInfo {
/** 节点类型,0:未指定,1:开始节点,2:API节点,3:询问节点,4:答案节点 */
NodeType?: number | null;
/** 节点ID */
NodeId?: string | null;
/** 节点名称 */
NodeName?: string | null;
/** 请求的API */
InvokeApi?: InvokeAPI | null;
/** 当前节点的所有槽位的值,key:SlotID。没有值的时候也要返回空。 */
SlotValues?: ValueInfo[] | null;
}
/** 沙盒信息内容 */
declare interface SandboxContent {
/** 沙盒的URL地址 */
Url?: string | null;
/** 沙盒通过浏览器打开的URL地址 */
DisplayUrl?: string | null;
/** 沙盒输出内容 */
Content?: string | null;
}
/** 检索范围配置 */
declare interface SearchRange {
/** 检索条件and/or */
Condition?: string | null;
/** 自定义变量和标签关系数据 */
ApiVarAttrInfos?: ApiVarAttrInfo[] | null;
}
/** 知识库检索策略 */
declare interface SearchStrategy {
/** 检索策略类型 0:混合检索,1:语义检索 */
StrategyType?: number | null;
/** Excel检索增强开关, false关闭,true打开 */
TableEnhancement?: boolean | null;
/** 向量模型 */
EmbeddingModel?: string | null;
/** 结果重排序开关, on打开,off关闭 */
RerankModelSwitch?: string | null;
/** 结果重排序模型 */
RerankModel?: string | null;
/** NL2SQL模型配置 */
NatureLanguageToSqlModelConfig?: NL2SQLModelConfig | null;
}
/** 共享知识库配置 */
declare interface ShareKnowledgeBase {
/** 共享知识库ID */
KnowledgeBizId?: string | null;
/** 检索范围 */
SearchRange?: SearchRange | null;
/** 知识库模型设置 */
KnowledgeModelConfig?: KnowledgeModelConfig | null;
/** 检索策略配置 */
SearchStrategy?: SearchStrategy | null;
/** 检索配置 */
Search?: KnowledgeQaSearch[] | null;
/** // 问答-回复灵活度 1:已采纳答案直接回复 2:已采纳润色后回复 */
ReplyFlexibility?: number | null;
/** 共享知识库名称 */
KnowledgeName?: string | null;
}
/** 相似问信息 */
declare interface SimilarQuestion {
/** 相似问ID */
SimBizId?: string | null;
/** 相似问内容 */
Question?: string | null;
/** 相似问审核状态,1审核失败 */
AuditStatus?: number | null;
}
/** 相似问修改(更新)信息 */
declare interface SimilarQuestionModify {
/** 需要添加的相似问(内容)列表 */
AddQuestions?: string[];
/** 需要更新的相似问列表 */
UpdateQuestions?: SimilarQuestion[];
/** 需要删除的相似问列表 */
DeleteQuestions?: SimilarQuestion[];
}
/** 计费统计信息 */
declare interface Stat {
/** X轴: 时间区域;根据查询条件的粒度返回“分/小时/日”三种区间范围 */
X?: string | null;
/** Y轴: 该时间区域内的统计值,如token消耗量,调用次数或使用量等信息 */
Y?: number | null;
}
/** 大模型token统计信息 */
declare interface StatisticInfo {
/** 模型名称 */
ModelName?: string | null;
/** 首Token耗时 */
FirstTokenCost?: number | null;
/** 总耗时 */
TotalCost?: number | null;
/** 输入Token数量 */
InputTokens?: number | null;
/** 输出Token数量 */
OutputTokens?: number | null;
/** 总Token数量 */
TotalTokens?: number | null;
}
/** 字符串KV信息 */
declare interface StrValue {
/** 名称 */
Name?: string | null;
/** 值 */
Value?: string | null;
}
/** 结构化输出的配置项 */
declare interface StructuredOutputConfig {
/** 参数列表 */
StructuredOutputParams?: ParameterConfig[];
}
/** 知识摘要应用配置 */
declare interface SummaryConfig {
/** 模型配置 */
Model?: AppModel | null;
/** 知识摘要输出配置 */
Output?: SummaryOutput | null;
/** 欢迎语,200字符以内 */
Greeting?: string | null;
}
/** 知识摘要输出配置 */
declare interface SummaryOutput {
/** 输出方式 1:流式 2:非流式 */
Method?: number | null;
/** 输出要求 1:文本总结 2:自定义要求 */
Requirement?: number | null;
/** 自定义要求指令 */
RequireCommand?: string | null;
}
/** 变量详情 */
declare interface TaskFLowVar {
/** 变量ID */
VarId?: string | null;
/** 变量名称 */
VarName?: string | null;
/** 变量描述(默认为"-") */
VarDesc?: string;
/** 变量类型 (STRING,INT,FLOAT,BOOL,OBJECT,ARRAY_STRING,ARRAY_INT,ARRAY_FLOAT,ARRAY_BOOL,ARRAY_OBJECT,FILE,DOCUMENT,IMAGE,AUDIO) */
VarType?: string;
/** 自定义变量默认值 */
VarDefaultValue?: string;
/** 自定义变量文件默认名称 */
VarDefaultFileName?: string;
/** 变量类型 */
VarModuleType?: number;
}
/** 任务流程信息 */
declare interface TaskFlowInfo {
/** 任务流程ID */
TaskFlowId?: string | null;
/** 任务流程名称 */
TaskFlowName?: string | null;
/** Query 重写结果 */
QueryRewrite?: string | null;
/** 命中意图 */
HitIntent?: string | null;
/** 任务流程回复类型0: 任务流回复1: 任务流静默2: 任务流拉回话术3: 任务流自定义回复 */
Type?: number | null;
}
/** 任务流程调试信息 */
declare interface TaskFlowSummary {
/** 任务流程名 */
IntentName?: string | null;
/** 实体列表 */
UpdatedSlotValues?: ValueInfo[] | null;
/** 节点列表 */
RunNodes?: RunNodeInfo[] | null;
/** 意图判断 */
Purposes?: string[] | null;
}
/** 任务参数 */
declare interface TaskParams {
/** 下载地址,需要通过cos桶临时密钥去下载 */
CosPath?