Assistant not reading file
# support
n
I'm glad to see the files feature back but this time the assistant does not read the content of the files selected from the files dropdown. Any suggestions. The knowledge base is still working but I am not able create trieve knowledge base with the API only gives the import option
v
Hi there! 👋 I found some information that might help with both of your issues: For the assistant not reading file content: There could be several reasons for this: 1. Check if your KnowledgeBase is properly linked to the assistant and verify configuration settings like
fileIds
,
searchType
, and
scoreThreshold
2. Confirm that the file IDs of your knowledge base files are correctly added to the assistant's model configuration under
knowledgeBase.fileIds
3. Ensure your file format is supported and doesn't contain problematic elements like complex formatting or non-text elements 4. Try clearing your browser cache and cookies or using a different browser 5. There might be syncing or indexing delays, so the assistant might recognize the files after some time For creating a knowledge base with API (import option only): This is actually expected behavior currently. There are syncing issues with creating knowledge bases directly through the VAPI API, which is why only the import option is available. The recommended workaround is to: 1. Create your dataset directly in Trieve 2. Then import this dataset into VAPI using the import method Here's a code example for importing from Trieve:
Copy code
bash
curl -X POST https://api.vapi.ai/knowledge-base \
-H "Authorization: Bearer YourVAPIApiKey" \
-H "Content-Type: application/json" \
-d '{
"name": "Your Knowledge Base Name",
"provider": "trieve",
"searchPlan": {
"searchType": "semantic",
"topK": 3,
"removeStopWords": true,
"scoreThreshold": 0.7
},
"createPlan": {
"type": "import",
"providerId": "YourTrieveDatasetID"
}
}'
Let me know if you need any clarification on these steps! Sources: - [Discord Thread about file reading issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336306333661663243) - [Discord Thread about file linking](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336727607533899786)
n
When I try Importing it from trieve using the api it always says{ "message": "Invalid Knowledge Base Details. Trieve credential not found", "error": "Bad Request", "statusCode": 400 } Where as the data set is present and chuked in trieve
as fot a suggestion from @Shubham Bajaj in another thread I aldo did configure the query tool, and the assistant is still not referencing the document
n
This means that you need to add your Trieve API key to Vapi in the provider keys section of the dashboard