knowledgebase upload error
# support
s
Hello, I've been successfully using Vapi for a few weeks now. I'm suddenly seeing 2 new errors that I didn't earlier see when i try to upload to the knowledge base (please see below). curl --location 'https://api.vapi.ai/knowledge-base' \ --header 'Content-Type: text/plain' \ --header 'Authorization: Bearer 166877c3-cbb9-4c3b-b799-6fa5e61476d1' \ --data '{ "name": "v2", "provider": "trieve", "searchPlan": { "searchType": "semantic", "topK": 3, "removeStopWords": true, "scoreThreshold": 0.7 }, "createPlan": { "type": "create", "chunkPlans": [ { "fileIds": ["807926a9-c4a6-40a5-bb3d-1649b33c99ce"], "targetSplitsPerChunk": 50, "splitDelimiters": [".!?\n"], "rebalanceChunks": true } ] } }' {"message":"Invalid Knowledge Base Details. Error creating Trieve dataset (Status 403): Forbidden","error":"Bad Request","statusCode":400}
n
Hi Shraddha, we were able to help get this resolved and you should no longer have any issues here now! 🎊
m
It's not resolved
@Nick K - CEO @ Trieve
n
Are you getting the same 403 forbidden error?
m
"message": "Invalid Knowledge Base Details. Error creating Trieve dataset (Status 404): Not Found: Could not find dataset",
curl --location 'https://api.vapi.ai/knowledge-base' \ --header 'Content-Type: text/plain' \ --header 'Authorization: Bearer uuqoio-e1b7-4b8a-bc6a-wouoqwi' \ --header 'Cookie: _cfuvid=f_sG1sjHeP3eD_wFxZf.EskkTQmd5gZASzD1Zh3OEkY-1740718649678-0.0.1.1-604800000' \ --data '{ "name": "v2", "provider": "trieve", "searchPlan": { "searchType": "semantic", "topK": 3, "removeStopWords": true, "scoreThreshold": 0.7 }, "createPlan": { "providerId": "iuwoqp-d39c-4a4a-88cd-iwuqiuwoqw", "type": "create", "chunkPlans": [ { "fileIds": ["b0237d17-a0b0-4e6e-9879-70a98d8d09b4"], "websites": ["https://jtuyprjjgxbgmtjiykoa.supabase.co/storage/v1/object/public/files/1740635606058-qwoqioiq-5036-4ce8-b29e-qwuoiqowi.pdf"], "targetSplitsPerChunk": 50, "splitDelimiters": [".!?\n"], "rebalanceChunks": true } ] } }'
forged some values in this for security
org Id:
124f1bf9-711d-4978-a647-306d53d83a6a
n
Will investigate
m
Thanks but i am not sure why no one from support is answering my questions
as they asked me to use this
Copy code
POST https://api.vapi.ai/knowledge-base
Headers:
Authorization: Bearer {{vapi_api_key}}

Body:
{
  "name": "{{knowledge_base_name}}",
  "provider": "trieve",
  "searchPlan": {
    "scoreThreshold": 0.2,
    "searchType": "semantic"
  },
  "createPlan": {
    "type": "import",
    "providerId": "{{dataset_id}}"
  }
}
But I have query as what will be the case "I want to create a knowledge base with multiple files so that I can use it across multiple assistants. To achieve this, I first upload files to Vapi, use them to create a knowledge base (KB), and then assign the KB to an assistant. Given this setup, should I upload the files to different datasets on Trieve or store all files in a single dataset? If using a single dataset is the right approach, please provide the steps to follow. Additionally, if I upload files to multiple datasets, I understand that I would need to create multiple KBs. However, I am unsure how to manage and utilize multiple KBs within an assistant. Could you clarify this process?"
@Nick K - CEO @ Trieve
s
Hi Nick, my issue got resolved. Thanks for the quick response!
n
You should aim to have one dataset (AKA KB) per assistant
That's the right model
s
Thanks @Nick K - CEO @ Trieve for helping @Shraddha and @mauryasumit
Apologies @Shraddha and @mauryasumit for the delayed response.
2 Views