Open maciejmajek opened 3 months ago
@maciejmajek
Can you log the actual payload sent to Bedrock and include here. It would also help to include a small sample of the code to reproduce. Briefly looking at the sample link you provided, Bedrock doesn't seem to support image_url
, rather image
block with these attributes as required, you seem to be missing the format
attribute in the image block.
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ImageBlock.html
Hi, I am working on a project that is highly multimodal dependent. Some of the implemented tools return images which are then fed into the chat model. Here is the error I am getting when the image is added into the content using method described (with small changes described below) here
Here, the last message is the one causing problems
I've changed the standard image dictionary from
to
as the previous errors hinted
I've run into similar problem with ChatOpenAI: OpenAI (or at least langchain_openai) explicitely does not support images returned in ToolMessage, so I am currently splitting the tool output into two messages (ToolMessage with a text content, and HumanMessage with image) with success.
The same workaround works with bedrock