DELETE
/
v4
/
knowledge-bases
/
{knowledge_base_id}
/
artifacts
/
{artifact_id}
/
chunks
/
{chunk_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 chunk = await client.knowledgeBases.artifacts.chunks.delete(
    'knowledge_base_id',
    'artifact_id',
    'chunk_id',
  );

  console.log(chunk.artifact_id);
}

main();
{
  "deleted": true,
  "artifact_id": "<string>",
  "chunk_id": "<string>"
}

Authorizations

x-api-key
string
header
required

Path Parameters

knowledge_base_id
string
required
artifact_id
string
required
chunk_id
string
required

Response

200
application/json
Successful Response
deleted
boolean
required

Whether or not the artifact was successfully deleted

artifact_id
string
required

The ID of the artifact from which the chunk was deleted

chunk_id
string
required

The ID of the chunk that was deleted