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 add the new test cases to the existing "Math problems" dataset.
# New test cases must have the same columns as the existing dataset.
p.add_test_cases(data, name="Math problems")
const p = new Parea("PAREA_API_KEY"); // replace with your API key
const 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 add the new test cases to the existing "Math problems" dataset.
// New test cases must have the same columns as the existing dataset.
p.addTestCases(data, 'Math problems');
curl --location 'https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/testcases' \
--header 'Content-Type: application/json' \
--header 'x-api-key: PAREA_API_KEY' \
--data '{
"name": "Math problems",
"test_cases": [
{
"inputs": {
"problem": "1+2"
},
"tags": [
"easy"
],
"target": "3"
}
]
}'
[
123
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Datasets
Create Test Cases For Dataset
Adds items/test cases to a dataset. If the dataset does not exist, it will be created. Returns the IDs of the created items/test cases.
Returns: List[int]: List of IDs of the created items/test cases.
POST
/
api
/
parea
/
v1
/
testcases
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 add the new test cases to the existing "Math problems" dataset.
# New test cases must have the same columns as the existing dataset.
p.add_test_cases(data, name="Math problems")
const p = new Parea("PAREA_API_KEY"); // replace with your API key
const 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 add the new test cases to the existing "Math problems" dataset.
// New test cases must have the same columns as the existing dataset.
p.addTestCases(data, 'Math problems');
curl --location 'https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/testcases' \
--header 'Content-Type: application/json' \
--header 'x-api-key: PAREA_API_KEY' \
--data '{
"name": "Math problems",
"test_cases": [
{
"inputs": {
"problem": "1+2"
},
"tags": [
"easy"
],
"target": "3"
}
]
}'
[
123
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}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 add the new test cases to the existing "Math problems" dataset.
# New test cases must have the same columns as the existing dataset.
p.add_test_cases(data, name="Math problems")
const p = new Parea("PAREA_API_KEY"); // replace with your API key
const 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 add the new test cases to the existing "Math problems" dataset.
// New test cases must have the same columns as the existing dataset.
p.addTestCases(data, 'Math problems');
curl --location 'https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/testcases' \
--header 'Content-Type: application/json' \
--header 'x-api-key: PAREA_API_KEY' \
--data '{
"name": "Math problems",
"test_cases": [
{
"inputs": {
"problem": "1+2"
},
"tags": [
"easy"
],
"target": "3"
}
]
}'
Authorizations
APIKeyHeaderAPIKeyHeaderAPIKeyHeader
Body
application/json
List of items which should be added to dataset.
Show child attributes
Show child attributes
ID for the dataset/test case collection. Either ID or name is required to identify the dataset.
Name for the dataset/test case collection. Either ID or name is required to identify the dataset.
Response
Successful Response
Was this page helpful?
⌘I

