Encoding incorrect for image content
Closed this issue · 3 comments
JeremyLikness commented
Using M.E.A.I. and passing something like this:
var imageContent = new ImageContent(File.ReadAllBytes(), "image/jpeg");
Should work, but throws an exception. That's because other providers accept the data-uri format, but Ollama does not. The AbstracationsMapper should convert to pure Base64 rather then data-uri encoding it.
JeremyLikness commented
For working example:
https://github.com/dotnet/extensions/... (MEAI)
awaescher commented
Yes, byte arrays won't work currently, I fixed that this weekend but did not push. Give me a few minutes.
JeremyLikness commented
Thank you!!!