[GH-ISSUE #4215] [BUG]: Unable to export chat logs from API on latest stable version #2681

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

Originally created by @NeoChen1024 on GitHub (Jul 30, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4215

Originally assigned to: @shatfield4 on GitHub.

How are you running AnythingLLM?

Docker (remote machine)

What happened?

When I tried to export chat logs from API (Curl or using the "try it out" feature on API docs page), it throws error, but when I export it from Web UI it works fine.

docker logs:

[backend] error: prepareWorkspaceChatsForExport is not a function TypeError: prepareWorkspaceChatsForExport is not a function
    at /app/server/endpoints/api/system/index.js:195:29
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at validApiKey (/app/server/utils/middleware/validApiKey.js:24:3)

Are there known steps to reproduce?

  1. Request chat logs export from API
Originally created by @NeoChen1024 on GitHub (Jul 30, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4215 Originally assigned to: @shatfield4 on GitHub. ### How are you running AnythingLLM? Docker (remote machine) ### What happened? When I tried to export chat logs from API (Curl or using the "try it out" feature on API docs page), it throws error, but when I export it from Web UI it works fine. docker logs: ``` [backend] error: prepareWorkspaceChatsForExport is not a function TypeError: prepareWorkspaceChatsForExport is not a function at /app/server/endpoints/api/system/index.js:195:29 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at validApiKey (/app/server/utils/middleware/validApiKey.js:24:3) ``` ### Are there known steps to reproduce? 1. Request chat logs export from API
yindo added the possible buginvestigating labels 2026-02-22 18:30:46 -05:00
yindo closed this issue 2026-02-22 18:30:46 -05:00
Author
Owner

@naaa760 commented on GitHub (Jul 30, 2025):

Hello @NeoChen1024

I fixed non-existent prepareWorkspaceChatsForExport function call by using correct exportChatsAsType function from convertTo module.

@naaa760 commented on GitHub (Jul 30, 2025): Hello @NeoChen1024 I fixed non-existent prepareWorkspaceChatsForExport function call by using correct exportChatsAsType function from convertTo module.
yindo changed title from [BUG]: Unable to export chat logs from API on latest stable version to [GH-ISSUE #4215] [BUG]: Unable to export chat logs from API on latest stable version 2026-06-05 14:47:57 -04:00
Author
Owner

@nehaaprasad commented on GitHub (Jul 30, 2025):

Hello @NeoChen1024

I fixed non-existent prepareWorkspaceChatsForExport function call by using correct exportChatsAsType function from convertTo module.

<!-- gh-comment-id:3137527782 --> @nehaaprasad commented on GitHub (Jul 30, 2025): Hello @NeoChen1024 I fixed non-existent prepareWorkspaceChatsForExport function call by using correct exportChatsAsType function from convertTo module.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2681