Hi there! 👋 I understand you're having an issue with the knowledge base query tool not being used when interacting with the chat API.
I don't have specific information about why your particular setup isn't working, but I can help with some troubleshooting steps based on information I've found.
According to the information I found, Vapi has migrated from Canonical to Trieve for knowledge bases, which requires users to attach the Knowledge Base using the API. This might be why your knowledge base works when calling the assistant directly but not through the chat API.
Here are some troubleshooting steps you can try:
1. **Ensure the Knowledge Base is attached using the API**: After the migration to Trieve, it's necessary to attach the Knowledge Base using the API. According to [several sources](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336727607533899786), you need to explicitly attach the knowledge base through the API.
2. **Check your Trieve API key**: A missing Trieve API key in the VAPI provider credentials can prevent the knowledge base from working. According to [this source](
https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338536777719484426), you should create a Trieve account, add the file to create a Dataset (or just generate an API key), and then paste the API key into VAPI.
3. **Review your configuration settings**: Make sure your knowledge base configuration includes the correct search plan options. According to [the documentation](
https://docs.vapi.ai/knowledgebase), you can configure parameters such as:
- **searchType**: Options include
fulltext
,
semantic
,
hybrid
,
bm25
- **topK**: Number of top chunks to return
- **removeStopWords**: When true, removes common stop words
- **scoreThreshold**: Filters out chunks based on similarity score