Adding custom knowledge object in api is not worki...
# support
s
Error in POST handler for /api/agents/call: Error: makeCall API request failed with status: 400, body: {"message":["assistant.model.each value in knowledgeBase.an unknown value was passed to the validate function"],"error":"Bad Request","statusCode":400} maxDurationSeconds: 1805, assistant: { transcriber: { provider: "deepgram", model: "nova-2", }, model: { provider: llmProvider, model: llmModel, systemPrompt: systemPrompt, knowledgeBase: { server: { url: "https://agentvoice.com/api/trieve" } } }, Please help, I don't understand why this is not working? The knowledgeBase is apparently not constructed correctly. When i remove it the call works perfectly find but when I add it, it doesn't work at all. Any idea on what's going on here?
@User @Shubham Bajaj Pls help
v
The custom knowledge base requires a specific
provider
field to be set. Here's how to correctly structure the knowledge base configuration: \`\`\`typescript assistant: { transcriber: { provider: "deepgram", model: "nova-2", }, model: { provider: llmProvider, model: llmModel, systemPrompt: systemPrompt, knowledgeBase: { provider: 'custom-knowledge-base', // This is required server: { url: "" } } } } \`\`\` The reason this is happening: 1\. The validation is failing because the knowledge base configuration must specify a
provider
field with the value
'custom-knowledge-base'
To fix this: 1\. Always include the
provider: 'custom-knowledge-base'
in your knowledge base configuration 2\. Make sure the server object contains all required fields 3\. Follow the exact interface defined in
CreateCustomKnowledgeBaseDTO
s
Ah i got it! thanks so much for that!
in the create call documentation, it doesn't present that just so you guys are aware @Shubham Bajaj
v
✅ Ticket status updated to solved by Vapi Ticket Bot#0124