Skip to content

c# AgentGroupChat - how to pass image #10348

Answered by crickman
JP-droidic asked this question in Q&A
Discussion options

You must be logged in to vote

You can specify image input for AgentGroupChat the same as for direct agent invocation.

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.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@JP-droidic
Comment options

Answer selected by JP-droidic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants