anything-llm icon indicating copy to clipboard operation
anything-llm copied to clipboard

[FEAT]: API stream-chat support images

Open wewaa opened this issue 5 months ago • 0 comments

How are you running AnythingLLM?

Docker (local)

What happened?

I want to analyze images using APIs, for example:

curl -X 'POST' \
  'https://***.com/api/v1/workspace/jerry2/stream-chat' \
  -H 'accept: text/event-stream' \
  -H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXX' \
  -H 'Content-Type: application/json' \
  -d '{
    "message": "Analyze the diagram below",
	"mode": "chat",
  "sessionId": "identifier-to-partition-chats-by-external-id",
    "attachments": [{
            "name": "2022091501.png",
            "mime": "image/png",
            "contentString": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhwAAAFJCAYAAADQVfSlAAAgAElEQVR4nOy9WZMkSXImpuZX3HnV3V3d091zAhgMB7sLEJQFhFwRrlD"
        }
    ]
}

But the response was: Please provide a picture or a description of the picture?What should I do?

Are there known steps to reproduce?

No response

wewaa avatar Sep 21 '24 03:09 wewaa