Attaching a file id for knowledge base when creati...
# support
s
Quick question about file attachments and knowledge base sources in the API: 1. For files uploaded via API (with a file ID), should I select 'Custom' or 'Canonical' as the knowledge base source? 2. Does 'Canonical' refer to VAPI uploads? 3. Could someone clarify the correct path for including file IDs in API calls? I'm assuming it's structured like this: { "assistant": { "model": { "openai": { "knowledgeBase": { "Canonical": "file_id_here" } } } } } Is this the correct structure? https://cdn.discordapp.com/attachments/1310514452990525461/1310514453170622495/image.png?ex=67457f31&is=67442db1&hm=b50a7d060ce0d284343903ce1ebc0703ccedc593585fcb2fbf514b814145bb12&
v
@SlaviSavanovic 1. When you upload files via the API and reference them later, you should select 'Custom' as the knowledge base source if you are referring to files that are specific to your application or use case. 'Canonical' is typically used for pre-existing or standard knowledge bases provided by the API. 2. 'Canonical' does not specifically refer to VAPI uploads. It usually refers to a standard set of knowledge that the API might have built-in, which is universally applicable and not specific to any single user or organization. 3. The structure you've provided seems to be for a different API. For VAPI, to include file IDs in API calls, you would typically use the file ID in the endpoint or the body of the request where the file is being referenced. The exact structure would depend on the specific API call you're making. If you need to reference a file by its ID, you would use the 'id' field provided in the context. If you can provide more details on the API call you're trying to make, I can give you a more precise answer.
You can continue this conversation by mentioning me in the message.
s
@User pls help
@Shubham Bajaj I know you're busy (: any help here would be awesome
e
@Vapi I'm using custom llm and I have files added as knowledge based when I received the request from my server only a portion of the content of the file is referenced in the request?
v
@EwKadiriAmpTae It sounds like you're using a custom language model (LLM) and have added files as a knowledge base. If only a portion of the content from the file is being referenced in the request, this could be due to the way the knowledge base is being queried or limitations on the amount of content that can be processed in a single request. To ensure that the correct portion of the file is being used as a knowledge base, you should: - Make sure that the file ID is correctly referenced in the API call. - Check if there are any parameters that specify which parts of the file to use, such as start and end tokens or sections. - Verify that the file content is properly formatted and structured in a way that the LLM can effectively parse and understand it. If you're still having trouble with the API call structure or how to reference the file ID correctly, please provide more details about the API endpoint you're using and the exact structure of your request. This will help me give you more specific guidance. If the issue persists, you might need to reach out to support for more detailed assistance.
s
@User @Shubham Bajaj anything?
s
@SlaviSavanovic our current KB provider has shutdown their services and we are working on new KB providers. So, allow us a week time for new changes to go live. #1211483332496465962
Do let me know your thoughts on this.
s
@Shubham Bajaj awesome thanks for letting me know. So there is no way to attach a file to the agents for now?
s
@SlaviSavanovic KB new changes are out you can learn more about it from here https://docs.vapi.ai/knowledgebase
5 Views