Knowledgebase Apis changed?
# support
e
Dear Team, earlier for provider trieve, I was able to create and update knowledgebase with fileIds and Website URLs in my request body. Now I dont see that any more in our knowledgebase documentation. Would like to know if we have made any recent changes to our APIS.
v
Yes, the Knowledge Base APIs for the Trieve provider have changed. You now import your Trieve dataset into Vapi by referencing the dataset ID (
providerId
), not by passing
fileIds
or website URLs directly. Here’s the current way to create a Trieve knowledge base:
Copy code
json
{
  "name": "trieve-dataset",
  "provider": "trieve",
  "searchPlan": {
    "scoreThreshold": 0.2,
    "searchType": "semantic"
  },
  "createPlan": {
    "type": "import",
    "providerId": "<Your Trieve Dataset ID>"
  }
}
Files and website crawls should be managed within Trieve, then imported as a dataset into Vapi. For more details, see the [integration guide](https://docs.vapi.ai/knowledge-base/integrating-with-trieve) and [API reference](https://docs.vapi.ai/api-reference/knowledge-bases/create). Sources: - [Integrating with Trieve](https://docs.vapi.ai/knowledge-base/integrating-with-trieve) - [Create Knowledge Base API Reference](https://docs.vapi.ai/api-reference/knowledge-bases/create)
e
@User Dear Team, earlier for provider trieve, I was able to create and update knowledgebase with fileIds and Website URLs in my request body. Now I dont see that any more in our knowledgebase documentation. Would like to know if we have made any recent changes to our APIS. Below is my sample request body for your reference. { "searchPlan": { "searchType": "semantic" }, "name": "Restaurant Assistant", "createPlan": { "chunkPlans": [ { "websites": [ "https://conversekit.io" ], "fileIds": [ "090256da-f892-46d6-b492-1672aee759bc" ] } ], "type": "create" }, "provider": "trieve" }
v
Message marked as helpful by @! AetherMind! 🎉
e
@! AetherMind bot answer was not helpful my friend,
v
Yes, there is a recent changes to the Vapi Knowledge Base API. If you're looking to update or create a knowledge base using the
trieve
provider, here's a brief on how to proceed: 1. **Create Knowledge Base**: To create a knowledge base, use the POST endpoint:
https://api.vapi.ai/knowledge-base
. Ensure your request body includes the necessary
trieve
object properties for creation. Here's an example of creating a knowledge base:
Copy code
bash
   curl -X POST https://api.vapi.ai/knowledge-base \
        -H "Authorization: Bearer <token>" \
        -H "Content-Type: application/json" \
        -d '{
          "provider": "trieve",
          "createPlan": {
            "type": "import",
            "providerId": "yourProviderId"
          }
        }'
Refer to the [Create Knowledge Base](https://docs.vapi.ai/api-reference/knowledge-bases/create) documentation for more details. 2. **Update Knowledge Base**: For updating an existing knowledge base, utilize the PATCH endpoint:
https://api.vapi.ai/knowledge-base/:id
. Include needed properties in the request body. Example for updating:
Copy code
bash
   curl -X PATCH https://api.vapi.ai/knowledge-base/<id> \
        -H "Authorization: Bearer <token>" \
        -H "Content-Type: application/json" \
        -d '{
          "provider": "trieve",
          "searchPlan": {
            "searchType": "fulltext"
          }
        }'
More details can be found [here](https://docs.vapi.ai/api-reference/knowledge-bases/update). These steps reflect the current documentation, and using
fileIds
or direct URLs in the request body may have been deprecated. Always ensure your requests align with the latest API specifications to avoid errors.
e
I can still see the request body that i have shared is working.. But, my question is what is the purpose of files, when you are not allowing to create knowledge base through files?
k
Files are used to build a knowledge base that your assistant can reference for accurate answers, but to work, the files must be properly linked in the assistant’s settings or via the API..
e
Hi Kings_big, hows that gonna happen... as per the previous documentation.. You need a knowledgebase to access those files. But, now knowledge base functionality entirely moved to personal trieve account or our BYOK.. In that case how should we include files into our Assitant?
k
Upload and organize your files in your Trieve account to create a knowledge base, then link this knowledge base to your assistant through Vapi’s dashboard settings for accurate reference during conversations..
e
if i had to upload into trieve then what is the purpose of files section
v
Vapi’s Files section is for quickly uploading documents to create a simple KB, while Trieve is used for advanced data organization and chunking before linking it to Vapi for more powerful assistant references..