Closed gabrielschmith closed 4 days ago
@LittleLittleCloud would you be able to take a look?
@gabrielschmith We just push a fix which is available from nightly build
Let us know if it fixes the issue you have, thanks!
@LittleLittleCloud,
Thank you for the quick fix! I just tested it, and it works perfectly with both BinaryData
and Data URL
in string format. Great job! 🎉
Best regards,
@gabrielschmith
What happened?
I am using AutoGen with the Semantic Kernel extension to create an agent. This agent can handle messages of type
ImageMessage
, but I am encountering an issue when processing image data. Specifically, I am converting an image received as a Data URL into aBinaryData
object and passing it to theImageMessage
. However, this results in an exception.Exception Details:
If the Data URL is too long (exceeding 65,535 characters), a
UriFormatException
is thrown with the following message:This issue also occurs when I directly pass the Data URL to the
ImageMessage
, as shown in the following code examples:In the
SemanticKernelChatMessageContentConnector
, the issue arises in this block of code:The exception occurs because, even though I send
BinaryData
, the code still attempts to generate a URL, leading to the error.What did you expect to happen?
The agent should be able to process long Data URLs without encountering a
UriFormatException
. Alternatively, if Data URLs are not supported directly, there should be clear guidelines on handling large binary data for images inImageMessage
.How can we reproduce it (as minimally and precisely as possible)?
ImageMessage
either directly or via aBinaryData
object.UriFormatException
is thrown.Please let me know if additional details or examples are needed to address this issue.
AutoGen version
0.2.1
Which package was this bug in
Core
Model used
gpt-4o-mini
Python version
No response
Operating system
Windows Pro 11, .NET 8
Any additional info you think would be helpful for fixing this bug
There is also an issue opened for the Semantic Kernel here that discusses the use and support of Data URIs.