import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const createKnowledgeBaseUploadResponse = await client.knowledgeBases.uploads.create('knowledge_base_id', {
data_source_config: {
aws_account_id: 'aws_account_id',
aws_region: 'aws_region',
s3_bucket: 's3_bucket',
source: 'S3',
},
});
console.log(createKnowledgeBaseUploadResponse.upload_id);
{
"upload_id": "<string>"
}
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const createKnowledgeBaseUploadResponse = await client.knowledgeBases.uploads.create('knowledge_base_id', {
data_source_config: {
aws_account_id: 'aws_account_id',
aws_region: 'aws_region',
s3_bucket: 's3_bucket',
source: 'S3',
},
});
console.log(createKnowledgeBaseUploadResponse.upload_id);
{
"upload_id": "<string>"
}
Successful Response
The response is of type object
.