Knowledge base creation endpoint missing "create"
# support
r
Did you guys change the POST https://api.vapi.ai/knowledge-base endpoint to create a knowledge base, where the createPlan does not support type: 'create' anymore? I.e. Did you make a breaking change that doesn't allow us to create KBs directly through that endpoint? Or is it just an error in the documentation? We are sending the following, which was in the API reference before:
Copy code
const createPlan: TrieveKnowledgeBaseCreate = {
                type: 'create',
                chunkPlans: [
                    {
                        fileIds: [fileResponse.id],
                        websites: [],
                        targetSplitsPerChunk: 1,
                        splitDelimiters: ['~'],
                    },
                ],
            };
https://cdn.discordapp.com/attachments/1363865039299416114/1363865039538360430/image.png?ex=680795cc&is=6806444c&hm=f87f019316afbda39056326a96de6acd7276f947812dec964fcb9ffc2fac3fa6&
s
The
create
option is still valid and implemented in the code, but it has been explicitly hidden from the API documentation. The
Create
option has been commented out in the OpenAPI schema definition, while the
Import
option remains exposed. This means: 1. The functionality for
type: 'create'
is still fully implemented in the codebase (as seen in the transform function's switch statement that handles both create and import cases) 2. The API will still accept and properly process requests with
type: 'create'
3. However, this option is intentionally hidden from the API documentation/OpenAPI specification the documentation would no longer show this as a valid option, but the code still supports it. This is likely a case where the API is being evolved, but backward compatibility is maintained for existing integrations.
r
It seems to still work yes, but is there a reason for hiding it? Are we not supposed to create Trieve KBs through the API?
s
There isn't any reason to hide it, but to avoid any complexities that come with it. That's why we want people to pivot to the query-based KB tool so they don't have to deal with the hallucinations and tool calls not working.
k
@radu
r
Do you have a place to point me to for the query-based KB tool please?
s
You can follow this documentation on how to set up a query tool based KB.
r
Thank you for the link!
2 Views