Skip to content

Commit 7b6a90b

Browse files
ramsribskeptrunedev
authored andcommitted
Removed support create option in trieve integration (#231)
1 parent 0481762 commit 7b6a90b

File tree

2 files changed

+15
-86
lines changed

2 files changed

+15
-86
lines changed

fern/knowledge-base/integrating-with-trieve.mdx

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,11 @@ slug: knowledge-base/integrating-with-trieve
66

77
# Using Trieve with Vapi
88

9-
Vapi offers two ways to integrate with [Trieve](https://trieve.ai):
9+
Vapi integrates with [Trieve](https://trieve.ai) through the BYOD (Bring Your Own Dataset) approach, allowing you to use your Trieve API key to import your existing Trieve datasets into Vapi.
1010

11-
1. **Direct Integration**: Create and manage Trieve datasets directly through Vapi
12-
2. **BYOK (Bring Your Own Key)**: Use your Trieve API key to import your existing Trieve datasets into Vapi
11+
## Integrating with Trieve
1312

14-
## Direct Integration with Trieve
15-
16-
When using Trieve directly through Vapi, you can create and manage datasets, but they'll be tied to Vapi's account. This approach offers:
17-
18-
- Quick setup with minimal configuration
19-
- Basic dataset management through Vapi's API
20-
- Limited customization options
21-
22-
### Setting up Direct Integration
23-
24-
1. Navigate to the [Vapi dashboard credentials page](https://dashboard.vapi.ai/keys)
25-
2. Add your Trieve API key from [Trieve's dashboard](https://dashboard.trieve.ai/org/keys)
26-
3. Create a new knowledge base with Trieve as the provider:
27-
28-
```json
29-
{
30-
"name": "my-trieve-kb",
31-
"provider": "trieve",
32-
"searchPlan": {
33-
"scoreThreshold": 0.2,
34-
"searchType": "semantic"
35-
},
36-
"createPlan": {
37-
"type": "create",
38-
"chunkPlans": [
39-
{
40-
"fileIds": ["file-123", "file-456"],
41-
"websites": ["https://example.com"],
42-
"targetSplitsPerChunk": 50,
43-
"rebalanceChunks": true
44-
}
45-
]
46-
}
47-
}
48-
```
49-
50-
## BYOK with Trieve (Recommended)
51-
52-
The BYOK approach offers more flexibility and control over your datasets. You can:
13+
The BYOD approach offers flexibility and control over your datasets. You can:
5314

5415
- Fully manage your datasets in Trieve's native interface
5516
- Use Trieve's advanced features like:
@@ -293,12 +254,12 @@ Use Trieve's search playground to:
293254

294255
1. Create your Trieve API key from [Trieve's dashboard](https://dashboard.trieve.ai/org/keys)
295256
2. Add your Trieve API key to Vapi [Provider Credentials](https://dashboard.vapi.ai/keys)
296-
![Add Trieve API key in Vapi](../static/images/knowledge-base/trieve-credential.png)
257+
![Add Trieve API key in Vapi](../static/images/knowledge-base/trieve-credential.png)
297258
3. Once your dataset is optimized in Trieve, import it to Vapi:
298259

299260
```json
300261
{
301-
"name": "trieve-byok",
262+
"name": "trieve-dataset",
302263
"provider": "trieve",
303264
"searchPlan": {
304265
"scoreThreshold": 0.2,

fern/knowledgebase.mdx

Lines changed: 10 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,18 @@ Using a Knowledge Base with your voice AI assistant offers several benefits:
2020

2121
## **How to Create a Knowledge Base**
2222

23-
To create a Knowledge Base, follow these steps:
23+
To create a Knowledge Base with Trieve, follow these steps:
2424

25-
### **Step 1: Upload Your Files**
25+
### **Step 1: Create a Knowledge Base with Trieve**
2626

27-
Navigate to Platform > Files and upload your custom files in Markdown, PDF, plain text, or Microsoft Word (.doc and .docx) format to Vapi's Knowledge Base.
28-
29-
<Frame caption="Adding files to your Knowledge Base">
30-
<img
31-
src="./static/images/knowledge-base/files.png"
32-
alt="Adding files to your Knowledge Base"
33-
/>
34-
</Frame>
35-
36-
Alternatively you can upload your files via the API.
37-
38-
```bash
39-
curl --location 'https://api.vapi.ai/file' \
40-
--header 'Authorization: Bearer <YOUR_API_KEY>' \
41-
--form 'file=@"<PATH_TO_YOUR_FILE>"'
42-
```
43-
44-
### **Step 2: Create a Knowledge Base**
45-
46-
Use the ID of the uploaded file to create a Knowledge Base along with the KB configurations.
47-
48-
1. Provider: [trieve](https://trieve.ai)
27+
Vapi integrates with [Trieve](https://trieve.ai) using the BYOD (Bring Your Own Dataset) approach. First, create and optimize your dataset in Trieve (see our [Integrating with Trieve guide](knowledge-base/integrating-with-trieve) for detailed instructions), then import it to Vapi:
4928

5029
```bash
5130
curl --location 'https://api.vapi.ai/knowledge-base' \
5231
--header 'Content-Type: text/plain' \
5332
--header 'Authorization: Bearer <YOUR_API_KEY>' \
5433
--data '{
55-
"name": "v2",
34+
"name": "trieve-dataset",
5635
"provider": "trieve",
5736
"searchPlan": {
5837
"searchType": "semantic",
@@ -61,16 +40,8 @@ curl --location 'https://api.vapi.ai/knowledge-base' \
6140
"scoreThreshold": 0.7
6241
},
6342
"createPlan": {
64-
"type": "create",
65-
"chunkPlans": [
66-
{
67-
"fileIds": ["<FILE_ID_1>", "<FILE_ID_2>"],
68-
"websites": ["<WEBSITE_1>", "<WEBSITE_2>"],
69-
"targetSplitsPerChunk": 50,
70-
"splitDelimiters": [".!?\n"],
71-
"rebalanceChunks": true
72-
}
73-
]
43+
"type": "import",
44+
"providerId": "<YOUR_TRIEVE_DATASET_ID>"
7445
}
7546
}'
7647
```
@@ -91,15 +62,12 @@ curl --location 'https://api.vapi.ai/knowledge-base' \
9162
- For Manhattan Distance, Euclidean Distance, and Dot Product: Excludes chunks above the threshold
9263
- Set to 0 or omit for no threshold
9364

94-
##### Chunk Plan Options
65+
##### Import Options
9566

96-
- **fileIds** (optional): Array of file IDs to include in the vector store
97-
- **websites** (optional): Array of website URLs to crawl and include in the vector store
98-
- **targetSplitsPerChunk** (optional): Number of splits per chunk. Default: `20`
99-
- **splitDelimiters** (optional): Array of delimiters used to split text before chunking. Default: `[".!?\n"]`
100-
- **rebalanceChunks** (optional): When true, evenly distributes remainder splits across chunks. For example, 66 splits with `targetSplitsPerChunk: 20` will create 3 chunks with 22 splits each. Default: `true`
67+
- **providerId** (required): The ID of your Trieve dataset that you want to import
68+
- **type** (required): Must be set to "import" for the BYOD approach
10169

102-
### **Step 3: Create an Assistant**
70+
### **Step 2: Create an Assistant**
10371

10472
Create a new assistant in Vapi and, on the right sidebar menu. Add the Knowledge Base to your assistant via the PATCH endpoint. Also make sure you customize your assistant's system prompt to utilize the Knowledge Base for responding to user queries.
10573

0 commit comments

Comments
 (0)