Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions fern/community/knowledgebase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Navigate to Platform > Files and upload your custom files in Markdown, PDF, plai

<Frame caption="Adding files to your Knowledge Base">
<img
src="../static/images/knowledge-base/files.png"
src="/static/images/knowledge-base/files.png"
alt="Adding files to your Knowledge Base"
/>
</Frame>
Expand All @@ -46,20 +46,28 @@ curl --location 'https://api.vapi.ai/file' \
Use the ID of the uploaded file to create a Knowledge Base. Currently we support [trieve](https://trieve.ai) as a provider.

```bash
curl --location 'https://api.vapi.ai/knowledge-base' \
curl --location 'http://localhost:3001/knowledge-base' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Authorization: Bearer 4beb7e10-f4be-4588-be65-712235f07f68' \
--data '{
"name": "knowledge-base-test",
"name": "v2",
"provider": "trieve",
"vectorStoreSearchPlan": {
"scoreThreshold": 0.1,
"searchType": "hybrid"
"searchPlan": {
"scoreThreshold": 0.2,
"searchType": "semantic"
},
"vectorStoreCreatePlan": {
"fileIds": ["<FILE_ID>"]
"createPlan": {
"type": "create",
"chunkPlans": [
{
"fileIds": ["<FILE_ID_1>", "<FILE_ID_2>"],
"websites": ["<WEBSITE_1>", "<WEBSITE_2>"],
"targetSplitsPerChunk": 50,
"rebalanceChunks": true
}
]
}
}'
}''
```

### **Step 3: Create an Assistant**
Expand Down
15 changes: 9 additions & 6 deletions fern/customization/bring-your-own-vectors/trieve.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,24 @@ You might want to use both Trieve's native interface and Vapi simultaneously:
2. **Create a New Knowledge Base**

- When setting up a new knowledge base, provide:
- Your Trieve datasetId as the vectorStoreProviderId
- Appropriate search configuration parameters
- Vapi will then connect to your existing Trieve vectors
- Your Trieve datasetId as the providerId.
- Appropriate search configuration parameters.
- Vapi will then automatically use your Trieve dataset as the knowledge base.

Example configuration:

```json
{
"name": "byok-test",
"name": "trieve-byok",
"provider": "trieve",
"vectorStoreSearchPlan": {
"searchPlan": {
"scoreThreshold": 0.2,
"searchType": "semantic"
},
"vectorStoreProviderId": "<Your datasetId from Trieve>"
"createPlan": {
"type": "import",
"providerId": "<Your datasetId from Trieve>"
}
}
```

Expand Down
28 changes: 18 additions & 10 deletions fern/customization/knowledgebase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Navigate to Platform > Files and upload your custom files in Markdown, PDF, plai

<Frame caption="Adding files to your Knowledge Base">
<img
src="../static/images/knowledge-base/files.png"
src="./static/images/knowledge-base/files.png"
alt="Adding files to your Knowledge Base"
/>
</Frame>
Expand All @@ -46,20 +46,28 @@ curl --location 'https://api.vapi.ai/file' \
Use the ID of the uploaded file to create a Knowledge Base. Currently we support [trieve](https://trieve.ai) as a provider.

```bash
curl --location 'https://api.vapi.ai/knowledge-base' \
curl --location 'http://localhost:3001/knowledge-base' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Authorization: Bearer 4beb7e10-f4be-4588-be65-712235f07f68' \
--data '{
"name": "knowledge-base-test",
"name": "v2",
"provider": "trieve",
"vectorStoreSearchPlan": {
"scoreThreshold": 0.1,
"searchType": "hybrid"
"searchPlan": {
"scoreThreshold": 0.2,
"searchType": "semantic"
},
"vectorStoreCreatePlan": {
"fileIds": ["<FILE_ID>"]
"createPlan": {
"type": "create",
"chunkPlans": [
{
"fileIds": ["<FILE_ID_1>", "<FILE_ID_2>"],
"websites": ["<WEBSITE_1>", "<WEBSITE_2>"],
"targetSplitsPerChunk": 50,
"rebalanceChunks": true
}
]
}
}'
}''
```

### **Step 3: Create an Assistant**
Expand Down
26 changes: 17 additions & 9 deletions fern/knowledgebase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,28 @@ curl --location 'https://api.vapi.ai/file' \
Use the ID of the uploaded file to create a Knowledge Base. Currently we support [trieve](https://trieve.ai) as a provider.

```bash
curl --location 'https://api.vapi.ai/knowledge-base' \
curl --location 'http://localhost:3001/knowledge-base' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Authorization: Bearer 4beb7e10-f4be-4588-be65-712235f07f68' \
--data '{
"name": "knowledge-base-test",
"name": "v2",
"provider": "trieve",
"vectorStoreSearchPlan": {
"scoreThreshold": 0.1,
"searchType": "hybrid"
"searchPlan": {
"scoreThreshold": 0.2,
"searchType": "semantic"
},
"vectorStoreCreatePlan": {
"fileIds": ["<FILE_ID>"]
"createPlan": {
"type": "create",
"chunkPlans": [
{
"fileIds": ["<FILE_ID_1>", "<FILE_ID_2>"],
"websites": ["<WEBSITE_1>", "<WEBSITE_2>"],
"targetSplitsPerChunk": 50,
"rebalanceChunks": true
}
]
}
}'
}''
```

### **Step 3: Create an Assistant**
Expand Down
Loading