'1.0', 'info' => [ 'style' => 'ROA', 'product' => 'PAILangStudio', 'version' => '2024-07-10', ], 'directories' => [ 'CreateKnowledgeBase', 'GetKnowledgeBase', 'UpdateKnowledgeBase', 'DeleteKnowledgeBase', 'ListKnowledgeBases', 'RetrieveKnowledgeBase', 'CreateKnowledgeBaseJob', 'GetKnowledgeBaseJob', 'UpdateKnowledgeBaseJob', 'DeleteKnowledgeBaseJob', 'ListKnowledgeBaseJobs', 'UpdateKnowledgeBaseChunk', 'ListKnowledgeBaseChunks', ], 'components' => [ 'schemas' => [ 'AutoUpdateConfig' => [ 'type' => 'object', 'properties' => [ 'Status' => [ 'title' => '知识库自动更新状态', 'description' => '知识库自动更新状态', 'type' => 'string', 'default' => 'Disable', ], 'ResourceId' => [ 'title' => '资源组ID', 'description' => '资源组ID', 'type' => 'string', ], 'MaxRunningTimeInSeconds' => [ 'title' => '任务最大运行时间', 'description' => '任务最大运行时间', 'type' => 'integer', 'format' => 'int32', ], 'EmbeddingConfig' => [ 'title' => 'Embedding配置', 'description' => 'Embedding配置', 'type' => 'object', 'properties' => [ 'BatchSize' => [ 'title' => 'Embedding分批大小', 'description' => 'Embedding分批大小', 'type' => 'integer', 'format' => 'int32', ], 'Concurrency' => [ 'title' => 'Embedding并发数', 'description' => 'Embedding并发数', 'type' => 'integer', 'format' => 'int32', 'maximum' => '200', 'minimum' => '1', ], ], ], 'UserVpc' => [ 'title' => '用户VPC配置', 'description' => '用户VPC配置', '$ref' => '#/components/schemas/UserVpc', ], 'EcsSpecs' => [ 'title' => '运行资源配置', 'description' => '运行资源配置', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型', 'type' => 'string', 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称', 'type' => 'string', ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量', 'type' => 'integer', 'format' => 'int32', ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型', 'type' => 'string', ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数', 'type' => 'integer', 'format' => 'int32', ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数', 'type' => 'integer', 'format' => 'int32', ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小', 'type' => 'integer', 'format' => 'int32', ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存容量', 'type' => 'integer', 'format' => 'int32', ], 'Driver' => [ 'title' => '驱动版本', 'description' => '驱动版本', 'type' => 'string', ], ], ], ], ], ], 'Connection' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'ConnectionId' => [ 'type' => 'string', ], 'ConnectionType' => [ 'type' => 'string', ], 'ConnectionName' => [ 'type' => 'string', ], 'CustomType' => [ 'type' => 'string', ], 'Description' => [ 'type' => 'string', ], 'Configs' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', ], ], 'Secrets' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', ], ], 'GmtCreateTime' => [ 'type' => 'string', ], 'GmtModifiedTime' => [ 'type' => 'string', ], 'Creator' => [ 'type' => 'string', ], 'ResourceMeta' => [ 'type' => 'object', 'properties' => [ 'InstanceName' => [ 'title' => '资源实例名称', 'description' => '资源实例名称', 'type' => 'string', ], 'InstanceId' => [ 'title' => '资源实例ID', 'description' => '资源实例ID', 'type' => 'string', ], ], ], 'Models' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Model' => [ 'title' => '模型名', 'description' => '模型名', 'type' => 'string', ], 'ModelType' => [ 'title' => '模型类型', 'description' => '模型类型', 'type' => 'string', ], 'DisplayName' => [ 'title' => '模型展示名称', 'description' => '模型展示名称', 'type' => 'string', ], 'ToolCall' => [ 'title' => '是否支持ToolCall', 'description' => '是否支持ToolCall', 'type' => 'boolean', ], 'SupportVision' => [ 'title' => '是否支持Vision', 'description' => '是否支持Vision', 'type' => 'boolean', ], 'SupportReasoning' => [ 'title' => '是否支持Reasoning', 'description' => '是否支持Reasoning', 'type' => 'boolean', ], 'SupportResponseSchema' => [ 'title' => '是否支持输出Schema', 'description' => '是否支持输出Schema', 'type' => 'boolean', ], 'MaxModelLength' => [ 'title' => '最大上下文长度', 'description' => '最大上下文长度', 'type' => 'integer', 'format' => 'int32', ], ], ], ], ], ], 'Deployment' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'Creator' => [ 'type' => 'string', ], 'GmtCreateTime' => [ 'type' => 'string', ], 'GmtModifiedTime' => [ 'type' => 'string', ], 'DeploymentId' => [ 'type' => 'string', ], 'DeploymentStatus' => [ 'type' => 'string', ], 'OperationType' => [ 'type' => 'string', ], 'ResourceType' => [ 'type' => 'string', ], 'ResourceId' => [ 'type' => 'string', ], 'ResourceSnapshotId' => [ 'type' => 'string', ], 'ServiceName' => [ 'type' => 'string', ], 'ServiceGroup' => [ 'type' => 'string', ], 'Description' => [ 'type' => 'string', ], 'WorkDir' => [ 'type' => 'string', ], 'EcsSpec' => [ 'type' => 'object', 'properties' => [ 'ResourceId' => [ 'title' => '资源组ID', 'description' => '资源组ID', 'type' => 'string', 'readOnly' => true, ], 'ResourceBurstable' => [ 'title' => '是否启用弹性资源池', 'description' => '是否启用弹性资源池', 'type' => 'boolean', 'readOnly' => true, ], 'InstanceType' => [ 'title' => '实例类型', 'description' => '实例类型', 'type' => 'string', 'readOnly' => true, ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型', 'type' => 'string', 'readOnly' => true, ], 'CPU' => [ 'title' => 'CPU信息', 'description' => 'CPU信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPU' => [ 'title' => 'GPU信息', 'description' => 'GPU信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'Memory' => [ 'title' => '内存信息', 'description' => '内存信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'SharedMemory' => [ 'title' => '共享内存', 'description' => '共享内存', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'PodCount' => [ 'title' => 'Pod数量', 'description' => 'Pod数量', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPUMemory' => [ 'title' => 'GPU显存', 'description' => 'GPU显存', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPUCorePercentage' => [ 'title' => 'GPU算力占比', 'description' => 'GPU算力占比', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'ExtraEphemeralStorage' => [ 'title' => '额外系统盘', 'description' => '额外系统盘', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'QuotaId' => [ 'title' => '资源配额ID', 'description' => '资源配额ID', 'type' => 'string', 'readOnly' => true, ], 'QuotaType' => [ 'title' => '资源配额类型', 'description' => '资源配额类型', 'type' => 'string', 'readOnly' => true, ], 'ComputingInstanceConfig' => [ 'title' => '竞价资源配置', 'description' => '竞价资源配置', 'type' => 'object', 'properties' => [ 'DisableSpotProtectionPeriod' => [ 'title' => '是否启用竞价保留时长', 'description' => '是否启用竞价保留时长', 'type' => 'boolean', 'readOnly' => true, ], 'ComputingInstances' => [ 'title' => '机器资源配置', 'description' => '机器资源配置', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '机型', 'description' => '机型', 'type' => 'string', 'readOnly' => true, ], 'SpotPriceLimit' => [ 'title' => '竞价出价', 'description' => '竞价出价', 'type' => 'number', 'format' => 'float', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], 'readOnly' => true, ], ], ], 'UserVpc' => [ 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'VPC ID', 'description' => 'VPC ID', 'type' => 'string', 'readOnly' => true, ], 'VSwitchId' => [ 'title' => '交换机ID', 'description' => '交换机ID', 'type' => 'string', 'readOnly' => true, ], 'SecurityGroupId' => [ 'title' => '安全组ID', 'description' => '安全组ID', 'type' => 'string', 'readOnly' => true, ], ], ], 'Envs' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '环境键', 'description' => '环境键', 'type' => 'string', 'readOnly' => true, ], 'Value' => [ 'title' => '环境值', 'description' => '环境值', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'Labels' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '标签键', 'description' => '标签键', 'type' => 'string', 'readOnly' => true, ], 'Value' => [ 'title' => '标签值', 'description' => '标签值', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'DataSources' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'DatasetId' => [ 'title' => '数据集ID', 'description' => '数据集ID', 'type' => 'string', 'readOnly' => true, ], 'Uri' => [ 'title' => '统一资源识别码', 'description' => '统一资源识别码', 'type' => 'string', 'readOnly' => true, ], 'MountPath' => [ 'title' => '挂载路径', 'description' => '挂载路径', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'CredentialConfig' => [ 'type' => 'object', 'properties' => [ 'EnableCredentialInject' => [ 'title' => '是否启用Credential注入', 'description' => '是否启用Credential注入', 'type' => 'boolean', 'readOnly' => true, ], 'AliyunEnvRoleKey' => [ 'title' => 'AliyunEnvRoleKey', 'description' => 'AliyunEnvRoleKey', 'type' => 'string', 'readOnly' => true, ], 'CredentialConfigItems' => [ 'title' => 'Credential配置项列表', 'description' => 'Credential配置项列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => 'Key', 'description' => 'Key', 'type' => 'string', 'readOnly' => true, ], 'Type' => [ 'title' => 'Type', 'description' => 'Type', 'type' => 'string', 'readOnly' => true, ], 'Roles' => [ 'title' => '角色列表', 'description' => '角色列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'AssumeRoleFor' => [ 'title' => 'AssumeRoleFor', 'description' => 'AssumeRoleFor', 'type' => 'string', 'readOnly' => true, ], 'RoleType' => [ 'title' => '角色类型', 'description' => '角色类型', 'type' => 'string', 'readOnly' => true, ], 'RoleArn' => [ 'title' => '角色名称', 'description' => '角色名称', 'type' => 'string', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], ], 'EnableTrace' => [ 'type' => 'boolean', ], 'ChatHistoryConfig' => [ 'type' => 'object', 'properties' => [ 'StorageType' => [ 'title' => '存储类型', 'description' => '存储类型', 'type' => 'string', 'readOnly' => true, 'enum' => [ 'LOCAL', 'CLOUD', ], ], 'ConnectionName' => [ 'title' => '连接名称', 'description' => '连接名称', 'type' => 'string', 'readOnly' => true, ], ], ], 'ContentModerationConfig' => [ 'type' => 'object', 'properties' => [ 'EnableInputModeration' => [ 'title' => '启用输入内容审查', 'description' => '启用输入内容审查', 'type' => 'boolean', 'readOnly' => true, ], 'EnableOutputModeration' => [ 'title' => '启用输出内容审查', 'description' => '启用输出内容审查', 'type' => 'boolean', 'readOnly' => true, ], 'StreamingModerationThreshold' => [ 'title' => '流式输出内容送审缓存大小', 'description' => '流式输出内容送审缓存大小', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], ], ], 'DeploymentConfig' => [ 'type' => 'string', ], 'DeploymentStages' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Stage' => [ 'title' => '阶段', 'description' => '阶段', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'StageName' => [ 'title' => '阶段名称', 'description' => '阶段名称', 'type' => 'string', 'readOnly' => true, ], 'Description' => [ 'title' => '描述', 'description' => '描述', 'type' => 'string', 'readOnly' => true, ], 'GmtStartTime' => [ 'title' => '开始时间', 'description' => '开始时间', 'type' => 'string', 'readOnly' => true, ], 'GmtEndTime' => [ 'title' => '结束时间', 'description' => '结束时间', 'type' => 'string', 'readOnly' => true, ], 'StageStatus' => [ 'title' => '阶段状态', 'description' => '阶段状态', 'type' => 'string', 'readOnly' => true, ], 'ErrorMessage' => [ 'title' => '错误信息', 'description' => '错误信息', 'type' => 'string', 'readOnly' => true, ], 'StageInfo' => [ 'title' => '阶段信息', 'description' => '阶段信息', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'ErrorMessage' => [ 'type' => 'string', ], 'AutoApproval' => [ 'type' => 'boolean', ], ], ], 'EcsSpec' => [ 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型', 'type' => 'string', 'readOnly' => true, 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称', 'type' => 'string', 'readOnly' => true, ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存容量', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型', 'type' => 'string', 'readOnly' => true, ], 'Driver' => [ 'title' => '驱动版本', 'description' => '驱动版本', 'type' => 'string', 'readOnly' => true, ], ], ], 'Flow' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'Description' => [ 'type' => 'string', ], 'FlowId' => [ 'type' => 'string', ], 'FlowName' => [ 'type' => 'string', ], 'FlowStoragePath' => [ 'type' => 'string', ], 'FlowType' => [ 'type' => 'string', ], 'GmtCreateTime' => [ 'type' => 'string', ], 'GmtModifiedTime' => [ 'type' => 'string', ], 'WorkDir' => [ 'type' => 'string', ], 'Creator' => [ 'type' => 'string', ], 'CreateFrom' => [ 'type' => 'string', ], 'FlowTemplateId' => [ 'type' => 'string', ], 'Runtime' => [ 'type' => 'object', 'properties' => [ 'RuntimeId' => [ 'title' => '运行时ID', 'description' => '运行时ID', 'type' => 'string', 'readOnly' => true, ], 'RuntimeName' => [ 'title' => '运行时名称', 'description' => '运行时名称', 'type' => 'string', 'readOnly' => true, ], 'RuntimeType' => [ 'title' => '运行时类型', 'description' => '运行时类型', 'type' => 'string', 'readOnly' => true, ], 'RuntimeStatus' => [ 'title' => '运行时状态', 'description' => '运行时状态', 'type' => 'string', 'readOnly' => true, ], 'SupportSSEStream' => [ 'title' => '是否支持SSE', 'description' => '是否支持SSE', 'type' => 'boolean', 'readOnly' => true, ], ], ], 'Version' => [ 'type' => 'string', ], 'RuntimeId' => [ 'type' => 'string', ], 'SourceUri' => [ 'type' => 'string', ], 'CodeModeRunInfo' => [ 'type' => 'string', ], ], ], 'FlowRun' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'FlowId' => [ 'type' => 'string', ], 'FlowName' => [ 'type' => 'string', ], 'FlowRunId' => [ 'type' => 'string', ], 'RunStatus' => [ 'type' => 'string', ], 'RunMode' => [ 'type' => 'string', ], 'NodeName' => [ 'type' => 'string', ], 'Variant' => [ 'type' => 'string', ], 'Exception' => [ 'type' => 'string', ], 'RunResult' => [ 'type' => 'string', ], 'GmtCreateTime' => [ 'type' => 'string', ], 'GmtModifiedTime' => [ 'type' => 'string', ], 'GmtStartTime' => [ 'type' => 'string', ], 'GmtFinishTime' => [ 'type' => 'string', ], 'Duration' => [ 'type' => 'integer', 'format' => 'int32', ], 'Creator' => [ 'type' => 'string', ], 'RunName' => [ 'type' => 'string', ], 'EcsSpec' => [ 'type' => 'object', 'properties' => [ 'InstanceType' => [ 'title' => '实例类型', 'description' => '实例类型', 'type' => 'string', 'readOnly' => true, ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型', 'type' => 'string', 'readOnly' => true, ], 'CPU' => [ 'title' => 'CPU信息', 'description' => 'CPU信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPU' => [ 'title' => 'GPU信息', 'description' => 'GPU信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'Memory' => [ 'title' => '内存信息', 'description' => '内存信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'SharedMemory' => [ 'title' => '共享内存', 'description' => '共享内存', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'PodCount' => [ 'title' => 'Pod数量', 'description' => 'Pod数量', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPUMemory' => [ 'title' => 'GPU显存', 'description' => 'GPU显存', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPUCorePercentage' => [ 'title' => 'GPU算力占比', 'description' => 'GPU算力占比', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'ExtraEphemeralStorage' => [ 'title' => '额外系统盘', 'description' => '额外系统盘', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'QuotaId' => [ 'title' => '资源配额ID', 'description' => '资源配额ID', 'type' => 'string', 'readOnly' => true, ], 'QuotaType' => [ 'title' => '资源配额类型', 'description' => '资源配额类型', 'type' => 'string', 'readOnly' => true, ], ], ], 'ResourceId' => [ 'type' => 'string', ], 'DataSources' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'DatasetId' => [ 'title' => '数据集ID', 'description' => '数据集ID', 'type' => 'string', 'readOnly' => true, ], 'Uri' => [ 'title' => '统一资源识别码', 'description' => '统一资源识别码', 'type' => 'string', 'readOnly' => true, ], 'MountPath' => [ 'title' => '挂载路径', 'description' => '挂载路径', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'DataColumnMapping' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', ], ], 'EvaluationConfigs' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'FlowSource' => [ 'title' => '应用流来源', 'description' => '应用流来源', 'type' => 'object', 'properties' => [ 'Id' => [ 'title' => 'ID', 'description' => 'ID', 'type' => 'string', 'readOnly' => true, ], 'Type' => [ 'title' => '类型', 'description' => '类型', 'type' => 'string', 'readOnly' => true, ], 'Name' => [ 'title' => '名称', 'description' => '名称', 'type' => 'string', 'readOnly' => true, ], ], 'readOnly' => true, ], 'DataColumnMapping' => [ 'title' => '映射配置', 'description' => '映射配置', 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', ], 'readOnly' => true, ], 'InputsOverrideConfig' => [ 'title' => '输入配置', 'description' => '输入配置', 'type' => 'string', 'readOnly' => true, ], 'Name' => [ 'title' => '评测名称', 'description' => '评测名称', 'type' => 'string', 'readOnly' => true, ], 'Type' => [ 'title' => '评测类型', 'description' => '评测类型', 'type' => 'string', 'readOnly' => true, ], 'Inputs' => [ 'title' => '评测输入', 'description' => '评测输入', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'UserVpc' => [ 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'VPC ID', 'description' => 'VPC ID', 'type' => 'string', 'readOnly' => true, ], 'VSwitchId' => [ 'title' => '交换机ID', 'description' => '交换机ID', 'type' => 'string', 'readOnly' => true, ], 'SecurityGroupId' => [ 'title' => '安全组ID', 'description' => '安全组ID', 'type' => 'string', 'readOnly' => true, ], ], ], 'Envs' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '环境键', 'description' => '环境键', 'type' => 'string', 'readOnly' => true, ], 'Value' => [ 'title' => '环境值', 'description' => '环境值', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'Labels' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '标签键', 'description' => '标签键', 'type' => 'string', 'readOnly' => true, ], 'Value' => [ 'title' => '标签值', 'description' => '标签值', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'CredentialConfig' => [ 'type' => 'object', 'properties' => [ 'EnableCredentialInject' => [ 'title' => '是否启用Credential注入', 'description' => '是否启用Credential注入', 'type' => 'boolean', 'readOnly' => true, ], 'AliyunEnvRoleKey' => [ 'title' => 'AliyunEnvRoleKey', 'description' => 'AliyunEnvRoleKey', 'type' => 'string', 'readOnly' => true, ], 'CredentialConfigItems' => [ 'title' => 'Credential配置项列表', 'description' => 'Credential配置项列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => 'Key', 'description' => 'Key', 'type' => 'string', 'readOnly' => true, ], 'Type' => [ 'title' => 'Type', 'description' => 'Type', 'type' => 'string', 'readOnly' => true, ], 'Roles' => [ 'title' => '角色列表', 'description' => '角色列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'AssumeRoleFor' => [ 'title' => 'AssumeRoleFor', 'description' => 'AssumeRoleFor', 'type' => 'string', 'readOnly' => true, ], 'RoleType' => [ 'title' => '角色类型', 'description' => '角色类型', 'type' => 'string', 'readOnly' => true, ], 'RoleArn' => [ 'title' => '角色名称', 'description' => '角色名称', 'type' => 'string', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], ], 'RunTimeout' => [ 'type' => 'integer', 'format' => 'int32', ], 'ChildRuns' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'FlowRunId' => [ 'title' => '应用流运行ID', 'description' => '应用流运行ID', 'type' => 'string', 'readOnly' => true, ], 'RunName' => [ 'title' => '运行名称', 'description' => '运行名称', 'type' => 'string', 'readOnly' => true, ], 'RunMode' => [ 'title' => '运行模式', 'description' => '运行模式', 'type' => 'string', 'readOnly' => true, ], 'RunStatus' => [ 'title' => '运行状态', 'description' => '运行状态', 'type' => 'string', 'readOnly' => true, ], 'GmtCreateTime' => [ 'title' => '创建时间', 'description' => '创建时间', 'type' => 'string', 'readOnly' => true, ], 'GmtModifiedTime' => [ 'title' => '修改时间', 'description' => '修改时间', 'type' => 'string', 'readOnly' => true, ], 'GmtStartTime' => [ 'title' => '开始时间', 'description' => '开始时间', 'type' => 'string', 'readOnly' => true, ], 'GmtFinishTime' => [ 'title' => '结束时间', 'description' => '结束时间', 'type' => 'string', 'readOnly' => true, ], 'Duration' => [ 'title' => '运行时长', 'description' => '运行时长', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'FlowSource' => [ 'title' => '应用流来源', 'description' => '应用流来源', 'type' => 'object', 'properties' => [ 'Id' => [ 'title' => 'ID', 'description' => 'ID', 'type' => 'string', 'readOnly' => true, ], 'Type' => [ 'title' => '类型', 'description' => '类型', 'type' => 'string', 'readOnly' => true, ], 'Name' => [ 'title' => '名称', 'description' => '名称', 'type' => 'string', 'readOnly' => true, ], ], 'readOnly' => true, ], 'JobInfo' => [ 'title' => '任务信息', 'description' => '任务信息', 'type' => 'object', 'properties' => [ 'JobId' => [ 'title' => '任务ID', 'description' => '任务ID', 'type' => 'string', 'readOnly' => true, ], ], 'readOnly' => true, ], 'RunResult' => [ 'title' => '运行结果', 'description' => '运行结果', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'NodeRunInfos' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'NodeName' => [ 'title' => '节点名称', 'description' => '节点名称', 'type' => 'string', 'readOnly' => true, ], 'Status' => [ 'title' => '节点状态', 'description' => '节点状态', 'type' => 'string', 'readOnly' => true, ], 'Inputs' => [ 'title' => '输入', 'description' => '输入', 'type' => 'string', 'readOnly' => true, ], 'Output' => [ 'title' => '输出', 'description' => '输出', 'type' => 'string', 'readOnly' => true, ], 'ErrorMessage' => [ 'title' => '错误信息', 'description' => '错误信息', 'type' => 'string', 'readOnly' => true, ], 'Duration' => [ 'title' => '耗时', 'description' => '耗时', 'type' => 'string', 'readOnly' => true, ], 'Stdout' => [ 'title' => '日志信息', 'description' => '日志信息', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'EvaluationWorkerCount' => [ 'type' => 'integer', 'format' => 'int32', ], ], ], 'FlowTemplate' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'Description' => [ 'type' => 'string', ], 'FlowStoragePath' => [ 'type' => 'string', ], 'FlowTemplateId' => [ 'type' => 'string', ], 'FlowType' => [ 'type' => 'string', ], 'TemplateGroup' => [ 'type' => 'string', ], 'TemplateName' => [ 'type' => 'string', ], 'Url' => [ 'type' => 'string', ], 'FlowFiles' => [ 'type' => 'string', ], 'DisplayName' => [ 'type' => 'string', ], 'DisplayNameI18N' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', ], ], 'DescriptionI18N' => [ 'type' => 'object', 'additionalProperties' => [ 'type' => 'string', ], ], 'Version' => [ 'type' => 'string', ], 'Locale' => [ 'type' => 'string', ], 'ReferenceCount' => [ 'type' => 'integer', 'format' => 'int32', ], 'AliyunDocumentId' => [ 'type' => 'string', ], 'Labels' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '标签Key', 'description' => '标签Key', 'type' => 'string', ], 'Value' => [ 'title' => '标签Value', 'description' => '标签Value', 'type' => 'string', ], ], ], ], ], ], 'KnowledgeBase' => [ 'description' => '知识库。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '知识库所在工作空间ID。', 'type' => 'string', 'example' => '478***', ], 'Accessibility' => [ 'description' => '工作空间可见性,可能值为:'."\n" .'- PRIVATE:在此工作空间中,仅对您和管理员可见。'."\n" .'- PUBLIC:在此工作空间中,对所有人可见。', 'type' => 'string', 'example' => 'PRIVATE', ], 'GmtCreateTime' => [ 'description' => '知识库创建时间(UTC)。', 'type' => 'string', 'example' => '2024-12-15T14:46:23Z', ], 'GmtModifiedTime' => [ 'description' => '知识库修改时间(UTC)。', 'type' => 'string', 'example' => '2025-12-18T19:32:58Z', ], 'Name' => [ 'description' => '知识库名称。', 'type' => 'string', 'example' => 'myName', ], 'KnowledgeBaseId' => [ 'description' => '知识库ID。', 'type' => 'string', 'example' => 'd-nacr******sxd2', ], 'Description' => [ 'description' => '知识库描述。', 'type' => 'string', 'example' => 'This is a description of the knowledge base.', ], 'KnowledgeBaseType' => [ 'description' => '知识库类型。'."\n" .'- TEXT:文档。'."\n" .'- STRUCTURED:结构化数据。'."\n" .'- IMAGE:图片。'."\n" .'- VIDEO:视频。', 'type' => 'string', 'example' => 'TEXT', ], 'DatasetId' => [ 'description' => '知识库对应的数据集ID。', 'type' => 'string', 'example' => 'd-lvb6****865w', ], 'DataSources' => [ 'description' => '数据源。', 'type' => 'array', 'items' => [ 'description' => '数据源。', 'type' => 'object', 'properties' => [ 'Uri' => [ 'title' => '统一资源识别码', 'description' => '源文件存储路径。', 'type' => 'string', 'example' => 'oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/source/', 'readOnly' => true, ], ], ], ], 'OutputDir' => [ 'description' => '输出数据的存储路径。', 'type' => 'string', 'example' => 'oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/output/', ], 'ChunkConfig' => [ 'description' => '文件切片配置。', 'type' => 'object', 'properties' => [ 'ChunkSize' => [ 'title' => '分块大小', 'description' => '分块大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '1024', 'readOnly' => true, ], 'ChunkOverlap' => [ 'title' => '分块重叠大小', 'description' => '分块重叠大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '200', 'readOnly' => true, ], 'ChunkDuration' => [ 'title' => '分块时长', 'description' => '分块时长,单位秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '20', 'readOnly' => true, ], 'ChunkStrategy' => [ 'title' => '分块策略', 'description' => '分块策略。策略类型如下:'."\n" .'- Default。系统默认切片策略。'."\n" .'- Asr。按音频内容切分。', 'type' => 'string', 'example' => 'Default', 'readOnly' => true, 'default' => 'Default', ], ], ], 'EmbeddingConfig' => [ 'description' => '向量索引配置。', 'type' => 'object', 'properties' => [ 'ConnectionName' => [ 'title' => 'Embedding连接名称', 'description' => '索引服务连接名称。', 'type' => 'string', 'example' => 'myEmbeddingConn', ], 'ConnectionId' => [ 'title' => 'Embedding连接ID', 'description' => '索引服务连接ID。', 'type' => 'string', 'example' => 'conn-r3o7******38bh', ], 'Model' => [ 'title' => '模型', 'description' => '模型名称。', 'type' => 'string', 'example' => 'text-embedding-v4', ], ], ], 'VectorDBConfig' => [ 'description' => '向量库配置。', 'type' => 'object', 'properties' => [ 'VectorDBType' => [ 'title' => 'VectorDB类型', 'description' => '向量数据库类型。支持以下取值:'."\n" .'- Elasticsearch'."\n" .'- Milvus'."\n" .'- Faiss', 'type' => 'string', 'example' => 'Milvus', ], 'ConnectionName' => [ 'title' => 'VectorDB连接名称', 'description' => '向量数据库连接名称。', 'type' => 'string', 'example' => 'myConnName', ], 'ConnectionId' => [ 'title' => 'Embedding连接ID', 'description' => '向量数据库连接ID。', 'type' => 'string', 'example' => 'conn-v2wq****z7rg', ], 'CollectionName' => [ 'title' => 'Collection名称', 'description' => '向量数据库表或集合名称。', 'type' => 'string', 'example' => 'my_collection', ], ], ], 'Creator' => [ 'description' => '创建者用户ID。', 'type' => 'string', 'example' => '1247****1467', ], 'RuntimeId' => [ 'description' => '运行时ID。', 'type' => 'string', 'example' => 'rtime-78****d6', ], 'MetaDataConfig' => [ 'description' => '元数据配置。', 'type' => 'object', 'properties' => [ 'CustomMetaData' => [ 'title' => '自定义元数据', 'description' => '自定义元数据。', 'type' => 'array', 'items' => [ 'description' => '自定义元数据。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '元数据Key', 'description' => '元数据字段名称。', 'type' => 'string', 'example' => 'column1', ], 'ValueType' => [ 'title' => '元数据Value类型', 'description' => '元数据字段类型。', 'type' => 'string', 'example' => 'String', ], 'ReferenceCount' => [ 'title' => '引用次数', 'description' => '引用次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '3', 'readOnly' => true, ], 'ValueCount' => [ 'title' => '值的个数', 'description' => '值的个数。', 'type' => 'integer', 'format' => 'int32', 'example' => '8', 'readOnly' => true, ], ], ], ], ], ], 'AutoUpdateConfig' => [ 'description' => '知识库自动更新配置。', 'type' => 'object', 'properties' => [ 'Status' => [ 'title' => '知识库自动更新状态', 'description' => '知识库自动更新开关状态。'."\n" .'- Enable: 开启自动更新。'."\n" .'- Disable: 关闭自动更新。', 'type' => 'string', 'example' => 'Enable', 'default' => 'Disable', ], 'ResourceId' => [ 'title' => '资源组ID', 'description' => '资源组ID。为空或public-cluster表示公共资源。', 'type' => 'string', 'example' => 'quota87**45', ], 'MaxRunningTimeInSeconds' => [ 'title' => '任务最大运行时间', 'description' => '任务最大运行时间,单位秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '86400', ], 'EmbeddingConfig' => [ 'title' => 'Embedding配置', 'description' => '向量索引配置。', 'type' => 'object', 'properties' => [ 'BatchSize' => [ 'title' => 'Embedding分批大小', 'description' => '索引分批大小。文档和结构化数据类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'example' => '8', ], 'Concurrency' => [ 'title' => 'Embedding并发数', 'description' => '索引并发数。图片和视频类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'maximum' => '200', 'minimum' => '1', 'example' => '1', ], ], ], 'UserVpc' => [ 'title' => '用户VPC配置', 'description' => '用户VPC配置。', '$ref' => '#/components/schemas/UserVpc', ], 'EcsSpecs' => [ 'title' => '运行资源配置', 'description' => '运行资源配置列表。', 'type' => 'array', 'items' => [ 'description' => '运行资源。', 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型。可能的值为Head和Worker。', 'type' => 'string', 'example' => 'Worker', 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称。', 'type' => 'string', 'example' => 'ecs.c6.large', ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型。', 'type' => 'string', 'example' => 'V100', ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数。', 'type' => 'integer', 'format' => 'int32', 'example' => '4', ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存容量,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', ], 'Driver' => [ 'title' => '驱动版本', 'description' => '驱动版本。', 'type' => 'string', 'example' => '550.127.08', ], ], ], ], ], ], 'VersionName' => [ 'description' => '知识库版本。默认为v1。', 'type' => 'string', 'example' => 'v1', ], 'IndexColumnConfig' => [ 'description' => '列字段配置。结构化数据类型知识库有效。', 'type' => 'object', 'properties' => [ 'EmbeddingColumns' => [ 'title' => 'Embedding列', 'description' => '向量索引列。该列表中的字段会进行向量化并参与检索。', 'type' => 'array', 'items' => [ 'description' => '向量索引列。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'example' => 'column1', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], 'ContentColumns' => [ 'title' => '内容检索列', 'description' => '内容过滤列。该列表中的字段支持按照关键字进行检索。', 'type' => 'array', 'items' => [ 'description' => '内容过滤列。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'example' => 'column1', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], 'ColumnDefinitions' => [ 'title' => '所有列名', 'description' => '所有列名。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'example' => 'column1', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], ], ], ], 'KnowledgeBaseFileChunk' => [ 'description' => '知识库切片。', 'type' => 'object', 'properties' => [ 'Score' => [ 'description' => '结果与查询内容的相关性。', 'type' => 'number', 'format' => 'float', 'example' => '0.9832', ], 'ChunkId' => [ 'description' => '切片ID。', 'type' => 'string', 'example' => '7fjs******90fs', ], 'ChunkStart' => [ 'description' => '切片起始位置。返回从文件播放开始的毫秒数。', 'type' => 'integer', 'format' => 'int32', 'example' => '0', ], 'ChunkEnd' => [ 'description' => '切片结束位置。返回从文件播放开始的毫秒数。', 'type' => 'integer', 'format' => 'int32', 'example' => '30000', ], 'ChunkSequence' => [ 'description' => '切片在文件中的序号。', 'type' => 'integer', 'format' => 'int32', 'example' => '0', ], 'ChunkContent' => [ 'description' => '切片内容。', 'type' => 'string', 'example' => 'content of chunk', ], 'ChunkSize' => [ 'description' => '切片大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '3452', ], 'ChunkStatus' => [ 'description' => '切片状态。'."\n" ."\n" .'- Enable: 启用。'."\n" .'- Disable: 禁用。', 'type' => 'string', 'example' => 'Enable', ], 'DownloadUrl' => [ 'description' => '切片下载地址。图片和视频文件返回。', 'type' => 'string', 'example' => 'https://cas-documents-service.oss-cn-shanghai.aliyuncs.com/5743962650c522fd54620fb9868d8c4c?Expires=1735092238&OSSAccessKeyId=LTAIgoNm******', ], 'ThumbnailUrl' => [ 'description' => '切片缩略图。图片和视频文件返回。', 'type' => 'string', 'example' => 'https://cas-documents-service.oss-cn-shanghai.aliyuncs.com/5743962650c522fd54620fb9868d8c4c?Expires=1735092238&OSSAccessKeyId=LTAIgoNm******', ], 'ChunkAttachment' => [ 'description' => '切片附件。', 'type' => 'array', 'items' => [ 'description' => '附件信息。', 'type' => 'object', 'properties' => [ 'PlaceholderId' => [ 'description' => '占位符ID。', 'type' => 'string', 'example' => 'IMAGE_PLACEHOLDER_0', ], 'Type' => [ 'description' => '附件类型。', 'type' => 'string', 'example' => 'image', ], 'Uri' => [ 'description' => '附件Uri。', 'type' => 'string', 'example' => 'oss://mybucket/file1/img1.jpg', ], 'DownloadUrl' => [ 'description' => '附件下载地址。', 'type' => 'string', 'example' => 'https://cas-documents-service.oss-cn-shanghai.aliyuncs.com/Batch_Upload_Monitor_Domain.xlsx?Expires=1737338736&OSSAccessKeyId=LTAIgoNm******', ], ], ], ], 'MetaData' => [ 'description' => '原始文件信息。', 'type' => 'object', 'properties' => [ 'FileName' => [ 'description' => '文件名。', 'type' => 'string', 'example' => 'abc.txt', ], 'FileUri' => [ 'description' => '文件路径。', 'type' => 'string', 'example' => 'oss://mybucket/path/abc.txt', ], 'FileMetaId' => [ 'description' => '文件元数据ID。', 'type' => 'string', 'example' => 'sd8c******67ux', ], ], ], ], ], 'KnowledgeBaseJob' => [ 'description' => '知识库任务。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '工作空间ID。', 'type' => 'string', 'example' => '478**', ], 'Accessibility' => [ 'description' => '工作空间可见性,可能值为:'."\n" .'- PRIVATE:在此工作空间中,仅对您和管理员可见。'."\n" .'- PUBLIC:在此工作空间中,对所有人可见。', 'type' => 'string', 'example' => 'PRIVATE', ], 'Creator' => [ 'description' => '创建者用户ID。', 'type' => 'string', 'example' => '2003******4844', ], 'GmtCreateTime' => [ 'description' => '任务创建时间(UTC)。', 'type' => 'string', 'example' => '2024-05-13T01:43:15Z', ], 'GmtModifiedTime' => [ 'description' => '任务更新时间(UTC)。', 'type' => 'string', 'example' => '2024-05-13T03:05:22Z', ], 'KnowledgeBaseId' => [ 'description' => '知识库ID。', 'type' => 'string', 'example' => 'd-ksicx823d', ], 'KnowledgeBaseJobId' => [ 'description' => '知识库任务ID。', 'type' => 'string', 'example' => 'kbjob-9m******54', ], 'JobAction' => [ 'description' => '任务操作类型。'."\n" .'- SyncIndex:更新知识库索引', 'type' => 'string', 'example' => 'SyncIndex', ], 'Description' => [ 'description' => '知识库任务描述。', 'type' => 'string', 'example' => 'This is a description of the knowledge base job.', ], 'Status' => [ 'description' => '知识库任务状态。'."\n" ."\n" .'- Running: 运行中。'."\n" .'- Success: 运行成功。'."\n" .'- Failed: 运行失败。', 'type' => 'string', 'example' => 'Running', ], 'ResourceId' => [ 'description' => '资源ID。', 'type' => 'string', 'example' => 'quota89**76', ], 'EcsSpecs' => [ 'description' => '任务运行机器资源。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型。可能的值为Head和Worker。', 'type' => 'string', 'example' => 'Worker', 'readOnly' => true, 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称。', 'type' => 'string', 'example' => 'ecs.c6.large', 'readOnly' => true, ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'readOnly' => true, ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数。', 'type' => 'integer', 'format' => 'int32', 'example' => '4', 'readOnly' => true, ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'readOnly' => true, ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', 'readOnly' => true, ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存容量大小,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', 'readOnly' => true, ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型。', 'type' => 'string', 'example' => 'V100', 'readOnly' => true, ], 'Driver' => [ 'title' => '驱动版本', 'description' => '驱动版本。', 'type' => 'string', 'example' => '550.127.08', 'readOnly' => true, ], ], ], ], 'UserVpc' => [ 'description' => '资源运行VPC信息。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'VPC ID', 'description' => 'VPC ID。', 'type' => 'string', 'example' => 'vpc-wz90****5v23', ], 'VSwitchId' => [ 'title' => '交换机ID', 'description' => '交换机ID。', 'type' => 'string', 'example' => 'vsw-wz9r****ng10', ], 'SecurityGroupId' => [ 'title' => '安全组ID', 'description' => '安全组ID。', 'type' => 'string', 'example' => 'sg-wz91****e10e', ], ], ], 'MaxRunningTimeInSeconds' => [ 'description' => '任务最大运行时间,单位秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '86400', ], 'GmtFinishTime' => [ 'description' => '任务结束时间(UTC)。', 'type' => 'string', 'example' => '2024-05-13T04:03:27Z', ], 'ErrorMessage' => [ 'description' => '任务异常信息。', 'type' => 'string', 'example' => 'Failed to update knwoledge base index, pipelineRunId: flow-9p8f****4t9z', ], 'PipelineRunInfo' => [ 'description' => '工作流运行信息。', 'type' => 'object', 'properties' => [ 'PipelineRunId' => [ 'title' => 'PaiFlow工作流运行ID', 'description' => 'PaiFlow工作流运行ID', 'type' => 'string', 'example' => 'flow-fi8z******g4gy', 'readOnly' => true, ], ], ], 'KnowledgeBaseJobResult' => [ 'description' => '任务结果。', 'type' => 'object', 'properties' => [ 'TotalFileCount' => [ 'title' => '总处理文件数', 'description' => '总处理文件数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'AddChunkCount' => [ 'title' => '增加Chunk数量', 'description' => '增加分片总量。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'DeleteChunkCount' => [ 'title' => '删除Chunk数量', 'description' => '删除分片总量。', 'type' => 'integer', 'format' => 'int32', 'example' => '2', ], ], ], 'EmbeddingConfig' => [ 'description' => '索引配置。', 'type' => 'object', 'properties' => [ 'BatchSize' => [ 'title' => 'Embedding分批大小', 'description' => '索引分批大小。文档和结构化数据类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'example' => '8', 'readOnly' => true, ], 'Concurrency' => [ 'title' => 'Embedding并发数', 'description' => '索引并发数。图片和视频类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'maximum' => '200', 'minimum' => '1', 'example' => '1', 'readOnly' => true, ], ], ], ], ], 'KnowledgeBaseMeta' => [ 'type' => 'object', 'properties' => [ 'FileMetaId' => [ 'type' => 'string', ], 'FileName' => [ 'type' => 'string', ], 'FileUri' => [ 'type' => 'string', ], 'FileCreateTime' => [ 'type' => 'string', ], 'FileUpdateTime' => [ 'type' => 'string', ], 'FileSize' => [ 'type' => 'integer', 'format' => 'int32', ], 'FileType' => [ 'type' => 'string', ], 'FileContentType' => [ 'type' => 'string', ], 'FileStatus' => [ 'type' => 'string', ], 'FileMetaData' => [ 'type' => 'string', ], 'ChunkId' => [ 'type' => 'string', ], 'ChunkStart' => [ 'type' => 'integer', 'format' => 'int32', ], 'ChunkEnd' => [ 'type' => 'integer', 'format' => 'int32', ], 'ChunkSequence' => [ 'type' => 'integer', 'format' => 'int32', ], 'ChunkContent' => [ 'type' => 'string', ], 'ChunkSize' => [ 'type' => 'integer', 'format' => 'int32', ], 'ChunkStatus' => [ 'type' => 'string', ], 'DownloadUrl' => [ 'type' => 'string', ], 'ThumbnailUrl' => [ 'type' => 'string', ], 'ChunkAttachment' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'PlaceholderId' => [ 'type' => 'string', ], 'Type' => [ 'type' => 'string', ], 'Uri' => [ 'type' => 'string', ], 'DownloadUrl' => [ 'type' => 'string', ], ], ], ], 'MetaData' => [ 'type' => 'object', 'properties' => [ 'FileName' => [ 'type' => 'string', ], 'FileUri' => [ 'type' => 'string', ], 'FileMetaId' => [ 'type' => 'string', ], ], ], ], ], 'Runtime' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'RuntimeId' => [ 'type' => 'string', ], 'RuntimeName' => [ 'type' => 'string', ], 'RuntimeType' => [ 'type' => 'string', ], 'RuntimeStatus' => [ 'type' => 'string', ], 'IdleTimeout' => [ 'type' => 'integer', 'format' => 'int32', ], 'GmtCreateTime' => [ 'type' => 'string', ], 'GmtModifiedTime' => [ 'type' => 'string', ], 'Creator' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'FlowId' => [ 'type' => 'string', ], 'EcsSpec' => [ 'type' => 'object', 'properties' => [ 'InstanceType' => [ 'title' => '实例类型', 'description' => '实例类型', 'type' => 'string', 'readOnly' => true, ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型', 'type' => 'string', 'readOnly' => true, ], 'CPU' => [ 'title' => 'CPU信息', 'description' => 'CPU信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPU' => [ 'title' => 'GPU信息', 'description' => 'GPU信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'Memory' => [ 'title' => '内存信息', 'description' => '内存信息', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'SharedMemory' => [ 'title' => '共享内存', 'description' => '共享内存', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'PodCount' => [ 'title' => 'Pod数量', 'description' => 'Pod数量', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPUMemory' => [ 'title' => 'GPU显存', 'description' => 'GPU显存', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'GPUCorePercentage' => [ 'title' => 'GPU算力占比', 'description' => 'GPU算力占比', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'ExtraEphemeralStorage' => [ 'title' => '额外系统盘', 'description' => '额外系统盘', 'type' => 'integer', 'format' => 'int32', 'readOnly' => true, ], 'QuotaId' => [ 'title' => '资源配额ID', 'description' => '资源配额ID', 'type' => 'string', 'readOnly' => true, ], 'QuotaType' => [ 'title' => '资源配额类型', 'description' => '资源配额类型', 'type' => 'string', 'readOnly' => true, ], ], ], 'ResourceId' => [ 'type' => 'string', ], 'UserVpc' => [ 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'VPC ID', 'description' => 'VPC ID', 'type' => 'string', 'readOnly' => true, ], 'VSwitchId' => [ 'title' => '交换机ID', 'description' => '交换机ID', 'type' => 'string', 'readOnly' => true, ], 'SecurityGroupId' => [ 'title' => '安全组ID', 'description' => '安全组ID', 'type' => 'string', 'readOnly' => true, ], 'DefaultRoute' => [ 'title' => '默认路由', 'description' => '默认路由', 'type' => 'string', 'readOnly' => true, ], 'ExtendedCIDRs' => [ 'title' => '扩展网段', 'description' => '扩展网段', 'type' => 'array', 'items' => [ 'type' => 'string', 'readOnly' => true, ], 'readOnly' => true, ], ], ], 'Envs' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '环境键', 'description' => '环境键', 'type' => 'string', 'readOnly' => true, ], 'Value' => [ 'title' => '环境值', 'description' => '环境值', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'Labels' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '标签键', 'description' => '标签键', 'type' => 'string', 'readOnly' => true, ], 'Value' => [ 'title' => '标签值', 'description' => '标签值', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'DataSources' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'DatasetId' => [ 'title' => '数据集ID', 'description' => '数据集ID', 'type' => 'string', 'readOnly' => true, ], 'Uri' => [ 'title' => '统一资源识别码', 'description' => '统一资源识别码', 'type' => 'string', 'readOnly' => true, ], 'MountPath' => [ 'title' => '挂载路径', 'description' => '挂载路径', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'RunTimeout' => [ 'type' => 'integer', 'format' => 'int32', ], 'CredentialConfig' => [ 'type' => 'object', 'properties' => [ 'EnableCredentialInject' => [ 'title' => '是否启用Credential注入', 'description' => '是否启用Credential注入', 'type' => 'boolean', 'readOnly' => true, ], 'AliyunEnvRoleKey' => [ 'title' => 'AliyunEnvRoleKey', 'description' => 'AliyunEnvRoleKey', 'type' => 'string', 'readOnly' => true, ], 'CredentialConfigItems' => [ 'title' => 'Credential配置项列表', 'description' => 'Credential配置项列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => 'Key', 'description' => 'Key', 'type' => 'string', 'readOnly' => true, ], 'Type' => [ 'title' => 'Type', 'description' => 'Type', 'type' => 'string', 'readOnly' => true, ], 'Roles' => [ 'title' => '角色列表', 'description' => '角色列表', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'AssumeRoleFor' => [ 'title' => 'AssumeRoleFor', 'description' => 'AssumeRoleFor', 'type' => 'string', 'readOnly' => true, ], 'RoleType' => [ 'title' => '角色类型', 'description' => '角色类型', 'type' => 'string', 'readOnly' => true, ], 'RoleArn' => [ 'title' => '角色名称', 'description' => '角色名称', 'type' => 'string', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], ], 'SupportSSEStream' => [ 'type' => 'boolean', ], 'WorkDir' => [ 'type' => 'string', ], 'Flows' => [ 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'FlowId' => [ 'title' => '应用流ID', 'description' => '应用流ID', 'type' => 'string', 'readOnly' => true, ], 'FlowName' => [ 'title' => '应用流名称', 'description' => '应用流名称', 'type' => 'string', 'readOnly' => true, ], ], ], ], 'Version' => [ 'type' => 'string', ], 'LatestVersion' => [ 'type' => 'string', ], 'MCPConfig' => [ 'type' => 'string', ], 'RuntimeLog' => [ 'type' => 'string', ], ], ], 'Snapshot' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'Creator' => [ 'type' => 'string', ], 'GmtCreateTime' => [ 'type' => 'string', ], 'GmtModifiedTime' => [ 'type' => 'string', ], 'SnapshotId' => [ 'type' => 'string', ], 'SnapshotName' => [ 'type' => 'string', ], 'Description' => [ 'type' => 'string', ], 'SnapshotResourceType' => [ 'type' => 'string', ], 'SnapshotResourceId' => [ 'type' => 'string', ], 'CreationType' => [ 'type' => 'string', ], 'SnapshotStoragePath' => [ 'type' => 'string', ], 'WorkDir' => [ 'type' => 'string', ], 'SnapshotUrl' => [ 'type' => 'string', ], ], ], 'Toolset' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'type' => 'string', ], 'Accessibility' => [ 'type' => 'string', ], 'Creator' => [ 'type' => 'string', ], 'GmtCreateTime' => [ 'type' => 'string', ], 'GmtModifiedTime' => [ 'type' => 'string', ], 'ToolsetId' => [ 'type' => 'string', ], 'ToolsetName' => [ 'type' => 'string', ], 'ToolsetType' => [ 'type' => 'string', ], 'ToolsetConfig' => [ 'type' => 'string', ], 'Description' => [ 'type' => 'string', ], 'Tools' => [ 'type' => 'string', ], ], ], 'UserVpc' => [ 'description' => '用户VPC信息。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => '用户VPC的ID', 'description' => '用户VPC的ID', 'type' => 'string', 'example' => 'vpc-m5ec******44cn', ], 'VSwitchId' => [ 'title' => '用户交换机的ID', 'description' => '用户交换机的ID', 'type' => 'string', 'example' => 'vsw-hp32******z9qo', ], 'SecurityGroupId' => [ 'title' => '用户安全组的ID', 'description' => '用户安全组的ID', 'type' => 'string', 'example' => 'sg-bp1f******iy9h', ], ], ], ], ], 'apis' => [ 'CreateKnowledgeBase' => [ 'summary' => '创建一个知识库。', 'path' => '/api/v1/langstudio/knowledgebases', 'methods' => [ 'post', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'write', 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求体。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '工作空间ID。如何获取工作空间ID,请参见[ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => true, 'example' => '478**', ], 'Accessibility' => [ 'description' => '工作空间可见性,可能值为:'."\n" .'- PRIVATE:在此工作空间中,仅对您和管理员可见。'."\n" .'- PUBLIC:在此工作空间中,对所有人可见。', 'type' => 'string', 'required' => false, 'example' => 'PUBLIC', 'default' => 'PUBLIC', 'enum' => [ 'PUBLIC', 'PRIVATE', ], ], 'Name' => [ 'description' => '知识库的名称。命名规则如下:'."\n" .'- 可以包含字母、数字或下划线(_)。'."\n" .'- 以字母开头。'."\n" .'- 长度为1~127个字符。', 'type' => 'string', 'required' => true, 'example' => 'myName', ], 'Description' => [ 'description' => '对知识库进行自定义描述。', 'type' => 'string', 'required' => false, 'example' => 'This is a description of the knowledge base.', ], 'KnowledgeBaseType' => [ 'description' => '知识库类型。支持以下取值:'."\n" .'- TEXT:文档。'."\n" .'- STRUCTURED:结构化数据。'."\n" .'- IMAGE:图片。'."\n" .'- VIDEO:视频。', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'STRUCTURED' => 'STRUCTURED', 'IMAGE' => 'IMAGE', 'VIDEO' => 'VIDEO', 'TEXT' => 'TEXT', ], 'example' => 'TEXT', ], 'OutputDir' => [ 'description' => '输出数据的存储路径。', 'type' => 'string', 'required' => true, 'example' => 'oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/output/', ], 'DataSources' => [ 'description' => '数据源。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Uri' => [ 'title' => '统一资源识别码', 'description' => '源文件存储路径。', 'type' => 'string', 'required' => false, 'example' => 'oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/source/', 'readOnly' => true, ], ], 'required' => false, ], 'required' => true, ], 'ChunkConfig' => [ 'description' => '文件切片配置。', 'type' => 'object', 'properties' => [ 'ChunkSize' => [ 'title' => '分块大小', 'description' => '分块大小', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1024', 'readOnly' => true, ], 'ChunkOverlap' => [ 'title' => '分块重叠大小', 'description' => '分块重叠大小', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '200', 'readOnly' => true, ], 'ChunkDuration' => [ 'title' => '分块时长', 'description' => '分块时长,单位秒。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '30', 'readOnly' => true, ], 'ChunkStrategy' => [ 'title' => '分块策略', 'description' => '分块策略。支持的策略如下:'."\n" .'- Default。系统默认切片策略。'."\n" .'- Asr。按音频内容切分,视频知识库有效。', 'type' => 'string', 'required' => false, 'example' => 'Default', 'readOnly' => true, 'default' => 'Default', ], ], 'required' => true, ], 'EmbeddingConfig' => [ 'description' => '向量索引配置。', 'type' => 'object', 'properties' => [ 'ConnectionId' => [ 'title' => 'Embedding连接ID', 'description' => '索引服务连接ID。如何获取连接ID请参见[ListConnections](~~2922801~~)。'."\n" .'各类型知识库支持的连接类型如下:'."\n" .'- 文档:百炼大模型服务、通用Embedding模型服务、AI搜索开放平台模型服务。'."\n" .'- 结构化数据:百炼大模型服务、通用Embedding模型服务、AI搜索开放平台模型服务。'."\n" .'- 图片:百炼大模型服务、通用多模态Embedding模型服务。'."\n" .'- 视频:百炼大模型服务。', 'type' => 'string', 'required' => true, 'example' => 'conn-r3o7******38bh', 'readOnly' => true, ], 'Model' => [ 'title' => '模型', 'description' => '模型名称。特别的,当选择百炼大模型服务时,各类型知识库支持的模型如下:'."\n" .'- 文档:text-embedding-v1、text-embedding-v2、text-embedding-v3、text-embedding-v4'."\n" .'- 结构化数据:text-embedding-v1、text-embedding-v2、text-embedding-v3、text-embedding-v4'."\n" .'- 图片:multimodal-embedding-v1'."\n" .'- 视频:qwen2.5-vl-embedding', 'type' => 'string', 'required' => true, 'example' => 'text-embedding-v4', 'readOnly' => true, ], ], 'required' => true, ], 'VectorDBConfig' => [ 'description' => '向量库配置。', 'type' => 'object', 'properties' => [ 'VectorDBType' => [ 'title' => 'VectorDB类型', 'description' => '向量数据库类型。支持以下取值:'."\n" .'- Elasticsearch'."\n" .'- Milvus'."\n" .'- Faiss(仅文档和结构化数据知识库支持)', 'type' => 'string', 'required' => true, 'enumValueTitles' => [ 'Elasticsearch' => 'Elasticsearch', 'Faiss' => 'Faiss', 'Milvus' => 'Milvus', ], 'example' => 'Milvus', 'readOnly' => true, ], 'ConnectionId' => [ 'title' => 'Embedding连接ID', 'description' => '向量数据库连接ID。如何获取连接ID请参见[ListConnections](~~2922801~~)。', 'type' => 'string', 'required' => false, 'example' => 'conn-7y5y******jja7', 'readOnly' => true, ], 'CollectionName' => [ 'title' => 'Collection名称', 'description' => '向量库的表或集合名称。', 'type' => 'string', 'required' => false, 'example' => 'my_collection', 'readOnly' => true, ], ], 'required' => true, ], 'RuntimeId' => [ 'description' => '运行时ID。', 'type' => 'string', 'required' => false, 'example' => 'rtime-apje******beaz', ], 'MetaDataConfig' => [ 'description' => '元数据配置。', 'type' => 'object', 'properties' => [ 'CustomMetaData' => [ 'title' => '自定义元数据', 'description' => '自定义元数据。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '元数据Key', 'description' => '元数据字段名称。', 'type' => 'string', 'required' => false, 'example' => 'author', ], 'ValueType' => [ 'title' => '元数据Value类型', 'description' => '元数据字段类型。目前只支持String类型。', 'type' => 'string', 'required' => false, 'example' => 'String', ], ], 'required' => false, ], 'required' => false, ], ], 'required' => false, ], 'IndexColumnConfig' => [ 'description' => '结构化知识库字段列配置。', 'type' => 'object', 'properties' => [ 'EmbeddingColumns' => [ 'title' => 'Embedding列', 'description' => '向量检索列。该列表中的字段会进行向量化并参与检索。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'required' => false, 'example' => 'column1', 'readOnly' => true, ], ], 'required' => false, 'readOnly' => true, ], 'required' => false, 'readOnly' => true, ], 'ContentColumns' => [ 'title' => '内容检索列', 'description' => '内容过滤列。该列表中的字段支持按照关键字进行检索。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'required' => false, 'example' => 'column1', 'readOnly' => true, ], ], 'required' => false, 'readOnly' => true, ], 'required' => false, 'readOnly' => true, ], 'ColumnDefinitions' => [ 'title' => '所有列名', 'description' => '所有列名。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'required' => false, 'example' => 'column1', 'readOnly' => true, ], ], 'required' => false, 'readOnly' => true, ], 'required' => false, 'readOnly' => true, ], ], 'required' => false, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '知识库所属的工作空间 ID。', 'type' => 'string', 'example' => '478**', ], 'KnowledgeBaseId' => [ 'description' => '知识库ID。', 'type' => 'string', 'example' => 'd-ksicx823d', ], 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID', 'type' => 'string', 'example' => '48E6392E-C3C9-5212-9FAD-13256ABD9AF6', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"WorkspaceId\\": \\"478**\\",\\n \\"KnowledgeBaseId\\": \\"d-ksicx823d\\",\\n \\"RequestId\\": \\"48E6392E-C3C9-5212-9FAD-13256ABD9AF6\\"\\n}","type":"json"}]', 'title' => '创建知识库', ], 'GetKnowledgeBase' => [ 'summary' => '获取知识库。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}', 'methods' => [ 'get', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'query', 'schema' => [ 'description' => '工作空间ID。如何获取工作空间ID,请参见[ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => true, 'example' => '478**', ], ], [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-ksicx823d', ], ], [ 'name' => 'VersionName', 'in' => 'query', 'schema' => [ 'description' => '知识库版本。默认为v1。', 'type' => 'string', 'required' => false, 'example' => 'v1', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '963BD7F9-0C02-5594-9550-BCC6DD43E3C0', ], 'WorkspaceId' => [ 'description' => '知识库所在工作空间ID。', 'type' => 'string', 'example' => '478**', ], 'Accessibility' => [ 'description' => '工作空间可见性,可能值为:'."\n" .'- PRIVATE:在此工作空间中,仅对您和管理员可见。'."\n" .'- PUBLIC:在此工作空间中,对所有人可见。', 'type' => 'string', 'example' => 'PRIVATE', ], 'GmtCreateTime' => [ 'description' => '知识库创建时间(UTC)。', 'type' => 'string', 'example' => '2024-12-15T14:46:23Z', ], 'GmtModifiedTime' => [ 'description' => '知识库修改时间(UTC)。', 'type' => 'string', 'example' => '2025-12-18T19:32:58Z', ], 'Name' => [ 'description' => '知识库名称。', 'type' => 'string', 'example' => 'myName', ], 'KnowledgeBaseId' => [ 'description' => '知识库ID。', 'type' => 'string', 'example' => 'd-ksicx823d', ], 'Description' => [ 'description' => '知识库描述。', 'type' => 'string', 'example' => 'This is a description of the knowledge base.', ], 'KnowledgeBaseType' => [ 'description' => '知识库类型。'."\n" .'- TEXT:文档。'."\n" .'- STRUCTURED:结构化数据。'."\n" .'- IMAGE:图片。'."\n" .'- VIDEO:视频。', 'type' => 'string', 'example' => 'TEXT', ], 'DatasetId' => [ 'description' => '知识库对应的数据集ID。', 'type' => 'string', 'example' => 'd-cupbwkk5us9xpjz870', ], 'DataSources' => [ 'description' => '数据源。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Uri' => [ 'title' => '统一资源识别码', 'description' => '源文件存储路径。', 'type' => 'string', 'example' => 'oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/source/', 'readOnly' => true, ], ], ], ], 'OutputDir' => [ 'description' => '输出数据的存储路径。', 'type' => 'string', 'example' => 'oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/output/', ], 'ChunkConfig' => [ 'description' => '文件切片配置。', 'type' => 'object', 'properties' => [ 'ChunkSize' => [ 'title' => '分块大小', 'description' => '分块大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '1024', 'readOnly' => true, ], 'ChunkOverlap' => [ 'title' => '分块重叠大小', 'description' => '分块重叠大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '200', 'readOnly' => true, ], 'ChunkDuration' => [ 'title' => '分块时长', 'description' => '分块时长,单位秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '30', 'readOnly' => true, ], 'ChunkStrategy' => [ 'title' => '分块策略', 'description' => '分块策略。策略类型如下:'."\n" .'- Default。系统默认切片策略。'."\n" .'- Asr。按音频内容切分,视频知识库有效。', 'type' => 'string', 'example' => 'Default', 'readOnly' => true, 'default' => 'Default', ], ], ], 'EmbeddingConfig' => [ 'description' => '向量索引配置。', 'type' => 'object', 'properties' => [ 'ConnectionName' => [ 'title' => 'Embedding连接名称', 'description' => '索引服务连接名称。', 'type' => 'string', 'example' => 'myEmbeddingConn', ], 'ConnectionId' => [ 'title' => 'Embedding连接ID', 'description' => '索引服务连接ID。', 'type' => 'string', 'example' => 'conn-r3o7******38bh', ], 'Model' => [ 'title' => '模型', 'description' => '模型名称。', 'type' => 'string', 'example' => 'text-embedding-v4', ], ], ], 'VectorDBConfig' => [ 'description' => '向量库配置。', 'type' => 'object', 'properties' => [ 'VectorDBType' => [ 'title' => 'VectorDB类型', 'description' => '向量数据库类型。支持以下取值:'."\n" .'- Elasticsearch'."\n" .'- Milvus'."\n" .'- Faiss', 'type' => 'string', 'example' => 'Milvus', ], 'ConnectionName' => [ 'title' => 'VectorDB连接名称', 'description' => '向量数据库连接名称。', 'type' => 'string', 'example' => 'myVectorConn', ], 'ConnectionId' => [ 'title' => 'Embedding连接ID', 'description' => '向量数据库连接ID。', 'type' => 'string', 'example' => 'conn-7y5y******jja7', ], 'CollectionName' => [ 'title' => 'Collection名称', 'description' => '向量数据库表或集合名称。', 'type' => 'string', 'example' => 'my_collection', ], ], ], 'Creator' => [ 'description' => '创建者用户ID。', 'type' => 'string', 'example' => '2485765****023475', ], 'RuntimeId' => [ 'description' => '运行时ID。', 'type' => 'string', 'example' => 'rtime-apje******beaz', ], 'MetaDataConfig' => [ 'description' => '元数据配置。', 'type' => 'object', 'properties' => [ 'CustomMetaData' => [ 'title' => '自定义元数据', 'description' => '自定义元数据。', 'type' => 'array', 'items' => [ 'description' => '自定义元数据。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '元数据Key', 'description' => '元数据字段名称。', 'type' => 'string', 'example' => 'author', ], 'ValueType' => [ 'title' => '元数据Value类型', 'description' => '元数据字段类型。', 'type' => 'string', 'example' => 'String', ], 'ReferenceCount' => [ 'title' => '引用次数', 'description' => '引用次数。', 'type' => 'integer', 'format' => 'int32', 'example' => '5', 'readOnly' => true, ], 'ValueCount' => [ 'title' => '值的个数', 'description' => '值的个数。', 'type' => 'integer', 'format' => 'int32', 'example' => '3', 'readOnly' => true, ], ], ], ], ], ], 'AutoUpdateConfig' => [ 'description' => '知识库自动更新配置。', 'type' => 'object', 'properties' => [ 'Status' => [ 'title' => '知识库自动更新状态', 'description' => '知识库自动更新开关状态。'."\n" .'- Enable: 开启自动更新。'."\n" .'- Disable: 关闭自动更新。', 'type' => 'string', 'enumValueTitles' => [ 'Enable' => 'Enable', 'Disable' => 'Disable', ], 'example' => 'Enable', 'default' => 'Disable', ], 'ResourceId' => [ 'title' => '资源组ID', 'description' => '资源组ID。为空或public-cluster表示公共资源。', 'type' => 'string', 'example' => 'quota89**76', ], 'MaxRunningTimeInSeconds' => [ 'title' => '任务最大运行时间', 'description' => '任务最大运行时间,单位秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '86400', ], 'EmbeddingConfig' => [ 'title' => 'Embedding配置', 'description' => '向量索引配置。', 'type' => 'object', 'properties' => [ 'BatchSize' => [ 'title' => 'Embedding分批大小', 'description' => '索引分批大小。文档和结构化数据类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'example' => '8', ], 'Concurrency' => [ 'title' => 'Embedding并发数', 'description' => '索引并发数。图片和视频类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'maximum' => '200', 'minimum' => '1', 'example' => '1', ], ], ], 'UserVpc' => [ 'title' => '用户VPC配置', 'description' => '用户VPC配置。', '$ref' => '#/components/schemas/UserVpc', ], 'EcsSpecs' => [ 'title' => '运行资源配置', 'description' => '运行资源配置列表。', 'type' => 'array', 'items' => [ 'description' => '运行资源。', 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型。可能的取值为Head和Worker。', 'type' => 'string', 'example' => 'Worker', 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称。', 'type' => 'string', 'example' => 'ecs.c6.large', ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型。', 'type' => 'string', 'example' => 'V100', ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数。', 'type' => 'integer', 'format' => 'int32', 'example' => '4', ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存大小,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', ], 'Driver' => [ 'title' => '驱动版本', 'description' => 'GPU驱动版本。', 'type' => 'string', 'example' => '550.127.08', ], ], ], ], ], ], 'VersionName' => [ 'description' => '知识库版本。默认为v1。', 'type' => 'string', 'example' => 'v1', ], 'IndexColumnConfig' => [ 'description' => '列字段配置。结构化数据类型知识库有效。', 'type' => 'object', 'properties' => [ 'EmbeddingColumns' => [ 'title' => 'Embedding列', 'description' => '向量索引列。该列表中的字段会进行向量化并参与检索。', 'type' => 'array', 'items' => [ 'description' => '向量检索列。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'example' => 'column1', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], 'ContentColumns' => [ 'title' => '内容检索列', 'description' => '内容过滤列。该列表中的字段支持按照关键字进行检索。', 'type' => 'array', 'items' => [ 'description' => '内容过滤列。', 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'example' => 'column1', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], 'ColumnDefinitions' => [ 'title' => '所有列名', 'description' => '所有列名。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '列Key', 'description' => '列名。', 'type' => 'string', 'example' => 'column1', 'readOnly' => true, ], ], 'readOnly' => true, ], 'readOnly' => true, ], ], ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"963BD7F9-0C02-5594-9550-BCC6DD43E3C0\\",\\n \\"WorkspaceId\\": \\"478**\\",\\n \\"Accessibility\\": \\"PRIVATE\\",\\n \\"GmtCreateTime\\": \\"2024-12-15T14:46:23Z\\",\\n \\"GmtModifiedTime\\": \\"2025-12-18T19:32:58Z\\",\\n \\"Name\\": \\"myName\\",\\n \\"KnowledgeBaseId\\": \\"d-ksicx823d\\",\\n \\"Description\\": \\"This is a description of the knowledge base.\\",\\n \\"KnowledgeBaseType\\": \\"TEXT\\",\\n \\"DatasetId\\": \\"d-cupbwkk5us9xpjz870\\",\\n \\"DataSources\\": [\\n {\\n \\"Uri\\": \\"oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/source/\\"\\n }\\n ],\\n \\"OutputDir\\": \\"oss://test-bucket.oss-cn-hangzhou-internal.aliyuncs.com/langstudio/output/\\",\\n \\"ChunkConfig\\": {\\n \\"ChunkSize\\": 1024,\\n \\"ChunkOverlap\\": 200,\\n \\"ChunkDuration\\": 30,\\n \\"ChunkStrategy\\": \\"Default\\"\\n },\\n \\"EmbeddingConfig\\": {\\n \\"ConnectionName\\": \\"myEmbeddingConn\\",\\n \\"ConnectionId\\": \\"conn-r3o7******38bh\\",\\n \\"Model\\": \\"text-embedding-v4\\"\\n },\\n \\"VectorDBConfig\\": {\\n \\"VectorDBType\\": \\"Milvus\\",\\n \\"ConnectionName\\": \\"myVectorConn\\",\\n \\"ConnectionId\\": \\"conn-7y5y******jja7\\",\\n \\"CollectionName\\": \\"my_collection\\"\\n },\\n \\"Creator\\": \\"2485765****023475\\",\\n \\"RuntimeId\\": \\"rtime-apje******beaz\\",\\n \\"MetaDataConfig\\": {\\n \\"CustomMetaData\\": [\\n {\\n \\"Key\\": \\"author\\",\\n \\"ValueType\\": \\"String\\",\\n \\"ReferenceCount\\": 5,\\n \\"ValueCount\\": 3\\n }\\n ]\\n },\\n \\"AutoUpdateConfig\\": {\\n \\"Status\\": \\"Enable\\",\\n \\"ResourceId\\": \\"quota89**76\\",\\n \\"MaxRunningTimeInSeconds\\": 86400,\\n \\"EmbeddingConfig\\": {\\n \\"BatchSize\\": 8,\\n \\"Concurrency\\": 1\\n },\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"\\",\\n \\"VSwitchId\\": \\"\\",\\n \\"SecurityGroupId\\": \\"\\"\\n },\\n \\"EcsSpecs\\": [\\n {\\n \\"Type\\": \\"Worker\\",\\n \\"InstanceType\\": \\"ecs.c6.large\\",\\n \\"PodCount\\": 1,\\n \\"GPUType\\": \\"V100\\",\\n \\"CPU\\": 4,\\n \\"GPU\\": 1,\\n \\"Memory\\": 16,\\n \\"SharedMemory\\": 16,\\n \\"Driver\\": \\"550.127.08\\"\\n }\\n ]\\n },\\n \\"VersionName\\": \\"v1\\",\\n \\"IndexColumnConfig\\": {\\n \\"EmbeddingColumns\\": [\\n {\\n \\"Key\\": \\"column1\\"\\n }\\n ],\\n \\"ContentColumns\\": [\\n {\\n \\"Key\\": \\"column1\\"\\n }\\n ],\\n \\"ColumnDefinitions\\": [\\n {\\n \\"Key\\": \\"column1\\"\\n }\\n ]\\n }\\n}","type":"json"}]', 'title' => '获取知识库', ], 'UpdateKnowledgeBase' => [ 'summary' => '更新知识库。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}', 'methods' => [ 'put', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'readAndWrite', 'systemTags' => [ 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-nacr******sxd2', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求体。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '工作空间ID。', 'type' => 'string', 'required' => true, 'example' => '285773', ], 'Description' => [ 'description' => '知识库描述。', 'type' => 'string', 'required' => false, 'example' => 'This is a description of the knowledge base.', ], 'RuntimeId' => [ 'description' => '运行时ID。', 'type' => 'string', 'required' => false, 'example' => 'rtime-231x****tmo4', ], 'BindRuntime' => [ 'description' => '是否绑定运行时。', 'type' => 'boolean', 'required' => false, 'example' => 'true', ], 'MetaDataConfig' => [ 'description' => '元数据配置。', 'type' => 'object', 'properties' => [ 'CustomMetaData' => [ 'title' => '自定义元数据', 'description' => '自定义元数据。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Key' => [ 'title' => '元数据Key', 'description' => '元数据字段名称。', 'type' => 'string', 'required' => false, 'example' => 'author', ], 'ValueType' => [ 'title' => '元数据Value类型', 'description' => '元数据字段类型。目前只支持String类型。', 'type' => 'string', 'required' => false, 'example' => 'String', ], ], 'required' => false, ], 'required' => false, ], ], 'required' => false, ], 'AutoUpdateConfig' => [ 'description' => '知识库自动更新配置。', 'type' => 'object', 'properties' => [ 'Status' => [ 'title' => '知识库自动更新状态', 'description' => '知识库自动更新开关状态。'."\n" .'- Enable: 开启自动更新。'."\n" .'- Disable: 关闭自动更新。', 'type' => 'string', 'required' => false, 'example' => 'Enable', 'default' => 'Disable', ], 'ResourceId' => [ 'title' => '资源组ID', 'description' => '资源组ID。为空或public-cluster表示公共资源。', 'type' => 'string', 'required' => false, 'example' => 'quota89**76', ], 'MaxRunningTimeInSeconds' => [ 'title' => '任务最大运行时间', 'description' => '任务最大运行时间,单位秒。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '86400', ], 'EmbeddingConfig' => [ 'title' => 'Embedding配置', 'description' => '向量索引配置。', 'type' => 'object', 'properties' => [ 'BatchSize' => [ 'title' => 'Embedding分批大小', 'description' => '索引分批大小。文档和结构化数据类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '8', ], 'Concurrency' => [ 'title' => 'Embedding并发数', 'description' => '索引并发数。图片和视频类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '200', 'minimum' => '1', 'example' => '1', ], ], 'required' => false, ], 'UserVpc' => [ 'title' => '用户VPC配置', 'description' => '用户VPC配置。', 'required' => false, '$ref' => '#/components/schemas/UserVpc', ], 'EcsSpecs' => [ 'title' => '运行资源配置', 'description' => '运行资源配置列表。文档和结构化知识库仅包含1个元素且**Type**为Worker,图片和视频知识库含2个元素且**Type**分别为 Head 和 Worker。', 'type' => 'array', 'items' => [ 'description' => '运行资源。', 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型。可能的取值为Head和Worker。', 'type' => 'string', 'required' => false, 'example' => 'Worker', 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称。', 'type' => 'string', 'required' => false, 'example' => 'ecs.c6.large', ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型。', 'type' => 'string', 'required' => false, 'example' => 'V100', ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '4', ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小,单位GB。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '16', ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存容量,单位GB。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '16', ], 'Driver' => [ 'title' => '驱动版本', 'description' => '驱动版本。', 'type' => 'string', 'required' => false, 'example' => '550.127.08', ], ], 'required' => false, ], 'required' => false, ], ], 'required' => false, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'description' => '响应体。', 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '48E6392E-C3C9-5212-9FAD-13256ABD9AF6', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"48E6392E-C3C9-5212-9FAD-13256ABD9AF6\\"\\n}","type":"json"}]', 'title' => '更新知识库', ], 'DeleteKnowledgeBase' => [ 'summary' => '删除知识库。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}', 'methods' => [ 'delete', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'write', 'systemTags' => [ 'operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'query', 'schema' => [ 'description' => '工作空间ID。', 'type' => 'string', 'required' => true, 'example' => '478***', ], ], [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-nacr******sxd2', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID', 'type' => 'string', 'example' => 'C25324E3-18E6-50D8-9026-16D74AAEEB26', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C25324E3-18E6-50D8-9026-16D74AAEEB26\\"\\n}","type":"json"}]', 'title' => '删除知识库', ], 'ListKnowledgeBases' => [ 'summary' => '获取知识库列表。', 'path' => '/api/v1/langstudio/knowledgebases', 'methods' => [ 'get', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'systemTags' => [ 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'query', 'schema' => [ 'description' => '工作空间ID。如何获取工作空间ID,请参见 [ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => false, 'example' => '478***', ], ], [ 'name' => 'Name', 'in' => 'query', 'schema' => [ 'description' => '知识库名称。', 'type' => 'string', 'required' => false, 'example' => 'myName', ], ], [ 'name' => 'KnowledgeBaseId', 'in' => 'query', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => false, 'example' => 'd-nacr******sxd2', ], ], [ 'name' => 'NextToken', 'in' => 'query', 'schema' => [ 'description' => '用来标记当前开始读取的位置,置空表示从头开始。', 'type' => 'string', 'required' => false, 'example' => '10', ], ], [ 'name' => 'MaxResults', 'in' => 'query', 'schema' => [ 'description' => '使用 NextToken 方式查询时,每次最多返回的结果数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20', ], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => [ 'description' => '排序字段。目前只支持GmtCreateTime。', 'type' => 'string', 'required' => false, 'example' => 'GmtCreateTime', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ 'description' => '排序方式。'."\n" ."\n" .'- ASC:升序。'."\n" .'- DESC:降序。', 'type' => 'string', 'required' => false, 'example' => 'DESC', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'description' => '当前页数。 取值范围:大于0。 默认值:1。如果同时传入MaxResults,则使用NextToken查询方式,忽略此字段值。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'description' => '每页查询的数量。如果同时传入 MaxResults,则以 MaxResults 数量为准。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], [ 'name' => 'Creator', 'in' => 'query', 'schema' => [ 'description' => '创建者用户ID。', 'type' => 'string', 'required' => false, 'example' => '2680******4103', ], ], [ 'name' => 'KnowledgeBaseType', 'in' => 'query', 'schema' => [ 'description' => '知识库类型。'."\n" .'- TEXT:文档。'."\n" .'- STRUCTURED:结构化数据。'."\n" .'- IMAGE:图片。'."\n" .'- VIDEO:视频。', 'type' => 'string', 'required' => false, 'example' => 'TEXT', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'KnowledgeBases' => [ 'description' => '知识库列表。', 'type' => 'array', 'items' => [ 'description' => '知识库详情。', '$ref' => '#/components/schemas/KnowledgeBase', ], ], 'MaxResults' => [ 'title' => '请求最大返回结果数', 'description' => '本次请求允许返回的最大记录条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20', ], 'NextToken' => [ 'title' => '下次请求令牌', 'description' => '返回下一次查询开始的位置。为空表示已经获取了全部数据。', 'type' => 'string', 'example' => '20', ], 'TotalCount' => [ 'title' => '总量', 'description' => '总记录条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '51', ], 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '35686626-8D83-5ADE-B400-08A6613A6057', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"KnowledgeBases\\": [\\n {\\n \\"WorkspaceId\\": \\"\\",\\n \\"Accessibility\\": \\"\\",\\n \\"GmtCreateTime\\": \\"\\",\\n \\"GmtModifiedTime\\": \\"\\",\\n \\"Name\\": \\"\\",\\n \\"KnowledgeBaseId\\": \\"\\",\\n \\"Description\\": \\"\\",\\n \\"KnowledgeBaseType\\": \\"\\",\\n \\"DatasetId\\": \\"\\",\\n \\"DataSources\\": [\\n {\\n \\"Uri\\": \\"\\"\\n }\\n ],\\n \\"OutputDir\\": \\"\\",\\n \\"ChunkConfig\\": {\\n \\"ChunkSize\\": 0,\\n \\"ChunkOverlap\\": 0,\\n \\"ChunkDuration\\": 0,\\n \\"ChunkStrategy\\": \\"\\"\\n },\\n \\"EmbeddingConfig\\": {\\n \\"EmbeddingType\\": \\"\\",\\n \\"ConnectionName\\": \\"\\",\\n \\"ConnectionId\\": \\"\\",\\n \\"Model\\": \\"\\"\\n },\\n \\"VectorDBConfig\\": {\\n \\"VectorDBType\\": \\"\\",\\n \\"ConnectionName\\": \\"\\",\\n \\"ConnectionId\\": \\"\\",\\n \\"CollectionName\\": \\"\\"\\n },\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"\\"\\n },\\n \\"Creator\\": \\"\\",\\n \\"RuntimeId\\": \\"\\",\\n \\"ScheduleConfig\\": {\\n \\"InstanceMode\\": \\"\\",\\n \\"Recurrence\\": \\"\\",\\n \\"RerunMode\\": \\"\\",\\n \\"FailureRerunConfig\\": {\\n \\"RerunTimes\\": 0,\\n \\"RerunInterval\\": 0\\n },\\n \\"Timeout\\": 0,\\n \\"TriggerConfig\\": {\\n \\"Cron\\": \\"\\",\\n \\"StartTime\\": \\"\\",\\n \\"EndTime\\": \\"\\"\\n },\\n \\"ResourceGroupConfig\\": {\\n \\"ResourceGroup\\": \\"\\",\\n \\"Id\\": \\"\\"\\n },\\n \\"EcsSpecs\\": [\\n {\\n \\"Type\\": \\"\\",\\n \\"InstanceType\\": \\"\\",\\n \\"PodCount\\": 0,\\n \\"CPU\\": 0,\\n \\"GPU\\": 0,\\n \\"Memory\\": 0,\\n \\"SharedMemory\\": 0,\\n \\"GPUType\\": \\"\\",\\n \\"Driver\\": \\"\\"\\n }\\n ],\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"\\",\\n \\"VSwitchId\\": \\"\\",\\n \\"SecurityGroupId\\": \\"\\"\\n },\\n \\"ResourceId\\": \\"\\",\\n \\"Status\\": \\"\\",\\n \\"GmtCreateTime\\": \\"\\",\\n \\"GmtModifiedTime\\": \\"\\",\\n \\"ScheduleWorkflowId\\": \\"\\",\\n \\"ScheduleCycleTaskId\\": \\"\\"\\n },\\n \\"MetaDataConfig\\": {\\n \\"CustomMetaData\\": [\\n {\\n \\"Key\\": \\"\\",\\n \\"ValueType\\": \\"\\",\\n \\"ReferenceCount\\": 0,\\n \\"ValueCount\\": 0\\n }\\n ]\\n },\\n \\"AutoUpdateConfig\\": {\\n \\"Status\\": \\"\\",\\n \\"ResourceId\\": \\"\\",\\n \\"MaxRunningTimeInSeconds\\": 0,\\n \\"EmbeddingConfig\\": {\\n \\"BatchSize\\": 0,\\n \\"Concurrency\\": 0\\n },\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"\\",\\n \\"VSwitchId\\": \\"\\",\\n \\"SecurityGroupId\\": \\"\\"\\n },\\n \\"EcsSpecs\\": [\\n {\\n \\"Type\\": \\"\\",\\n \\"InstanceType\\": \\"\\",\\n \\"PodCount\\": 0,\\n \\"GPUType\\": \\"\\",\\n \\"CPU\\": 0,\\n \\"GPU\\": 0,\\n \\"Memory\\": 0,\\n \\"SharedMemory\\": 0,\\n \\"Driver\\": \\"\\"\\n }\\n ]\\n },\\n \\"VersionName\\": \\"\\",\\n \\"IndexColumnConfig\\": {\\n \\"EmbeddingColumns\\": [\\n {\\n \\"Key\\": \\"\\"\\n }\\n ],\\n \\"ContentColumns\\": [\\n {\\n \\"Key\\": \\"\\"\\n }\\n ],\\n \\"ColumnDefinitions\\": [\\n {\\n \\"Key\\": \\"\\"\\n }\\n ]\\n },\\n \\"IndexManifest\\": \\"\\"\\n }\\n ],\\n \\"MaxResults\\": 20,\\n \\"NextToken\\": \\"20\\",\\n \\"TotalCount\\": 51,\\n \\"RequestId\\": \\"35686626-8D83-5ADE-B400-08A6613A6057\\"\\n}","type":"json"}]', 'title' => '获取知识库列表', ], 'RetrieveKnowledgeBase' => [ 'summary' => '检索知识库。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/action/retrieve', 'methods' => [ 'post', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'systemTags' => [ 'operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => false, 'example' => 'd-ksicx823d', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求体。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '知识库所在工作空间ID。', 'type' => 'string', 'required' => true, 'example' => '174***', ], 'Query' => [ 'description' => '检索内容。', 'type' => 'string', 'required' => true, 'example' => 'red car', ], 'TopK' => [ 'description' => '返回排名最高的结果数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '5', ], 'ScoreThreshold' => [ 'description' => '相似度分数阈值。浮点型,取值范围[0, 1]。', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0.5', ], 'MetaDataFilterConditions' => [ 'description' => '选填。元数据过滤检索条件。格式为JSON格式字符串,JSON字段定义如下:'."\n" ."\n" .'- FilterCondition: 逻辑关系,取值:and、or。'."\n" .'- MetaDataFilters:过滤条件。多个条件之间按FilterCondition的逻辑关系处理。其中Key表示元数据Key;Value表示元数据值;Operator表示运算符,取值:==、!=、contains,contains仅支持file_name字段。', 'type' => 'string', 'required' => false, 'example' => '{'."\n" .' "FilterCondition": "and", '."\n" .' "MetaDataFilters": ['."\n" .' {'."\n" .' "Key": "key1", '."\n" .' "Value": "value1", '."\n" .' "Operator": "=="'."\n" .' },'."\n" .' {'."\n" .' "Key": "key2", '."\n" .' "Value": "value2", '."\n" .' "Operator": "!="'."\n" .' },'."\n" .' {'."\n" .' "Key": "file_name", '."\n" .' "Value": "prefix", '."\n" .' "Operator": "contains"'."\n" .' }'."\n" .' ]'."\n" .'}', ], 'QueryMode' => [ 'description' => '检索模式。'."\n" ."\n" .'- dense: 语义检索。'."\n" .'- hybrid: 混合检索。', 'type' => 'string', 'required' => false, 'enumValueTitles' => [ 'hybrid' => 'hybrid', 'dense' => 'dense', ], 'example' => 'dense', ], 'VersionName' => [ 'description' => '知识库版本。默认v1。', 'type' => 'string', 'required' => false, 'example' => 'v1', ], 'RerankConfig' => [ 'description' => 'Rerank配置,选填。JSON格式字符串,JSON字段定义如下:'."\n" ."\n" .'- ConnectionId:模型服务连接ID'."\n" ."\n" .'- Model:模型名称。若为百炼类型连接,支持的模型为 gte-rerank-v2'."\n" ."\n" .'- TopK:返回排名最高的结果数', 'type' => 'string', 'required' => false, 'example' => '{'."\n" .' "ConnectionId":"conn-xxx",'."\n" .' "Model": "qwen-max",'."\n" .' "TopK": 5'."\n" .'}', ], 'RewriteConfig' => [ 'description' => 'Rewrite配置,选填。JSON格式字符串,JSON字段定义如下:'."\n" ."\n" .'- ConnectionId:模型服务连接ID'."\n" ."\n" .'- Model:模型名称。百炼连接支持的模型为qwen3-max、qwen-plus、qwen-flash'."\n" ."\n" .'- Temprature:用于控制大模型生成内容的随机性,值越高结果越随机。取值范围 [0, 2.0]。'."\n" ."\n" .'- TopP:生成过程中的核采样方法概率阈值,取值范围 [0, 1.0]'."\n" ."\n" .'- PresensePenalty:存在惩罚,取值范围 [-2.0, 2.0]'."\n" ."\n" .'- FrequencyPenalty:频率惩罚,取值范围 [-2.0~2.0]'."\n" ."\n" .'- Seed:随机数种子,取值范围 [0, 2147483647]'."\n" ."\n" .'- MaxTokens:控制模型生成结果的长度'."\n" ."\n" .'- Stop:停止序列列表。遇到列表中的任何一个序列,模型停止输出。最多支持4个序列。'."\n" ."\n" .'- EnableThingking:是否启用推理', 'type' => 'string', 'required' => false, 'example' => '{'."\n" .' "ConnectionId":"conn-xxx",'."\n" .' "Model": "qwen-max",'."\n" .' "Temperature": 0.7,'."\n" .' "TopP": 0.9,'."\n" .' "PresencePenalty": 0.5,'."\n" .' "FrequencyPenalty": 0.5,'."\n" .' "Seed": 0,'."\n" .' "MaxTokens": 1024,'."\n" .' "Stop": [],'."\n" .' "EnableThinking": true'."\n" .'}', ], 'HybridStrategyConfig' => [ 'description' => '混合检索策略配置,选填。JSON格式字符串,JSON字段定义如下:'."\n" ."\n" .'- Strategy:混合检索策略。取值为rrf(RRF融合)和weighted(加权融合)'."\n" ."\n" .'- RRFK:RRF融合平滑参数,取值范围 [1, 100]'."\n" ."\n" .'- Weight:weighted策略的权重,该值表示向量语义检索对最终得分的贡献比例。取值范围 [0, 1.0]', 'type' => 'string', 'required' => false, 'example' => '{'."\n" .' "Strategy": "rrf",'."\n" .' "RRFK":60,'."\n" .' "Weight": 0.5'."\n" .'}', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'KnowledgeBaseFileChunks' => [ 'description' => '知识库切片列表。', 'type' => 'array', 'items' => [ 'description' => '知识库切片详情。', '$ref' => '#/components/schemas/KnowledgeBaseFileChunk', ], ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"KnowledgeBaseFileChunks\\": [\\n {\\n \\"Score\\": 0,\\n \\"ChunkId\\": \\"\\",\\n \\"ChunkStart\\": 0,\\n \\"ChunkEnd\\": 0,\\n \\"ChunkSequence\\": 0,\\n \\"ChunkContent\\": \\"\\",\\n \\"ChunkSize\\": 0,\\n \\"ChunkStatus\\": \\"\\",\\n \\"DownloadUrl\\": \\"\\",\\n \\"ThumbnailUrl\\": \\"\\",\\n \\"ChunkAttachment\\": [\\n {\\n \\"PlaceholderId\\": \\"\\",\\n \\"Type\\": \\"\\",\\n \\"Uri\\": \\"\\",\\n \\"DownloadUrl\\": \\"\\"\\n }\\n ],\\n \\"MetaData\\": {\\n \\"FileName\\": \\"\\",\\n \\"FileUri\\": \\"\\",\\n \\"FileMetaId\\": \\"\\"\\n }\\n }\\n ]\\n}","type":"json"}]', 'title' => '检索知识库', ], 'CreateKnowledgeBaseJob' => [ 'summary' => '创建知识库任务。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs', 'methods' => [ 'post', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'write', 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => false, 'example' => 'd-ksicx823d', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求体。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '工作空间ID。如何获取工作空间ID,请参见[ListWorkspaces](~~449124~~)。', 'type' => 'string', 'required' => true, 'example' => '478**', ], 'Accessibility' => [ 'description' => '工作空间可见性,可能值为:'."\n" .'- PRIVATE:在此工作空间中,仅对您和管理员可见。'."\n" .'- PUBLIC:在此工作空间中,对所有人可见。', 'type' => 'string', 'required' => false, 'example' => 'PUBLIC', 'default' => 'PUBLIC', 'enum' => [ 'PUBLIC', 'PRIVATE', ], ], 'Description' => [ 'description' => '知识库任务描述。', 'type' => 'string', 'required' => false, 'example' => 'This is a description of the knowledge base job.', ], 'JobAction' => [ 'description' => '任务操作类型。'."\n" .'- SyncIndex:更新知识库索引', 'type' => 'string', 'required' => false, 'example' => 'SyncIndex', ], 'MaxRunningTimeInSeconds' => [ 'description' => '任务最大运行时间,单位秒。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '86400', ], 'ResourceId' => [ 'description' => '资源组ID。为空或public-cluster表示公共资源。', 'type' => 'string', 'required' => false, 'example' => 'quota89**76', ], 'EcsSpecs' => [ 'description' => '任务运行资源配置列表。文档和结构化知识库仅包含1个元素且**Type**为Worker,图片和视频知识库含2个元素且**Type**分别为Head和Worker。', 'type' => 'array', 'items' => [ 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型。可能的取值为Head和Worker。', 'type' => 'string', 'required' => false, 'example' => 'Worker', 'readOnly' => true, 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称。使用公共资源须填写。', 'type' => 'string', 'required' => false, 'example' => 'ecs.c6.large', 'readOnly' => true, ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', 'readOnly' => true, ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数。使用资源配额须填写。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2', 'readOnly' => true, ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数。使用资源配额须填写。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', 'readOnly' => true, ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小,单位GB。使用资源配额须填写。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '8', 'readOnly' => true, ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存容量,单位GB。使用资源配额须填写。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '16', 'readOnly' => true, ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型', 'type' => 'string', 'required' => false, 'example' => '16', 'readOnly' => true, ], 'Driver' => [ 'title' => '驱动版本', 'description' => 'GPU驱动版本。', 'type' => 'string', 'required' => false, 'example' => '535.161.08', 'readOnly' => true, ], ], 'required' => false, ], 'required' => false, ], 'UserVpc' => [ 'description' => '任务运行VPC信息。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'VPC ID', 'description' => 'VPC ID。', 'type' => 'string', 'required' => false, 'example' => 'vpc-wz90****5v23', 'readOnly' => true, ], 'VSwitchId' => [ 'title' => '交换机ID', 'description' => '交换机ID。', 'type' => 'string', 'required' => false, 'example' => 'vsw-wz9r****ng10', 'readOnly' => true, ], 'SecurityGroupId' => [ 'title' => '安全组ID', 'description' => '安全组ID。', 'type' => 'string', 'required' => false, 'example' => 'sg-wz9i****1129', 'readOnly' => true, ], ], 'required' => false, ], 'EmbeddingConfig' => [ 'description' => '索引配置。', 'type' => 'object', 'properties' => [ 'BatchSize' => [ 'title' => 'Embedding分批大小', 'description' => '索引分批大小。文档和结构化数据类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '8', 'readOnly' => true, ], 'Concurrency' => [ 'title' => 'Embedding并发数', 'description' => '索引并发数。图片和视频类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '200', 'minimum' => '1', 'example' => '1', 'readOnly' => true, ], ], 'required' => false, ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'KnowledgeBaseJobId' => [ 'description' => '知识库任务ID。', 'type' => 'string', 'example' => 'kbjob-9mn******1z54', ], 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '963BD7F9-0C02-5594-9550-BCC6DD43E3C0', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"KnowledgeBaseJobId\\": \\"kbjob-9mn******1z54\\",\\n \\"RequestId\\": \\"963BD7F9-0C02-5594-9550-BCC6DD43E3C0\\"\\n}","type":"json"}]', 'title' => '创建知识库任务', ], 'GetKnowledgeBaseJob' => [ 'summary' => '获取知识库任务。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs/{KnowledgeBaseJobId}', 'methods' => [ 'get', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'query', 'schema' => [ 'description' => '知识库所在工作空间ID。', 'type' => 'string', 'required' => true, 'example' => '478***', ], ], [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-nacr******sxd2', ], ], [ 'name' => 'KnowledgeBaseJobId', 'in' => 'path', 'schema' => [ 'description' => '知识库任务ID。', 'type' => 'string', 'required' => true, 'example' => 'kbjob-9m******54', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => 'C25324E3-18E6-50D8-9026-16D74AAEEB26', ], 'WorkspaceId' => [ 'description' => '知识库所在工作空间ID。', 'type' => 'string', 'example' => '478***', ], 'Accessibility' => [ 'description' => '工作空间可见性,可能值为:'."\n" .'- PRIVATE:在此工作空间中,仅对您和管理员可见。'."\n" .'- PUBLIC:在此工作空间中,对所有人可见。', 'type' => 'string', 'example' => 'PUBLIC', ], 'Creator' => [ 'description' => '创建者用户ID。', 'type' => 'string', 'example' => '2003******4844', ], 'GmtCreateTime' => [ 'description' => '任务创建时间(UTC)。', 'type' => 'string', 'example' => '2025-09-24T07:33:53Z', ], 'GmtModifiedTime' => [ 'description' => '任务更新时间(UTC)。', 'type' => 'string', 'example' => '2025-09-24T08:58:35Z', ], 'KnowledgeBaseId' => [ 'description' => '知识库ID。', 'type' => 'string', 'example' => 'd-nacr******sxd2', ], 'KnowledgeBaseJobId' => [ 'description' => '知识库任务ID。', 'type' => 'string', 'example' => 'kbjob-9m******54', ], 'JobAction' => [ 'description' => '任务操作类型。'."\n" .'- SyncIndex:更新知识库索引', 'type' => 'string', 'example' => 'UpdateScheduleConfig', ], 'Description' => [ 'description' => '知识库任务描述。', 'type' => 'string', 'example' => 'This is a description of the knowledge base job.', ], 'Status' => [ 'description' => '知识库任务状态。'."\n" .'- Running: 运行中。'."\n" .'- Success: 运行成功。'."\n" .'- Failed: 运行失败。', 'type' => 'string', 'example' => 'discovering', ], 'ResourceId' => [ 'description' => '资源组ID。为空或public-cluster表示公共资源。', 'type' => 'string', 'example' => 'quota89**76', ], 'EcsSpecs' => [ 'description' => '运行资源配置列表。', 'type' => 'array', 'items' => [ 'description' => '运行资源配置列表。', 'type' => 'object', 'properties' => [ 'Type' => [ 'title' => '节点类型', 'description' => '节点类型。可能的值为Head和Worker。', 'type' => 'string', 'example' => 'Worker', 'readOnly' => true, 'default' => 'Worker', ], 'InstanceType' => [ 'title' => '机型名称', 'description' => '机型名称。', 'type' => 'string', 'example' => 'ecs.c6.large', 'readOnly' => true, ], 'PodCount' => [ 'title' => '副本数量', 'description' => '副本数量。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'readOnly' => true, ], 'CPU' => [ 'title' => 'CPU核数', 'description' => 'CPU核数。', 'type' => 'integer', 'format' => 'int32', 'example' => '4', 'readOnly' => true, ], 'GPU' => [ 'title' => 'GPU卡数', 'description' => 'GPU卡数。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', 'readOnly' => true, ], 'Memory' => [ 'title' => '内存大小', 'description' => '内存大小,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', 'readOnly' => true, ], 'SharedMemory' => [ 'title' => '共享内存容量', 'description' => '共享内存容量,单位GB。', 'type' => 'integer', 'format' => 'int32', 'example' => '16', 'readOnly' => true, ], 'GPUType' => [ 'title' => 'GPU类型', 'description' => 'GPU类型。', 'type' => 'string', 'example' => 'V100', 'readOnly' => true, ], 'Driver' => [ 'title' => '驱动版本', 'description' => '驱动版本。', 'type' => 'string', 'example' => '550.127.08', 'readOnly' => true, ], ], ], ], 'UserVpc' => [ 'description' => '任务运行VPC信息。', 'type' => 'object', 'properties' => [ 'VpcId' => [ 'title' => 'VPC ID', 'description' => 'VPC ID。', 'type' => 'string', 'example' => 'vpc-wz90****5v23', ], 'VSwitchId' => [ 'title' => '交换机ID', 'description' => '交换机ID。', 'type' => 'string', 'example' => 'vsw-wz9r****ng10', ], 'SecurityGroupId' => [ 'title' => '安全组ID', 'description' => '安全组ID。', 'type' => 'string', 'example' => 'sg-wz91****e10e', ], ], ], 'MaxRunningTimeInSeconds' => [ 'description' => '任务最大运行时间,单位秒。', 'type' => 'integer', 'format' => 'int32', 'example' => '86400', ], 'GmtFinishTime' => [ 'description' => '任务结束时间(UTC)。', 'type' => 'string', 'example' => '2025-02-08T15:45:12Z', ], 'ErrorMessage' => [ 'description' => '任务出错信息。', 'type' => 'string', 'example' => 'Failed to update knwoledge base index, pipelineRunId: flow-9p8f****4t9z', ], 'PipelineRunInfo' => [ 'description' => '工作流运行信息。', 'type' => 'object', 'properties' => [ 'PipelineRunId' => [ 'title' => 'PaiFlow工作流运行ID', 'description' => 'PaiFlow工作流运行ID', 'type' => 'string', 'example' => 'flow-fi8z******g4gy', 'readOnly' => true, ], ], ], 'KnowledgeBaseJobResult' => [ 'description' => '任务结果。', 'type' => 'object', 'properties' => [ 'TotalFileCount' => [ 'title' => '总处理文件数', 'description' => '总处理文件数', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'AddChunkCount' => [ 'title' => '增加Chunk数量', 'description' => '增加Chunk数量', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'DeleteChunkCount' => [ 'title' => '删除Chunk数量', 'description' => '删除Chunk数量', 'type' => 'integer', 'format' => 'int32', 'example' => '2', ], ], ], 'EmbeddingConfig' => [ 'description' => '索引配置。', 'type' => 'object', 'properties' => [ 'BatchSize' => [ 'title' => 'Embedding分批大小', 'description' => '索引分批大小。文档和结构化数据类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', 'readOnly' => true, ], 'Concurrency' => [ 'title' => 'Embedding并发数', 'description' => '索引并发数。图片和视频类型知识库有效。', 'type' => 'integer', 'format' => 'int32', 'maximum' => '200', 'minimum' => '1', 'example' => '2', 'readOnly' => true, ], ], ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C25324E3-18E6-50D8-9026-16D74AAEEB26\\",\\n \\"WorkspaceId\\": \\"478***\\",\\n \\"Accessibility\\": \\"PUBLIC\\",\\n \\"Creator\\": \\"2003******4844\\",\\n \\"GmtCreateTime\\": \\"2025-09-24T07:33:53Z\\",\\n \\"GmtModifiedTime\\": \\"2025-09-24T08:58:35Z\\",\\n \\"KnowledgeBaseId\\": \\"d-nacr******sxd2\\",\\n \\"KnowledgeBaseJobId\\": \\"kbjob-9m******54\\",\\n \\"JobAction\\": \\"UpdateScheduleConfig\\",\\n \\"Description\\": \\"This is a description of the knowledge base job.\\",\\n \\"Status\\": \\"discovering\\",\\n \\"ResourceId\\": \\"quota89**76\\",\\n \\"EcsSpecs\\": [\\n {\\n \\"Type\\": \\"Worker\\",\\n \\"InstanceType\\": \\"ecs.c6.large\\",\\n \\"PodCount\\": 1,\\n \\"CPU\\": 4,\\n \\"GPU\\": 1,\\n \\"Memory\\": 16,\\n \\"SharedMemory\\": 16,\\n \\"GPUType\\": \\"V100\\",\\n \\"Driver\\": \\"550.127.08\\"\\n }\\n ],\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"vpc-wz90****5v23\\",\\n \\"VSwitchId\\": \\"vsw-wz9r****ng10\\",\\n \\"SecurityGroupId\\": \\"sg-wz91****e10e\\"\\n },\\n \\"MaxRunningTimeInSeconds\\": 86400,\\n \\"GmtFinishTime\\": \\"2025-02-08T15:45:12Z\\",\\n \\"ErrorMessage\\": \\"Failed to update knwoledge base index, pipelineRunId: flow-9p8f****4t9z\\",\\n \\"PipelineRunInfo\\": {\\n \\"PipelineRunId\\": \\"flow-fi8z******g4gy\\"\\n },\\n \\"KnowledgeBaseJobResult\\": {\\n \\"TotalFileCount\\": 1,\\n \\"AddChunkCount\\": 10,\\n \\"DeleteChunkCount\\": 2\\n },\\n \\"EmbeddingConfig\\": {\\n \\"BatchSize\\": 10,\\n \\"Concurrency\\": 2\\n }\\n}","type":"json"}]', 'title' => '获取知识库任务', ], 'UpdateKnowledgeBaseJob' => [ 'summary' => '更新知识库任务。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs/{KnowledgeBaseJobId}', 'methods' => [ 'put', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'readAndWrite', 'systemTags' => [ 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-nacr******sxd2', ], ], [ 'name' => 'KnowledgeBaseJobId', 'in' => 'path', 'schema' => [ 'description' => '知识库任务ID。', 'type' => 'string', 'required' => true, 'example' => 'kbjob-9m******54', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => '请求体。', 'type' => 'object', 'properties' => [ 'WorkspaceId' => [ 'description' => '知识课所在工作空间ID。', 'type' => 'string', 'required' => true, 'example' => '285***', ], 'Description' => [ 'description' => '知识库任务描述。', 'type' => 'string', 'required' => false, 'example' => 'This is a description of the knowledge base job.', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '35686626-8D83-5ADE-B400-08A6613A6057', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"35686626-8D83-5ADE-B400-08A6613A6057\\"\\n}","type":"json"}]', 'title' => '更新知识库任务', ], 'DeleteKnowledgeBaseJob' => [ 'summary' => '删除知识库任务。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs/{KnowledgeBaseJobId}', 'methods' => [ 'delete', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'write', 'systemTags' => [ 'operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'query', 'schema' => [ 'description' => '知识库所在工作空间ID。', 'type' => 'string', 'required' => true, 'example' => '478***', ], ], [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-nacr******sxd2', ], ], [ 'name' => 'KnowledgeBaseJobId', 'in' => 'path', 'schema' => [ 'description' => '知识库任务ID。', 'type' => 'string', 'required' => true, 'example' => 'kbjob-9m******54', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '48E6392E-C3C9-5212-9FAD-13256ABD9AF6', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"48E6392E-C3C9-5212-9FAD-13256ABD9AF6\\"\\n}","type":"json"}]', 'title' => '删除知识库任务', ], 'ListKnowledgeBaseJobs' => [ 'summary' => '获取知识库任务列表。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasejobs', 'methods' => [ 'get', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'systemTags' => [ 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'WorkspaceId', 'in' => 'query', 'schema' => [ 'description' => '知识库所在工作空间ID。', 'type' => 'string', 'required' => false, 'example' => '478**', ], ], [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'description' => '知识库ID。', 'type' => 'string', 'required' => false, 'example' => 'd-ksicx823d', ], ], [ 'name' => 'KnowledgeBaseJobId', 'in' => 'query', 'schema' => [ 'description' => '知识库任务ID。', 'type' => 'string', 'required' => false, 'example' => 'kbjob-9m******54', ], ], [ 'name' => 'Status', 'in' => 'query', 'schema' => [ 'description' => '知识库任务状态。'."\n" .'- Running: 运行中。'."\n" .'- Success: 运行成功。'."\n" .'- Failed: 运行失败。', 'type' => 'string', 'required' => false, 'example' => 'Running', ], ], [ 'name' => 'JobAction', 'in' => 'query', 'schema' => [ 'description' => '任务操作类型。'."\n" .'- SyncIndex:更新知识库索引', 'type' => 'string', 'required' => false, 'example' => 'SyncIndex', ], ], [ 'name' => 'NextToken', 'in' => 'query', 'schema' => [ 'description' => '用来标记当前开始读取的位置,置空表示从头开始。', 'type' => 'string', 'required' => false, 'example' => '10', ], ], [ 'name' => 'MaxResults', 'in' => 'query', 'schema' => [ 'description' => '使用 NextToken 方式查询时,每次最多返回的结果数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => [ 'description' => '排序字段。目前只支持GmtCreateTime。', 'type' => 'string', 'required' => false, 'example' => 'GmtCreateTime', ], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => [ 'description' => '排序方式。'."\n" ."\n" .'- ASC:升序。'."\n" .'- DESC:降序。', 'type' => 'string', 'required' => false, 'example' => 'DESC', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'description' => '当前页数。 取值范围:大于0。 默认值:1。如果同时传入MaxResults,则使用NextToken查询方式,忽略此字段值。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'description' => '每页查询的数量。如果同时传入 MaxResults,则以 MaxResults 数量为准。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'KnowledgeBaseJobs' => [ 'description' => '知识库任务列表。', 'type' => 'array', 'items' => [ 'description' => '知识库任务详情。', '$ref' => '#/components/schemas/KnowledgeBaseJob', ], ], 'MaxResults' => [ 'title' => '请求最大返回结果数', 'description' => '本次请求允许返回的最大记录条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '20', ], 'NextToken' => [ 'title' => '下次请求令牌', 'description' => '返回下一次查询开始的位置。为空表示已经获取了全部数据。', 'type' => 'string', 'example' => '20', ], 'TotalCount' => [ 'title' => '总量', 'description' => '总记录条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '32', ], 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '963BD7F9-0C02-5594-9550-BCC6DD43E3C0', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"KnowledgeBaseJobs\\": [\\n {\\n \\"WorkspaceId\\": \\"\\",\\n \\"Accessibility\\": \\"\\",\\n \\"Creator\\": \\"\\",\\n \\"GmtCreateTime\\": \\"\\",\\n \\"GmtModifiedTime\\": \\"\\",\\n \\"KnowledgeBaseId\\": \\"\\",\\n \\"KnowledgeBaseJobId\\": \\"\\",\\n \\"JobAction\\": \\"\\",\\n \\"Description\\": \\"\\",\\n \\"Status\\": \\"\\",\\n \\"ResourceId\\": \\"\\",\\n \\"EcsSpecs\\": [\\n {\\n \\"Type\\": \\"\\",\\n \\"InstanceType\\": \\"\\",\\n \\"PodCount\\": 0,\\n \\"CPU\\": 0,\\n \\"GPU\\": 0,\\n \\"Memory\\": 0,\\n \\"SharedMemory\\": 0,\\n \\"GPUType\\": \\"\\",\\n \\"Driver\\": \\"\\"\\n }\\n ],\\n \\"UserVpc\\": {\\n \\"VpcId\\": \\"\\",\\n \\"VSwitchId\\": \\"\\",\\n \\"SecurityGroupId\\": \\"\\"\\n },\\n \\"MaxRunningTimeInSeconds\\": 0,\\n \\"GmtFinishTime\\": \\"\\",\\n \\"ErrorMessage\\": \\"\\",\\n \\"PipelineRunInfo\\": {\\n \\"PipelineRunId\\": \\"\\"\\n },\\n \\"KnowledgeBaseJobResult\\": {\\n \\"TotalFileCount\\": 0,\\n \\"AddChunkCount\\": 0,\\n \\"DeleteChunkCount\\": 0,\\n \\"FileMetas\\": [\\n {\\n \\"FileMetaId\\": \\"\\",\\n \\"FileName\\": \\"\\",\\n \\"FileUri\\": \\"\\",\\n \\"Action\\": \\"\\"\\n }\\n ]\\n },\\n \\"EmbeddingConfig\\": {\\n \\"BatchSize\\": 0,\\n \\"Concurrency\\": 0\\n }\\n }\\n ],\\n \\"MaxResults\\": 20,\\n \\"NextToken\\": \\"20\\",\\n \\"TotalCount\\": 32,\\n \\"RequestId\\": \\"963BD7F9-0C02-5594-9550-BCC6DD43E3C0\\"\\n}","type":"json"}]', 'title' => '获取知识库任务列表', ], 'UpdateKnowledgeBaseChunk' => [ 'summary' => '更新知识库切片。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasechunks/{KnowledgeBaseChunkId}', 'methods' => [ 'put', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'readAndWrite', 'systemTags' => [ 'operationType' => 'update', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'title' => '知识库ID', 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-ab****89', ], ], [ 'name' => 'KnowledgeBaseChunkId', 'in' => 'path', 'schema' => [ 'title' => '切片ID', 'description' => '知识库切片ID。', 'type' => 'string', 'required' => true, 'example' => '123e4567-e89b-12d3-a456-426655440000', ], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'title' => '请求体', 'description' => '请求体。', 'type' => 'object', 'properties' => [ 'ChunkStatus' => [ 'title' => '切片状态', 'description' => '切片状态。'."\n" ."\n" .'- Enable: 启用。'."\n" .'- Disable: 禁用。', 'type' => 'string', 'required' => false, 'example' => 'Enable', ], 'ChunkContent' => [ 'title' => '切片内容', 'description' => '切片内容。', 'type' => 'string', 'required' => false, 'example' => 'content', ], ], 'required' => false, ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID', 'type' => 'string', 'example' => '963BD7F9-0C02-5594-9550-BCC6DD43E3C0', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"963BD7F9-0C02-5594-9550-BCC6DD43E3C0\\"\\n}","type":"json"}]', 'title' => '更新知识库切片', ], 'ListKnowledgeBaseChunks' => [ 'summary' => '获取知识库切片列表。', 'path' => '/api/v1/langstudio/knowledgebases/{KnowledgeBaseId}/knowledgebasechunks', 'methods' => [ 'get', ], 'schemes' => [ 'https', ], 'security' => [ [ 'AK' => [], ], ], 'consumes' => [ 'application/json', ], 'produces' => [ 'application/json', ], 'operationType' => 'read', 'systemTags' => [ 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => [ 'FEATURElearnBVWJJN', ], ], 'parameters' => [ [ 'name' => 'KnowledgeBaseId', 'in' => 'path', 'schema' => [ 'title' => '知识库ID', 'description' => '知识库ID。', 'type' => 'string', 'required' => true, 'example' => 'd-ab****89', ], ], [ 'name' => 'VersionName', 'in' => 'query', 'schema' => [ 'title' => '知识库版本', 'description' => '知识库版本。默认为v1。', 'type' => 'string', 'required' => false, 'example' => 'v1', ], ], [ 'name' => 'MetaData', 'in' => 'query', 'schema' => [ 'title' => '原始文件信息', 'description' => '原始文件信息。为空表示遍历整个知识库版本。', 'type' => 'object', 'properties' => [ 'FileUri' => [ 'title' => '文件地址', 'description' => '文件地址。若同时传入FileMetaId则忽略此参数值。', 'type' => 'string', 'required' => false, 'example' => 'oss://mybucketpath/file1.txt', 'readOnly' => true, ], 'FileMetaId' => [ 'title' => '文件元数据ID', 'description' => '文件元数据ID。', 'type' => 'string', 'required' => false, 'example' => 'xd8e****79du', 'readOnly' => true, ], ], 'required' => false, 'example' => '1', ], ], [ 'name' => 'ChunkStatus', 'in' => 'query', 'schema' => [ 'title' => '切片状态', 'description' => '切片状态。'."\n" .'- Enable: 有效。'."\n" .'- Disable: 无效。', 'type' => 'string', 'required' => false, 'example' => 'Enable', ], ], [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => [ 'title' => '当前页数', 'description' => '当前页数。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '1', ], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => [ 'title' => '每页查询数量', 'description' => '每页查询数量。', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '20', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'type' => 'object', 'properties' => [ 'KnowledgeBaseChunks' => [ 'title' => '切片列表', 'description' => '切片列表。', 'type' => 'array', 'items' => [ 'title' => '切片', 'description' => '切片详情。', 'type' => 'object', 'properties' => [ 'KnowledgeBaseChunkId' => [ 'title' => '切片ID', 'description' => '切片ID。', 'type' => 'string', 'example' => '123e4567-e89b-12d3-a456-426655440000', ], 'KnowledgeBaseId' => [ 'title' => '知识库ID', 'description' => '知识库ID。', 'type' => 'string', 'example' => 'd-ix****o9', ], 'VersionName' => [ 'title' => '知识库版本', 'description' => '知识库版本。', 'type' => 'string', 'example' => 'v1', ], 'ChunkStart' => [ 'title' => '切片起始位置', 'description' => '切片起始位置。返回从文件播放开始的毫秒数。', 'type' => 'integer', 'format' => 'int32', 'example' => '0', ], 'ChunkEnd' => [ 'title' => '切片结束位置', 'description' => '切片结束位置。返回从文件播放开始的毫秒数。', 'type' => 'integer', 'format' => 'int32', 'example' => '30000', ], 'ChunkSequence' => [ 'title' => '切片顺序', 'description' => '切片在文件中的序号。', 'type' => 'integer', 'format' => 'int32', 'example' => '1', ], 'ChunkContent' => [ 'title' => '切片内容', 'description' => '切片内容。', 'type' => 'string', 'example' => 'content', ], 'ChunkSize' => [ 'title' => '切片大小', 'description' => '切片大小。', 'type' => 'integer', 'format' => 'int32', 'example' => '1873', ], 'ChunkStatus' => [ 'title' => '切片状态', 'description' => '切片状态。'."\n" .'- Enable: 启用。'."\n" .'- Disable: 禁用。', 'type' => 'string', 'example' => 'Enable', ], 'DownloadUrl' => [ 'title' => '切片下载地址', 'description' => '切片下载地址。图片和视频文件返回。', 'type' => 'string', 'example' => 'https://mybucket.oss-cn-shanghai.aliyuncs.com/...', ], 'ThumbnailUrl' => [ 'title' => '切片缩略图', 'description' => '切片缩略图。图片和视频文件返回。', 'type' => 'string', 'example' => 'https://mybucket.oss-cn-shanghai.aliyuncs.com/...', ], 'ChunkAttachment' => [ 'title' => '切片附属信息', 'description' => '切片附件列表。', 'type' => 'array', 'items' => [ 'title' => '切片附件', 'description' => '切片附件。', 'type' => 'object', 'properties' => [ 'PlaceholderId' => [ 'title' => '占位符ID', 'description' => '占位符ID。', 'type' => 'string', 'example' => 'IMAGE_PLACEHOLDER_0', 'readOnly' => true, ], 'Type' => [ 'title' => '类型', 'description' => '附件类型。', 'type' => 'string', 'example' => 'image', 'readOnly' => true, ], 'Uri' => [ 'title' => '路径', 'description' => '附件路径。', 'type' => 'string', 'example' => 'oss://mybucket/path/file.txt', 'readOnly' => true, ], 'DownloadUrl' => [ 'title' => '下载地址', 'description' => '下载地址。', 'type' => 'string', 'example' => 'https://mybucket.oss-cn-shanghai.aliyuncs.com/...', 'readOnly' => true, ], ], 'example' => '', ], 'example' => '', ], 'MetaData' => [ 'title' => '原始文件信息', 'description' => '原始文件信息。', 'type' => 'object', 'properties' => [ 'FileName' => [ 'title' => '文件名', 'description' => '文件名。', 'type' => 'string', 'example' => 'file1.txt', 'readOnly' => true, ], 'FileUri' => [ 'title' => '文件地址', 'description' => '文件路径。', 'type' => 'string', 'example' => 'oss://mybucketpath/file1.txt', 'readOnly' => true, ], 'FileMetaId' => [ 'title' => '文件元数据ID', 'description' => '文件元数据ID。', 'type' => 'string', 'example' => 'xd8e****79du', 'readOnly' => true, ], ], 'example' => '', ], ], 'example' => '', ], 'example' => '', ], 'MaxResults' => [ 'title' => '请求最大返回结果数', 'description' => '本次请求允许返回的最大记录条数。', 'type' => 'integer', 'format' => 'int32', 'example' => '10', ], 'TotalCount' => [ 'title' => '总量', 'description' => '切片总量。', 'type' => 'integer', 'format' => 'int32', 'example' => '25', ], 'RequestId' => [ 'title' => '请求ID', 'description' => '请求ID。', 'type' => 'string', 'example' => '963BD7F9-0C02-5594-9550-BCC6DD43E3C0', ], ], ], ], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"KnowledgeBaseChunks\\": [\\n {\\n \\"KnowledgeBaseChunkId\\": \\"123e4567-e89b-12d3-a456-426655440000\\",\\n \\"KnowledgeBaseId\\": \\"d-ix****o9\\",\\n \\"VersionName\\": \\"v1\\",\\n \\"ChunkStart\\": 0,\\n \\"ChunkEnd\\": 30000,\\n \\"ChunkSequence\\": 1,\\n \\"ChunkContent\\": \\"content\\",\\n \\"ChunkSize\\": 1873,\\n \\"ChunkStatus\\": \\"Enable\\",\\n \\"DownloadUrl\\": \\"https://mybucket.oss-cn-shanghai.aliyuncs.com/...\\",\\n \\"ThumbnailUrl\\": \\"https://mybucket.oss-cn-shanghai.aliyuncs.com/...\\",\\n \\"ChunkAttachment\\": [\\n {\\n \\"PlaceholderId\\": \\"IMAGE_PLACEHOLDER_0\\",\\n \\"Type\\": \\"image\\",\\n \\"Uri\\": \\"oss://mybucket/path/file.txt\\",\\n \\"DownloadUrl\\": \\"https://mybucket.oss-cn-shanghai.aliyuncs.com/...\\"\\n }\\n ],\\n \\"MetaData\\": {\\n \\"FileName\\": \\"file1.txt\\",\\n \\"FileUri\\": \\"oss://mybucketpath/file1.txt\\",\\n \\"FileMetaId\\": \\"xd8e****79du\\"\\n }\\n }\\n ],\\n \\"MaxResults\\": 10,\\n \\"TotalCount\\": 25,\\n \\"RequestId\\": \\"963BD7F9-0C02-5594-9550-BCC6DD43E3C0\\"\\n}","type":"json"}]', 'title' => '获取知识库切片列表', ], ], 'endpoints' => [ [ 'regionId' => 'eu-central-1', 'endpoint' => 'pailangstudio.eu-central-1.aliyuncs.com', ], [ 'regionId' => 'cn-beijing', 'endpoint' => 'pailangstudio.cn-beijing.aliyuncs.com', ], [ 'regionId' => 'cn-wulanchabu', 'endpoint' => 'pailangstudio.cn-wulanchabu.aliyuncs.com', ], [ 'regionId' => 'cn-hangzhou', 'endpoint' => 'pailangstudio.cn-hangzhou.aliyuncs.com', ], [ 'regionId' => 'cn-shanghai', 'endpoint' => 'pailangstudio.cn-shanghai.aliyuncs.com', ], [ 'regionId' => 'cn-shenzhen', 'endpoint' => 'pailangstudio.cn-shenzhen.aliyuncs.com', ], [ 'regionId' => 'cn-hongkong', 'endpoint' => 'pailangstudio.cn-hongkong.aliyuncs.com', ], [ 'regionId' => 'ap-northeast-1', 'endpoint' => 'pailangstudio.ap-northeast-1.aliyuncs.com', ], [ 'regionId' => 'ap-southeast-1', 'endpoint' => 'pailangstudio.ap-southeast-1.aliyuncs.com', ], [ 'regionId' => 'ap-southeast-5', 'endpoint' => 'pailangstudio.ap-southeast-5.aliyuncs.com', ], [ 'regionId' => 'us-east-1', 'endpoint' => 'pailangstudio.us-east-1.aliyuncs.com', ], ], ];