import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const resource = await client.workers.resources.retrieve('resourceId', { workerId: 'workerId' });
console.log(resource.id);
{
"id": "<string>",
"ragType": "FILE",
"lastUpdated": "2023-11-07T05:31:56Z",
"updateFrequency": "<string>",
"rawLink": "<string>",
"key": "<string>",
"s3FilePath": "<string>",
"imageS3FilePath": "<string>",
"signedS3FilePath": "<string>",
"numScrolls": 123,
"fileName": "<string>",
"mimeType": "<string>",
"status": "STARTED",
"processingError": "<string>",
"graphStatus": {},
"size": 123,
"uploadedAt": "2023-11-07T05:31:56Z",
"folderId": "<string>"
}
API key authentication
Resource details
The response is of type object
.
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const resource = await client.workers.resources.retrieve('resourceId', { workerId: 'workerId' });
console.log(resource.id);
{
"id": "<string>",
"ragType": "FILE",
"lastUpdated": "2023-11-07T05:31:56Z",
"updateFrequency": "<string>",
"rawLink": "<string>",
"key": "<string>",
"s3FilePath": "<string>",
"imageS3FilePath": "<string>",
"signedS3FilePath": "<string>",
"numScrolls": 123,
"fileName": "<string>",
"mimeType": "<string>",
"status": "STARTED",
"processingError": "<string>",
"graphStatus": {},
"size": 123,
"uploadedAt": "2023-11-07T05:31:56Z",
"folderId": "<string>"
}
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const resource = await client.workers.resources.retrieve('resourceId', { workerId: 'workerId' });
console.log(resource.id);
{
"id": "<string>",
"ragType": "FILE",
"lastUpdated": "2023-11-07T05:31:56Z",
"updateFrequency": "<string>",
"rawLink": "<string>",
"key": "<string>",
"s3FilePath": "<string>",
"imageS3FilePath": "<string>",
"signedS3FilePath": "<string>",
"numScrolls": 123,
"fileName": "<string>",
"mimeType": "<string>",
"status": "STARTED",
"processingError": "<string>",
"graphStatus": {},
"size": 123,
"uploadedAt": "2023-11-07T05:31:56Z",
"folderId": "<string>"
}
API key authentication
Resource details
The response is of type object
.
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const resource = await client.workers.resources.retrieve('resourceId', { workerId: 'workerId' });
console.log(resource.id);
{
"id": "<string>",
"ragType": "FILE",
"lastUpdated": "2023-11-07T05:31:56Z",
"updateFrequency": "<string>",
"rawLink": "<string>",
"key": "<string>",
"s3FilePath": "<string>",
"imageS3FilePath": "<string>",
"signedS3FilePath": "<string>",
"numScrolls": 123,
"fileName": "<string>",
"mimeType": "<string>",
"status": "STARTED",
"processingError": "<string>",
"graphStatus": {},
"size": 123,
"uploadedAt": "2023-11-07T05:31:56Z",
"folderId": "<string>"
}