Generate Inputs
Start Job
Get Started
API Reference
- Scoring System
- Data Generation
- Generate Inputs
- Generate Input/Response Pairs
Generate Inputs
Start Job
Starts a Generation Data job
POST
/
data
/
generate
import PiClient from 'withpi';
const client = new PiClient({
apiKey: process.env['WITHPI_API_KEY'], // This is the default and can be omitted
});
async function main() {
const dataGenerationStatus = await client.data.generate.startJob({
application_description: "Write a children's story communicating a simple life lesson.",
num_inputs_to_generate: 50,
seeds: [
'The quick brown fox jumped over the lazy dog',
'The lazy dog was jumped over by the quick brown fox',
],
});
console.log(dataGenerationStatus.job_id);
}
main();
{
"data": [
"The quick brown fox jumped over the lazy dog",
"The lazy dog was jumped over by the quick brown fox"
],
"detailed_status": [
"Downloading model",
"Tuning prompt"
],
"job_id": "1234abcd",
"state": "RUNNING"
}
Authorizations
Body
application/json
Response
200
application/json
Successful Response
DataGenerationStatus is the result of a data generation job.
import PiClient from 'withpi';
const client = new PiClient({
apiKey: process.env['WITHPI_API_KEY'], // This is the default and can be omitted
});
async function main() {
const dataGenerationStatus = await client.data.generate.startJob({
application_description: "Write a children's story communicating a simple life lesson.",
num_inputs_to_generate: 50,
seeds: [
'The quick brown fox jumped over the lazy dog',
'The lazy dog was jumped over by the quick brown fox',
],
});
console.log(dataGenerationStatus.job_id);
}
main();
{
"data": [
"The quick brown fox jumped over the lazy dog",
"The lazy dog was jumped over by the quick brown fox"
],
"detailed_status": [
"Downloading model",
"Tuning prompt"
],
"job_id": "1234abcd",
"state": "RUNNING"
}