@@ -24,7 +24,18 @@ The Query Tool is a powerful feature that allows your voice AI assistant to acce
2424
2525### ** Step 1: Upload Your Files**
2626
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:
2839
2940``` bash
3041curl --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.
3647
3748### ** Step 2: Create a Query Tool**
3849
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:
4067
4168``` bash
4269curl --location ' https://api.vapi.ai/tool/' \
@@ -69,9 +96,19 @@ curl --location 'https://api.vapi.ai/tool/' \
6996
7097### ** Step 3: Attach the Query Tool to Your Assistant**
7198
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:
73100
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:
75112
76113``` bash
77114curl --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' \
93130 just the toolIds field. This will overwrite any existing model configuration.
94131</Warning >
95132
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-
104133<Frame caption = " Adding a query tool to your assistant" >
105134 <img
106135 src = " ../static/images/knowledge-base/query-tool.png"
0 commit comments