Knowledge base uploading
# support
p
I have checked the ways to upload knowledge base in the documentation but I can understand fully well. How do I upload a knowledge base on my vapi account?
v
Hi there! πŸ‘‹ I understand you're having trouble figuring out how to upload a knowledge base to your Vapi account. I'd be happy to help clarify this process! Currently, Vapi is in the process of migrating from Canonical to Trieve for knowledge base management, which means the UI for uploading knowledge bases is temporarily unavailable. Instead, you'll need to use the API method to upload your knowledge base. Here's how you can upload a knowledge base to your Vapi account: ## Step 1: Prepare your files You can upload files in [Markdown, PDF, plain text, or Microsoft Word (.doc and .docx) formats](https://docs.vapi.ai/knowledge-base). Make sure your files are under 100MB. ## Step 2: Upload your files to Vapi You can upload your files via the API using a curl command like this:
Copy code
curl --location 'https://api.vapi.ai/file' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--form 'file=@"<PATH_TO_YOUR_FILE>"'
## Step 3: Create a knowledge base using Trieve Due to the migration, the recommended method is to: 1. Create a dataset in Trieve and upload your KB files directly to Trieve 2. Generate a new Trieve API key and paste it into the credential provider in Vapi 3. Import your KB to Vapi by making a POST request to the Vapi API knowledge-base route ## Step 4: Make the API call to create the knowledge base Make a POST request to
https://api.vapi.ai/knowledge-base
with a JSON payload like this:
Copy code
json
{
  "name": "name your kb file",
  "provider": "trieve",
  "searchPlan": {
    "scoreThreshold": 0.2,
    "searchType": "semantic"
  },
  "createPlan": {
    "type": "import",
    "providerId": "<Your Trieve Dataset ID>"
  }
}
For a more detailed breakdown, you can check out [this documentation on integrating with Trieve](https://docs.vapi.ai/knowledge-base/integrating-with-trieve).
There are also helpful video tutorials available, such as [this Loom video](https://www.loom.com/share/9986c175aef146f9b85631414d5e1d67?sid=71983154-6216-477d-b79a-d6e890002a73) that walks through the process. Is there a specific part of this process you'd like me to explain in more detail? Sources: - [Knowledge base uploading in Vapi](https://docs.vapi.ai/knowledgebase) - [Supported file formats for knowledge base uploads](https://docs.vapi.ai/knowledge-base) - [Detailed steps to upload a knowledge base](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343737211828568155) - [Video tutorial for knowledge base uploading](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336887159948316733)
k
Hey, you can check out the video

β–Ύ

on how to set up the KB using VAPI and then the documentation for more details. Go through it and let me know how it goes for you.