Generate Input/Response Pairs
Start Job
Get Started
API Reference
- Scoring System
- Data Generation
- Generate Inputs
- Generate Input/Response Pairs
Generate Input/Response Pairs
Start Job
Starts a Generation Input-Response Pairs job
POST
/
data
/
generate_input_response_pairs
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 syntheticDataStatus = await client.data.generateInputResponsePairs.startJob({
num_pairs_to_generate: 50,
seeds: [
{
llm_input: 'Tell me something different',
llm_output: 'The lazy dog was jumped over by the quick brown fox',
},
],
});
console.log(syntheticDataStatus.job_id);
}
main();
{
"data": [
{
"llm_input": "Tell me something different",
"llm_output": "The lazy dog was jumped over by the quick brown fox"
},
{
"llm_input": "Write a short poem",
"llm_output": "Moonlight dancing on waves,\nStars whisper ancient tales,\nNight's gentle embrace"
}
],
"detailed_status": [
"Downloading model",
"Tuning prompt"
],
"job_id": "1234abcd",
"state": "RUNNING"
}
Authorizations
Body
application/json
Response
200
application/json
Successful Response
SyntheticDataStatus is the result of a synthetic 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 syntheticDataStatus = await client.data.generateInputResponsePairs.startJob({
num_pairs_to_generate: 50,
seeds: [
{
llm_input: 'Tell me something different',
llm_output: 'The lazy dog was jumped over by the quick brown fox',
},
],
});
console.log(syntheticDataStatus.job_id);
}
main();
{
"data": [
{
"llm_input": "Tell me something different",
"llm_output": "The lazy dog was jumped over by the quick brown fox"
},
{
"llm_input": "Write a short poem",
"llm_output": "Moonlight dancing on waves,\nStars whisper ancient tales,\nNight's gentle embrace"
}
],
"detailed_status": [
"Downloading model",
"Tuning prompt"
],
"job_id": "1234abcd",
"state": "RUNNING"
}