awaescher/OllamaSharp

Encoding incorrect for image content

Closed this issue · 3 comments

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.

Yes, byte arrays won't work currently, I fixed that this weekend but did not push. Give me a few minutes.

Thank you!!!