c# AgentGroupChat - how to pass image #10348
Replies: 2 comments
-
Yes you should be able to pass an image similarly to how you would pass chat. Tagging @crickman |
Beta Was this translation helpful? Give feedback.
-
You can specify image input for Here's a sample: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithAgents/OpenAIAssistant/Step02_Assistant_Vision.cs Note: Not all models or agents support image input. For example, the Azure AI Agent is unable to currently accept image input. For your example, I'd go with: chat.AddChatMessage(new ChatMessageContent(AuthorRole.User, [new ImageContent($"data:image/png;base64,{base64Image}")]); I'll check back in for your response on how this goes. |
Beta Was this translation helpful? Give feedback.
-
Hi team
is it possible to pass an image to group chat?
As far as I can see AgentGroupChat.AddChatMessage doesn't allow passing and ImageContent, I tried to trick it by passing:
chat.AddChatMessage(new ChatMessageContent(AuthorRole.User, $"![Image](data:image/png;base64,{base64Image})"));
but it doesn't work as I hit the token window
Basically, what I want to achieve is to make sure all the elements are correctly extracted from an Image, and I wanted to have two agents that will extract and verify extracted text
Beta Was this translation helpful? Give feedback.
All reactions