[GH-ISSUE #4806] [BUG]: attachments parameter in the API doesn't work #3026

Closed
opened 2026-02-22 18:32:18 -05:00 by yindo · 5 comments
Owner

Originally created by @shidafei on GitHub (Dec 23, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4806

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

api /v1/workspace/{slug}/chat attachments parameter doesn't work
AnythingLLM Desktop 1.9.1 for windows(x64)

Image Image

Are there known steps to reproduce?

No response

Originally created by @shidafei on GitHub (Dec 23, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4806 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? api /v1/workspace/{slug}/chat attachments parameter doesn't work AnythingLLM Desktop 1.9.1 for windows(x64) <img width="1443" height="950" alt="Image" src="https://github.com/user-attachments/assets/5d56b524-d4d7-4fa2-a3eb-1076b8b3e047" /> <img width="1474" height="954" alt="Image" src="https://github.com/user-attachments/assets/b98e333f-59e9-44d7-babd-6255502a338f" /> ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:32:18 -05:00
yindo closed this issue 2026-02-22 18:32:18 -05:00
Author
Owner

@shatfield4 commented on GitHub (Dec 23, 2025):

I have tested this and it is working for me using the same endpoint. Here is the request body I used:

{
  "message": "What is the quantity of apples in this document?",
  "mode": "chat",
  "sessionId": "identifier-to-partition-chats-by-external-id",
  "attachments": [
    {
      "name": "text.txt",
      "mime": "application/anythingllm-document",
      "contentString": "data:text/plain;base64,YXBwbGUgaXMgMTANCmJhbmFuYSBpcyAzNw=="
    }
  ],
  "reset": false
}

and here is the response I got back:

{
  "id": "ab0e41d2-cab9-4ee5-9526-f3543262d723",
  "type": "textResponse",
  "close": true,
  "error": null,
  "chatId": 2,
  "textResponse": "The quantity of apples is 10.",
  "sources": [
    {
      "text": "apple is 10\r\nbanana is 37...continued on in source document...",
      "id": "dd90371e-8092-49e8-b05e-d30be86b0b2c",
      "url": "file:///Users/seanhatfield/Documents/Mintplex/anything-llm/collector/hotdir/text.txt",
      "title": "text.txt",
      "docAuthor": "Unknown",
      "description": "Unknown",
      "docSource": "a text file uploaded by the user.",
      "chunkSource": "",
      "published": "12/23/2025, 2:33:54 PM",
      "wordCount": 5,
      "token_count_estimate": 9,
      "location": "direct-uploads/text.txt-dd90371e-8092-49e8-b05e-d30be86b0b2c.json",
      "isDirectUpload": true
    }
  ],
  "metrics": {
    "prompt_tokens": 119,
    "completion_tokens": 9,
    "total_tokens": 128,
    "outputTps": 6.8181818181818175,
    "duration": 1.32,
    "model": "gpt-4o",
    "timestamp": "2025-12-23T22:33:56.322Z"
  }
}

Closing for now but if you can provide any more details about what is causing this the please provide them here and we'd be more than happy to reopen.

@shatfield4 commented on GitHub (Dec 23, 2025): I have tested this and it is working for me using the same endpoint. Here is the request body I used: ``` { "message": "What is the quantity of apples in this document?", "mode": "chat", "sessionId": "identifier-to-partition-chats-by-external-id", "attachments": [ { "name": "text.txt", "mime": "application/anythingllm-document", "contentString": "data:text/plain;base64,YXBwbGUgaXMgMTANCmJhbmFuYSBpcyAzNw==" } ], "reset": false } ``` and here is the response I got back: ``` { "id": "ab0e41d2-cab9-4ee5-9526-f3543262d723", "type": "textResponse", "close": true, "error": null, "chatId": 2, "textResponse": "The quantity of apples is 10.", "sources": [ { "text": "apple is 10\r\nbanana is 37...continued on in source document...", "id": "dd90371e-8092-49e8-b05e-d30be86b0b2c", "url": "file:///Users/seanhatfield/Documents/Mintplex/anything-llm/collector/hotdir/text.txt", "title": "text.txt", "docAuthor": "Unknown", "description": "Unknown", "docSource": "a text file uploaded by the user.", "chunkSource": "", "published": "12/23/2025, 2:33:54 PM", "wordCount": 5, "token_count_estimate": 9, "location": "direct-uploads/text.txt-dd90371e-8092-49e8-b05e-d30be86b0b2c.json", "isDirectUpload": true } ], "metrics": { "prompt_tokens": 119, "completion_tokens": 9, "total_tokens": 128, "outputTps": 6.8181818181818175, "duration": 1.32, "model": "gpt-4o", "timestamp": "2025-12-23T22:33:56.322Z" } } ``` Closing for now but if you can provide any more details about what is causing this the please provide them here and we'd be more than happy to reopen.
Author
Owner

@shidafei commented on GitHub (Dec 23, 2025):

Base64 files should not contain file location information,Why does the source attribute in your response contain file location information,Did you upload your file to the workspace?

@shidafei commented on GitHub (Dec 23, 2025): Base64 files should not contain file location information,Why does the source attribute in your response contain file location information,Did you upload your file to the workspace?
Author
Owner

@shidafei commented on GitHub (Dec 23, 2025):

@shatfield4

@shidafei commented on GitHub (Dec 23, 2025): @shatfield4
Author
Owner

@chenze123abc commented on GitHub (Dec 24, 2025):

This issue only occurs on the desktop version of Anything LLM @shatfield4

@chenze123abc commented on GitHub (Dec 24, 2025): This issue only occurs on the desktop version of Anything LLM @shatfield4
Author
Owner

@shidafei commented on GitHub (Dec 24, 2025):

Anything LLM run on docker can run this api success,but Is there a word limit for the contentString attribute of attachments?and what file types can it identify?can it recognize Markdown file? I send a markdown file,The base64 file starts with "data:application/octet-stream;base64,",The AI's response is that it has not received the file @shatfield4

@shidafei commented on GitHub (Dec 24, 2025): Anything LLM run on docker can run this api success,but Is there a word limit for the contentString attribute of attachments?and what file types can it identify?can it recognize Markdown file? I send a markdown file,The base64 file starts with "data:application/octet-stream;base64,",The AI's response is that it has not received the file @shatfield4
yindo changed title from [BUG]: attachments parameter in the API doesn't work to [GH-ISSUE #4806] [BUG]: attachments parameter in the API doesn't work 2026-06-05 14:49:53 -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#3026