Update knowledge base entry
Beta
Updates a knowledge base entry with training content. This is the second step in the training process after creating an entry. You can provide "rawText" which is the content you want your replica to learn from (such as product information, company policies, or specialized knowledge). The system will automatically process this text and make it available for your replica to use when answering questions. The entry status will change to PROCESSING and then to READY once fully processed.
Path parameters
-
replicaUUID
string(uuid) Required The UUID of the Replica
-
trainingID
number | null The ID of the knowledge base entry
Body
-
rawText
string The text content you want your replica to learn
Minimum length is
1
. -
processedText
string Pre-processed text ready for the knowledge base
Minimum length is
1
. -
vectorEntryId
string ID of the vector entry in the database
-
metadata
object Additional information about the knowledge base entry (only used with vectorEntryId)
Additional properties are allowed.
curl \
--request PUT 'https://api.sensay.io/v1/replicas/03db5651-cb61-4bdf-9ef0-89561f7c9c53/training/{trainingID}' \
--header "X-ORGANIZATION-SECRET: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"rawText":"Our company was founded in 2020. We specialize in AI-powered customer service solutions.","processedText":"Our company was founded in 2020. We specialize in AI-powered customer service solutions.","vectorEntryId":"1337","metadata":{"page":42,"tags":["company info","history"],"source":"company handbook"}}'
{
"rawText": "Our company was founded in 2020. We specialize in AI-powered customer service solutions.",
"processedText": "Our company was founded in 2020. We specialize in AI-powered customer service solutions.",
"vectorEntryId": "1337",
"metadata": {
"page": 42,
"tags": [
"company info",
"history"
],
"source": "company handbook"
}
}
{
"success": true
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
{
"success": true,
"error": "string",
"fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
"request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
"inner_exception": {
"name": "Server overheated",
"cause": "Request too complicated",
"stack": "Error: Server overheated due to an unexpected situation\n at Object.eval (eval at <anonymous>...",
"message": "The server overheated due to an unexpected situation"
}
}