https://retellai.com/?utm_source=discord&utm_medium=seo logo
API knowledge base bug
# ❓・bug-report
d
Hi Retell Support Team, I'm experiencing consistent failures when using the addSources API endpoint to add documents to existing knowledge bases. Issue Summary: The knowledgeBase.addSources() method fails with 400 or 500 errors when attempting to add knowledge_base_texts to an existing knowledge base. SDK Version: retell-sdk v4.59.0 What Works: Creating a NEW knowledge base with knowledge_base_texts using knowledgeBase.create() works perfectly What Fails: Adding texts to an EXISTING knowledge base using knowledgeBase.addSources() consistently returns errors Code Example: // This FAILS with 400/500 errors: await client.knowledgeBase.addSources(existingKbId, { knowledge_base_texts: [{ title: "document_name", text: "Document content here...", }], }); // This WORKS fine: await client.knowledgeBase.create({ knowledge_base_name: "New KB", knowledge_base_texts: [{ title: "document_name", text: "Document content here...", }], }); Error Response: Status: 400 Bad Request or 500 Internal Server Error No specific error message provided Workaround: Currently creating a new KB per document, which works but is less cost-efficient (uses more KBs than necessary). Request: Could you please investigate the addSources endpoint for text-based additions? This would allow us to group multiple documents into shared knowledge bases as intended.
o
Hello @drsampath1990_23915 , The Knowledge base API for create / add only works for the SDK now , I just test the same exact code you provided and it works fine https://cdn.discordapp.com/attachments/1448946789385371668/1449095981592482017/image.png?ex=693da74c&is=693c55cc&hm=4fb62ad9d55af2bd7731fe03b9bd42abdba817a87703ca4db02ac6f8dd89ca37&
m
Just received an email from retell that it works again. I had this same issue
y
@Omar Ashraf | Community Lead I'm experiencing the same issues I've tried different ways but still getting this issue: [cx-support/extra-prompts] Failed to sync with Retell KB: TypeError: retell_sdk__WEBPACK_IMPORTED_MODULE_0___default(...) is not a constructor
o
Hello Can you create a new ticket , and share this part of the code , and a screenshot of the error
y
Sure!
s
Has this been solved? I am still having the issue