Datasets
List Datasets
Retrieves a paginated list of datasets for the current workspace. Results can be paginated using cursor-based pagination.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.list(limit=10)
# Handle response
print(res)
Show Parameters
Show Parameters
A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
A cursor for use in pagination.
starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with 01JJ1HDHN79XAS7A01WB3HYSDB, your subsequent call can include after=01JJ1HDHN79XAS7A01WB3HYSDB in order to fetch the next page of the list.Show Response
Show Response
Show Properties of data
Show Properties of data
The unique identifier of the dataset
The display name of the dataset
The unique identifier of the project it belongs to
The unique identifier of the workspace it belongs to
Show Properties of metadata
Show Properties of metadata
The unique identifier of the user who created the dataset
The unique identifier of the user who last updated the dataset
The date and time the resource was created
Create a Dataset
Creates a new dataset in the specified project.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.create(request={
"display_name": "Neva.Raynor10",
"path": "Default",
})
# Handle response
print(res)
Show Parameters
Show Parameters
The display name of the dataset
Show Response
Show Response
The unique identifier of the dataset
The display name of the dataset
The unique identifier of the project it belongs to
The unique identifier of the workspace it belongs to
Show Properties of metadata
Show Properties of metadata
The unique identifier of the user who created the dataset
The unique identifier of the user who last updated the dataset
The date and time the resource was created
Retrieve a Dataset
Retrieves a specific dataset by its unique identifierfrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.retrieve(dataset_id="<id>")
# Handle response
print(res)
Show Parameters
Show Parameters
The request object to use for the request.
Show Response
Show Response
The unique identifier of the dataset
The display name of the dataset
The unique identifier of the project it belongs to
The unique identifier of the workspace it belongs to
Show Properties of metadata
Show Properties of metadata
The unique identifier of the user who created the dataset
The unique identifier of the user who last updated the dataset
The date and time the resource was created
Update a Dataset
Update a datasetfrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.update(dataset_id="<id>", path="Default")
# Handle response
print(res)
Show Parameters
Show Parameters
The unique identifier of the dataset
Show Response
Show Response
The unique identifier of the dataset
The display name of the dataset
The unique identifier of the project it belongs to
The unique identifier of the workspace it belongs to
Show Properties of metadata
Show Properties of metadata
The unique identifier of the user who created the dataset
The unique identifier of the user who last updated the dataset
The date and time the resource was created
Delete a Dataset
Permanently deletes a dataset and all its datapoints. This action is irreversible.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.datasets.delete(dataset_id="<id>")
# Use the SDK ...
Show Parameters
Show Parameters
The request object to use for the request.
List Datapoints
Retrieves a paginated list of datapoints from a specific dataset.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.list_datapoints(dataset_id="<id>", limit=10)
# Handle response
print(res)
Show Parameters
Show Parameters
The unique identifier of the dataset
A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
A cursor for use in pagination.
starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with 01JJ1HDHN79XAS7A01WB3HYSDB, your subsequent call can include after=01JJ1HDHN79XAS7A01WB3HYSDB in order to fetch the next page of the list.Show Response
Show Response
Show Properties of data
Show Properties of data
The unique identifier of the dataset item
The unique identifier of the workspace it belongs to
The inputs of the dataset. Key value pairs where the key is the input name and the value is the input value. Nested objects are not supported.
A list of messages comprising the conversation so far
Evaluations associated with the datapoint
The unique identifier of the dataset
The version of the dataset snapshot
The unique identifier of the user who created the dataset
The unique identifier of the user who last updated the dataset
The date and time the resource was created
Create Datapoint
Creates a new datapoint in the specified dataset.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.create_datapoint(dataset_id="<id>")
# Handle response
print(res)
Show Parameters
Show Parameters
The unique identifier of the dataset
Retrieve Datapoint
Retrieves a datapoint objectfrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.retrieve_datapoint(dataset_id="<id>", datapoint_id="<id>")
# Handle response
print(res)
Show Parameters
Show Parameters
The unique identifier of the dataset
Show Response
Show Response
The unique identifier of the dataset item
The unique identifier of the workspace it belongs to
The inputs of the dataset. Key value pairs where the key is the input name and the value is the input value. Nested objects are not supported.
A list of messages comprising the conversation so far
Evaluations associated with the datapoint
The unique identifier of the dataset
The version of the dataset snapshot
The unique identifier of the user who created the dataset
The unique identifier of the user who last updated the dataset
The date and time the resource was created
Update Datapoint
Update a datapointfrom orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.datasets.update_datapoint(dataset_id="<id>", datapoint_id="<id>")
# Handle response
print(res)
Show Parameters
Show Parameters
Show Response
Show Response
The unique identifier of the dataset item
The unique identifier of the workspace it belongs to
The inputs of the dataset. Key value pairs where the key is the input name and the value is the input value. Nested objects are not supported.
A list of messages comprising the conversation so far
Evaluations associated with the datapoint
The unique identifier of the dataset
The version of the dataset snapshot
The unique identifier of the user who created the dataset
The unique identifier of the user who last updated the dataset
The date and time the resource was created
Delete Datapoint
Permanently deletes a specific datapoint from a dataset.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.datasets.delete_datapoint(dataset_id="<id>", datapoint_id="<id>")
# Use the SDK ...
Show Parameters
Show Parameters
The unique identifier of the dataset
Clear Datasets
Delete all datapoints from a dataset. This action is irreversible.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.datasets.clear(dataset_id="<id>")
# Use the SDK ...
Show Parameters
Show Parameters
The request object to use for the request.