[GH-ISSUE #4797] [BUG]: The issue with the attachments parameter in the API #3017

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

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

Originally assigned to: @shatfield4 on GitHub.

How are you running AnythingLLM?

Docker (local)

What happened?

I converted the txt file into base64 and placed it in this parameter, but the AI response seems to have not obtained the file information. I saw in the 1.9.1 update document that this attribute has been supported (feat: add base64 document attachment support to API chat endpoints by @naaa760 in #4672)

api call
Image

api response
Image

file content
Image

Are there known steps to reproduce?

No response

Originally created by @chenze123abc on GitHub (Dec 19, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4797 Originally assigned to: @shatfield4 on GitHub. ### How are you running AnythingLLM? Docker (local) ### What happened? I converted the txt file into base64 and placed it in this parameter, but the AI response seems to have not obtained the file information. I saw in the 1.9.1 update document that this attribute has been supported (feat: add base64 document attachment support to API chat endpoints by @naaa760 in #4672) api call <img width="1439" height="891" alt="Image" src="https://github.com/user-attachments/assets/41418f32-611d-4713-a87f-b3111b90a970" /> api response <img width="1417" height="513" alt="Image" src="https://github.com/user-attachments/assets/7b6ae4d6-f4d4-4be8-98df-09a8cfa7b94b" /> file content <img width="446" height="120" alt="Image" src="https://github.com/user-attachments/assets/c0d5b6bb-6dca-47a6-b51a-6985a1dd29cf" /> ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:32:16 -05:00
yindo closed this issue 2026-02-22 18:32:16 -05:00
Author
Owner

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

In order to use attachments that are not images, you must use application/anythingllm-document as the mime. If you do this, then AnythingLLM will process the file as a document and it should send it as context to the chat request.

Closing since I was able to take the same text and change the mime to application/anythingllm-document and got an answer back.

@shatfield4 commented on GitHub (Dec 22, 2025): In order to use attachments that are not images, you must use `application/anythingllm-document` as the mime. If you do this, then AnythingLLM will process the file as a document and it should send it as context to the chat request. Closing since I was able to take the same text and change the mime to `application/anythingllm-document` and got an answer back.
Author
Owner

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

Okay, thank you very much for your help

@chenze123abc commented on GitHub (Dec 22, 2025): Okay, thank you very much for your help
yindo changed title from [BUG]: The issue with the attachments parameter in the API to [GH-ISSUE #4797] [BUG]: The issue with the attachments parameter in the API 2026-06-05 14:49:51 -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#3017