@@ -24,7 +24,18 @@ The Query Tool is a powerful feature that allows your voice AI assistant to acce
24
24
25
25
### ** Step 1: Upload Your Files**
26
26
27
- Before creating a query tool, you need to upload the files that will form your knowledge base. You can upload files via the API:
27
+ Before creating a query tool, you need to upload the files that will form your knowledge base.
28
+
29
+ #### Option 1: Using the Dashboard (Recommended)
30
+
31
+ 1 . Navigate to ** Files** in your Vapi dashboard
32
+ 2 . Click ** Upload File** or ** Choose file**
33
+ 3 . Select the files you want to upload from your computer
34
+ 4 . Wait for the upload to complete and note the file IDs that are generated
35
+
36
+ #### Option 2: Using the API
37
+
38
+ Alternatively, you can upload files via the API:
28
39
29
40
``` bash
30
41
curl --location ' https://api.vapi.ai/file' \
@@ -36,7 +47,23 @@ After uploading, you'll receive file IDs that you'll need for the next step.
36
47
37
48
### ** Step 2: Create a Query Tool**
38
49
39
- Use the following API call to create a query tool that references your knowledge base files:
50
+ Create a query tool that references your knowledge base files:
51
+
52
+ #### Option 1: Using the Dashboard (Recommended)
53
+
54
+ 1 . Navigate to ** Tools** in your Vapi dashboard
55
+ 2 . Click ** Create Tool**
56
+ 3 . Select ** Query** as the tool type
57
+ 4 . Configure the tool:
58
+ - ** Tool Name** : "Product Query"
59
+ - ** Knowledge Bases** : Add your knowledge base with:
60
+ - ** Name** : ` product-kb `
61
+ - ** Description** : "Use this knowledge base when the user asks or queries about the product or services"
62
+ - ** File IDs** : Select the files you uploaded in Step 1
63
+
64
+ #### Option 2: Using the API
65
+
66
+ Alternatively, you can create the tool via API:
40
67
41
68
``` bash
42
69
curl --location ' https://api.vapi.ai/tool/' \
@@ -69,9 +96,19 @@ curl --location 'https://api.vapi.ai/tool/' \
69
96
70
97
### ** Step 3: Attach the Query Tool to Your Assistant**
71
98
72
- After creating the query tool, you'll receive a tool ID. Use this ID to attach the tool to your assistant:
99
+ After creating the query tool, you need to attach it to your assistant:
73
100
74
- #### Option 1: Using the API
101
+ #### Option 1: Using the Dashboard (Recommended)
102
+
103
+ 1 . Navigate to ** Assistants** in your Vapi dashboard
104
+ 2 . Select the assistant you want to configure
105
+ 3 . Go to the ** Tools** section
106
+ 4 . Click ** Add Tool** and select your query tool from the dropdown
107
+ 5 . Save and publish your assistant
108
+
109
+ #### Option 2: Using the API
110
+
111
+ Alternatively, you can attach the tool via API using the tool ID:
75
112
76
113
``` bash
77
114
curl --location --request PATCH ' https://api.vapi.ai/assistant/ASSISTANT_ID' \
@@ -93,14 +130,6 @@ curl --location --request PATCH 'https://api.vapi.ai/assistant/ASSISTANT_ID' \
93
130
just the toolIds field. This will overwrite any existing model configuration.
94
131
</Warning >
95
132
96
- #### Option 2: Using the Dashboard
97
-
98
- 1 . Navigate to the Assistant section in your Vapi dashboard
99
- 2 . Select the assistant you want to configure
100
- 3 . Go to the Tools section
101
- 4 . Add the query tool by selecting it from the available tools
102
- 5 . Save and publish your assistant
103
-
104
133
<Frame caption = " Adding a query tool to your assistant" >
105
134
<img
106
135
src = " ../static/images/knowledge-base/query-tool.png"
0 commit comments