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")
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 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 variable problem.
p.createTestCollection(data, 'Math problems 2');
curl --request POST \
--url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/collection \
--header 'Content-Type: application/json' \
--header 'x-user-id: <api-key>' \
--data '{
"name": "Math problems",
"column_names": [
"problem"
],
"test_cases": [
{
"inputs": {
"problem": "1+2"
},
"tags": [
"easy"
],
"target": "3"
}
]
}'
{
"id": 123,
"last_updated_at": "<string>",
"test_case_ids": [
123
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Datasets
Create Collection
Creates a dataset
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")
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 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 variable problem.
p.createTestCollection(data, 'Math problems 2');
curl --request POST \
--url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/collection \
--header 'Content-Type: application/json' \
--header 'x-user-id: <api-key>' \
--data '{
"name": "Math problems",
"column_names": [
"problem"
],
"test_cases": [
{
"inputs": {
"problem": "1+2"
},
"tags": [
"easy"
],
"target": "3"
}
]
}'
{
"id": 123,
"last_updated_at": "<string>",
"test_case_ids": [
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 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")
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 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 variable problem.
p.createTestCollection(data, 'Math problems 2');
curl --request POST \
--url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/collection \
--header 'Content-Type: application/json' \
--header 'x-user-id: <api-key>' \
--data '{
"name": "Math problems",
"column_names": [
"problem"
],
"test_cases": [
{
"inputs": {
"problem": "1+2"
},
"tags": [
"easy"
],
"target": "3"
}
]
}'
Authorizations
APIKeyHeaderAPIKeyHeaderAPIKeyHeader
Body
application/json
Was this page helpful?
⌘I

