POST
/
api
/
parea
/
v1
/
collection
p = Parea(api_key="PAREA_API_KEY")  # replace with your API key

data = [
    {"problem": "1+2", "target": 3, "tags": ["easy"]},
    {"problem": "Solve the differential equation dy/dx = 3y.", "target": "y = c * e^(3x)", "tags": ["hard"]}
]

# this will create a new dataset on Parea named "Math problems".
# The dataset will have one column named "problem", and two columns using the reserved names "target" and "tags".
# when using this dataset the expected prompt template should have a placeholder for the varible problem.
p.create_test_collection(data, name="Math problems")
{
  "id": 5000,
  "last_updated_at": "2021-06-01T00:00:00Z",
  "test_case_ids": [
    12345
  ]
}
p = Parea(api_key="PAREA_API_KEY")  # replace with your API key

data = [
    {"problem": "1+2", "target": 3, "tags": ["easy"]},
    {"problem": "Solve the differential equation dy/dx = 3y.", "target": "y = c * e^(3x)", "tags": ["hard"]}
]

# this will create a new dataset on Parea named "Math problems".
# The dataset will have one column named "problem", and two columns using the reserved names "target" and "tags".
# when using this dataset the expected prompt template should have a placeholder for the varible problem.
p.create_test_collection(data, name="Math problems")

Authorizations

x-user-id
string
header
required

Body

application/json
name
string
required

Name of the dataset

column_names
string[]
required

Column names for the dataset

test_cases
object[] | null

Name of test cases/samples in the dataset

Response

200
application/json
Successful Response
id
integer
required

Unique identifier for the dataset

last_updated_at
string
required

Timestamp when the dataset was last updated

test_case_ids
integer[]
required

List of created test case IDs in the dataset