PATCH
/
v4
/
knowledge-bases
/
{knowledge_base_id}
/
artifacts
/
{artifact_id}
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const artifact = await client.knowledgeBases.artifacts.update('knowledge_base_id', 'artifact_id');

  console.log(artifact.knowledge_base_id);
}

main();
{
  "artifact_id": "<string>",
  "knowledge_base_id": "<string>",
  "chunking_strategy_config": {
    "strategy": "character",
    "separator": "\n\n",
    "chunk_size": 1000,
    "chunk_overlap": 200
  },
  "artifact_name": "<string>",
  "artifact_uri": "<string>",
  "artifact_uri_public": "<string>",
  "content_modification_identifier": "<string>",
  "source": "S3",
  "status": "Pending",
  "status_reason": "<string>",
  "checkpoint": "Pending",
  "created_at": "<string>",
  "updated_at": "<string>",
  "deleted_at": "<string>",
  "tags": {}
}

Authorizations

x-api-key
string
header
required

Path Parameters

knowledge_base_id
string
required
artifact_id
string
required

Body

application/json
tags
object

Tags to associate with the artifact. Will overwrite existing tags.

Response

200
application/json
Successful Response
knowledge_base_id
string
required
artifact_name
string
required
artifact_uri
string
required
source
enum<string>
required
Available options:
S3,
SharePoint,
LocalFile,
LocalChunks,
GoogleDrive,
AzureBlobStorage,
Confluence,
Slack
status
enum<string>
required
Available options:
Pending,
Chunking,
Uploading,
Completed,
Failed,
Deleting,
Canceled,
Embedding
created_at
required
updated_at
required
artifact_id
string
chunking_strategy_config
object
artifact_uri_public
string
content_modification_identifier
string
status_reason
string
checkpoint
enum<string>
Available options:
Pending,
Chunking,
Uploading,
Completed,
Failed,
Deleting,
Canceled,
Embedding
deleted_at
tags
object