quaint-moccasin•15mo ago
Help with changing chunk size
Hello! I have trouble understanding how to make this post request. Is this done inside the workflow with API card/node? May you help me understand? Thank you!
https://developer.voiceflow.com/reference/post_v3alpha-knowledge-base-docs-upload

1 Reply
To change the chunk size for a document upload in Voiceflow, you need to make a POST request to the Knowledge Base API. Here’s how you can do it using an API card/node in your Voiceflow workflow:
1. API Endpoint: Use the endpoint
https://api.voiceflow.com/v3alpha/knowledge-base/docs/upload
.
2. Request Method: POST
3. Headers:
- Content-Type
: multipart/form-data
4. Query Parameters:
- overwrite
(optional): Set to true
if you want to overwrite existing data.
- maxChunkSize
(optional): Set the chunk size. The default is 1000
, and the range is 500-1500
tokens.
5. Body:
- Use form-data to include the document file. Accepted file types are pdf
, text
, or docx
.
Here’s an example of how to set this up in the API card/node:
API Card/Node Configuration
Method: POST
URL: https://api.voiceflow.com/v3alpha/knowledge-base/docs/upload
Headers:
Query Parameters:
Body:
- Add a form-data field for the file you want to upload.
Example Request
Example Response
For more details, you can refer to the Voiceflow API Documentation.