[GH-ISSUE #352] /v1/workspace/{slug}/update-embeddings not working #202

Closed
opened 2026-02-22 18:18:20 -05:00 by yindo · 2 comments
Owner

Originally created by @LooproInc on GitHub (Nov 10, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/352

Hello! I’ve been able to successfully use all other API endpoints except for the embedding API. After a successful file upload to the workspace (visible on the frontend), the embedding continually returns {‘workspace’: None}. Could you please assist in resolving this issue?

Originally created by @LooproInc on GitHub (Nov 10, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/352 Hello! I’ve been able to successfully use all other API endpoints except for the embedding API. After a successful file upload to the workspace (visible on the frontend), the embedding continually returns {‘workspace’: None}. Could you please assist in resolving this issue?
yindo closed this issue 2026-02-22 18:18:20 -05:00
Author
Owner

@tlandenberger commented on GitHub (Nov 10, 2023):

Hi @LooproInc I've looked into the code and was able to reproduce the error. Looks like the return type of addDocuments function in documents.js is wrong when no documents were added.
So changing line 39 in document.js from
if (additions.length === 0) return;
to
if (additions.length === 0) return {failed: [], embedded: []};
fixed the issue for me. Could you check if this solves your problem and then we can create a pull request?

@tlandenberger commented on GitHub (Nov 10, 2023): Hi @LooproInc I've looked into the code and was able to reproduce the error. Looks like the return type of _addDocuments_ function in _documents.js_ is wrong when no documents were added. So changing line 39 in _document.js_ from `if (additions.length === 0) return;` to `if (additions.length === 0) return {failed: [], embedded: []};` fixed the issue for me. Could you check if this solves your problem and then we can create a pull request?
Author
Owner

@timothycarambat commented on GitHub (Nov 10, 2023):

closed by https://github.com/Mintplex-Labs/anything-llm/pull/353

@timothycarambat commented on GitHub (Nov 10, 2023): closed by https://github.com/Mintplex-Labs/anything-llm/pull/353
yindo changed title from /v1/workspace/{slug}/update-embeddings not working to [GH-ISSUE #352] /v1/workspace/{slug}/update-embeddings not working 2026-06-05 14:34:02 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#202