这是indexloc提供的服务,不要输入任何密码
Skip to content

[FEAT]: API stream-chat support images #2338

@wewaa

Description

@wewaa

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions