Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Bug: Adding base64 Images with MistralAi failes #10166

Open
tntwist opened this issue Jan 13, 2025 · 0 comments · May be fixed by #10180
Open

.Net: Bug: Adding base64 Images with MistralAi failes #10166

tntwist opened this issue Jan 13, 2025 · 0 comments · May be fixed by #10180
Assignees
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code

Comments

@tntwist
Copy link

tntwist commented Jan 13, 2025

Describe the bug
Seems like base64 encoded images do not work when using the mistral ai connector in C#.
When i try to add an image from a stream i get an exception when sending the message to mistral.
I think its releated to this line:
https://github.com/microsoft/semantic-kernel/blob/88635e177a1175357d3bcc990127a43b18d6106d/dotnet/src/Connectors/Connectors.MistralAI/Client/MistralClient.cs#L787C1-L794C14

This is the way i create the image content to be added:

using var imageContentStream = await GetImageContentMemoryStreamAsync(content);

return new ImageContent(imageContentStream.ToArray(), MimeTypes.GetMimeType(content.FileName));
As is see the Uri Property of the ImageContent is not set then.

Image

Platform

  • OS: Windows
  • IDE: Visual Studio
  • Language: C#, Python
  • Source: latest nuget version

Additional context
I already posted this inside this issuce #9844.

@tntwist tntwist added the bug Something isn't working label Jan 13, 2025
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code python Pull requests for the Python Semantic Kernel triage labels Jan 13, 2025
@github-actions github-actions bot changed the title Bug: Python: Bug: Jan 13, 2025
@github-actions github-actions bot changed the title Python: Bug: .Net: Bug: Jan 13, 2025
@tntwist tntwist changed the title .Net: Bug: Bug: Adding base64 Images with MistralAi failes Jan 13, 2025
@tntwist tntwist changed the title Bug: Adding base64 Images with MistralAi failes .Net: Bug: Adding base64 Images with MistralAi failes Jan 13, 2025
@markwallace-microsoft markwallace-microsoft moved this to Sprint: Planned in Semantic Kernel Jan 13, 2025
@sphenry sphenry removed the triage label Jan 13, 2025
@markwallace-microsoft markwallace-microsoft removed the python Pull requests for the Python Semantic Kernel label Jan 13, 2025
@markwallace-microsoft markwallace-microsoft moved this from Sprint: Planned to Sprint: In Progress in Semantic Kernel Jan 14, 2025
@markwallace-microsoft markwallace-microsoft moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernel Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code
Projects
Status: Sprint: In Review
Development

Successfully merging a pull request may close this issue.

3 participants