Skip to content

Commit

Permalink
fix document creation providing collection_ids in js sdk (#1989)
Browse files Browse the repository at this point in the history
  • Loading branch information
dieguit authored Feb 19, 2025
1 parent eab910b commit 943aef7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions js/sdk/src/v3/clients/documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@ export class DocumentsClient {
JSON.stringify(options.ingestionConfig),
);
}
if (options.collectionIds) {
options.collectionIds.forEach((id) => {
formData.append("collection_ids", id);
});
if (options.collectionIds?.length) {
formData.append("collection_ids", JSON.stringify(options.collectionIds));
}
if (options.runWithOrchestration !== undefined) {
formData.append(
Expand Down

0 comments on commit 943aef7

Please sign in to comment.