import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const artifact = await client.knowledgeBases.artifacts.update('knowledge_base_id', 'artifact_id');
console.log(artifact.knowledge_base_id);{
"knowledge_base_id": "<string>",
"artifact_name": "<string>",
"artifact_uri": "<string>",
"source": "S3",
"status": "Pending",
"created_at": "<string>",
"updated_at": "<string>",
"artifact_id": "<string>",
"chunking_strategy_config": {
"strategy": "<string>",
"separator": "\n\n",
"chunk_size": 1000,
"chunk_overlap": 200
},
"artifact_uri_public": "<string>",
"content_modification_identifier": "<string>",
"status_reason": "<string>",
"checkpoint": "Pending",
"deleted_at": "<string>",
"tags": {}
}import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const artifact = await client.knowledgeBases.artifacts.update('knowledge_base_id', 'artifact_id');
console.log(artifact.knowledge_base_id);{
"knowledge_base_id": "<string>",
"artifact_name": "<string>",
"artifact_uri": "<string>",
"source": "S3",
"status": "Pending",
"created_at": "<string>",
"updated_at": "<string>",
"artifact_id": "<string>",
"chunking_strategy_config": {
"strategy": "<string>",
"separator": "\n\n",
"chunk_size": 1000,
"chunk_overlap": 200
},
"artifact_uri_public": "<string>",
"content_modification_identifier": "<string>",
"status_reason": "<string>",
"checkpoint": "Pending",
"deleted_at": "<string>",
"tags": {}
}Tags to associate with the artifact. Will overwrite existing tags.
Successful Response
S3, SharePoint, SharePointPage, LocalFile, LocalChunks, GoogleDrive, AzureBlobStorage, Confluence, Slack, Snowflake, Databricks, SQLDatabase Pending, Chunking, Uploading, Completed, Failed, Deleting, Canceled, Embedding Show child attributes
Pending, Chunking, Uploading, Completed, Failed, Deleting, Canceled, Embedding