CreateDataset

Updated at:

Creates a dataset.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.
    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.
  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

aimiaobi:CreateDataset

create

*All Resource

*

NoneNone

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The unique ID of the Alibaba Cloud Model Studio workspace. For more information, see Obtain a workspace ID.

llm-xxx

DatasetType

string

No

The type of the dataset. Valid values:

  • CustomSemanticSearch: A custom semantic index. This is the default value. Upload documents to build the dataset.

  • ThirdSearch: A third-party search source (API). Configure your own search API.

CustomSemanticSearch

DatasetName

string

Yes

The name of the dataset. The name must be globally unique.

businessDataset

DatasetDescription

string

No

The description of the dataset. This is the display name in the console. Use a human-readable name.

Enterprise knowledge base

SearchDatasetEnable

integer

No

The dataset search switch. Valid values:

  • 0: Disabled for all.

  • 1: Visible only to Miao Search.

  • 2: Visible only to Miao Bi.

  • 3: Visible to both Miao Search and Miao Bi. This is the default value.

3

DatasetConfig

object

No

The dataset search configuration.

SearchSourceConfigs

array<object>

No

Third-party search: API definition.

array<object>

No

Third-party search: API definition.

DemoQuery

string

No

A searchable keyword used to verify availability.

A searchable keyword used to verify availability

Size

integer

No

The default limit on the number of data entries for requests and responses.

10

SearchSourceRequestConfig

object

No

API request configuration.

Url

string

No

The API URL.

API URL

Method

string

No

The request method.

Request method

ConnectTimeout

integer

No

The connection timeout period, in milliseconds.

3000

SocketTimeout

integer

No

The read timeout period, in milliseconds.

3000

Headers

array<object>

No

The HTTP request headers.

object

No

The HTTP request headers.

Name

string

No

The parameter name.

Parameter name

ValueType

string

No

The data type of the parameter value. The default value is string.

Parameter value data type: default string

ValueFormat

string

No

This parameter is valid only when ValueType is set to time.

Valid when ValueType = time

Value

string

No

The parameter value.

Parameter value

Params

array<object>

No

The request path parameters.

object

No

Name

string

No

The parameter name.

Parameter name

ValueType

string

No

The data type of the parameter value. The default value is string.

Parameter value data type: default string

ValueFormat

string

No

This parameter is valid only when ValueType is set to time.

Valid when ValueType = time

Value

string

No

The parameter value.

Parameter value

PathParamsEnable

boolean

No

Specifies whether to enable path parameters.

true

Body

string

No

The request body.

{}

SearchSourceResponseConfig

object

No

API response configuration.

JqNodes

array<object>

No

Node configuration.

array<object>

No

Key

string

No

The node key.

Node key

Type

string

No

The data type of the node. Valid values: string, number, list, object, and base.

Node data type: string number list object base

Path

string

No

The node path.

Node path

JqNodes

array<object>

No

Child node configuration.

array<object>

No

Child node configuration.

Key

string

No

The node key.

title

Type

string

No

The type.

string

Path

string

No

The path.

Node path

JqNodes

array<object>

No

Child node configuration.

object

No

Child node configuration.

Key

string

No

The node key.

title

Type

string

No

The type.

string

Path

string

No

The node path.

Node path

SearchSourceConfig

object

No

Dataset configuration items.

TagSearchEnable

boolean

No

Specifies whether tags are used in searches. The default value is true.

true

TagGenerateEnable

boolean

No

Specifies whether tags are used in generation. The default value is true.

true

MetadataKeyValueSearchEnable

boolean

No

Specifies whether the metadata key-value pairs are used in searches. The default value is true.

true

MetadataKeyValueGenerateEnable

boolean

No

Specifies whether the metadata key-value pairs are used in generation. The default value is true.

true

DocumentHandleConfig

object

No

Dataset index configuration.

DisableHandleMultimodalMedia

boolean

No

Disables the processing logic for multimedia files.

  • true: Disables multimodal (image and video) indexing. Only text is indexed and searched.

  • false: Enables multimodal (text, image, and video) indexing. This setting takes effect only after you activate ApsaraVideo and grant authorization in system administration. If you set this to false but authorization is not granted, image and video indexing is automatically skipped. This is the default value.

false

InvokeType

string

No

The invocation method. Currently, only portal is supported, which indicates an invocation from the console.

  • If left empty: When DatasetType is ThirdSearch, datasetConfig.SearchSourceConfigs (third-party API definition) is required.

  • If set to portal: When DatasetType is ThirdSearch, the system initializes a SearchSourceConfigs (third-party API demo) example by default for your reference.

portal

AccessLevel

string

No

private

Response elements

Element

Type

Description

Example

object

The response.

Data

object

The business data.

DatasetId

integer

The dataset ID.

1

CreateUser

string

The creator.

xxx

CreateTime

string

The creation time.

2024-11-12 21:46:24

DatasetType

string

The dataset type.

CustomSemanticSearch

DatasetName

string

The dataset name.

xxx

DatasetDescription

string

The display name of the dataset.

xxx

SearchDatasetEnable

integer

The dataset search switch.

1

RequestId

string

The unique ID of the request.

1813ceee-7fe5-41b4-87e5-982a4d18cca5

Success

boolean

Indicates whether the request was successful. A value of true indicates success. A value of false indicates failure.

true

Code

string

The status code.

NoData

Message

string

The error message.

success

HttpStatusCode

integer

The HTTP status code.

200

Examples

Success response

JSON format

{
  "Data": {
    "DatasetId": 1,
    "CreateUser": "xxx",
    "CreateTime": "2024-11-12 21:46:24",
    "DatasetType": "CustomSemanticSearch",
    "DatasetName": "xxx",
    "DatasetDescription": "xxx",
    "SearchDatasetEnable": 1
  },
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "Success": true,
  "Code": "NoData",
  "Message": "success",
  "HttpStatusCode": 200
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.