import PiClient from 'withpi';
const client = new PiClient({
apiKey: process.env['WITHPI_API_KEY'], // This is the default and can be omitted
});
const dataGenerationStatuses = await client.data.generate.list();
console.log(dataGenerationStatuses);
Copy
[
{
"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"
}
]
Assistant
Responses are generated using AI and may contain mistakes.
The response is of type DataGenerationStatus · object[].
Copy
import PiClient from 'withpi';
const client = new PiClient({
apiKey: process.env['WITHPI_API_KEY'], // This is the default and can be omitted
});
const dataGenerationStatuses = await client.data.generate.list();
console.log(dataGenerationStatuses);
Copy
[
{
"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"
}
]
import PiClient from 'withpi';
const client = new PiClient({
apiKey: process.env['WITHPI_API_KEY'], // This is the default and can be omitted
});
const dataGenerationStatuses = await client.data.generate.list();
console.log(dataGenerationStatuses);
Copy
[
{
"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"
}
]
Assistant
Responses are generated using AI and may contain mistakes.
The response is of type DataGenerationStatus · object[].
Copy
import PiClient from 'withpi';
const client = new PiClient({
apiKey: process.env['WITHPI_API_KEY'], // This is the default and can be omitted
});
const dataGenerationStatuses = await client.data.generate.list();
console.log(dataGenerationStatuses);
Copy
[
{
"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"
}
]