autogen/dotnet/website/articles/AutoGen.Gemini/Image-chat-with-gemini.md
2024-10-02 12:57:50 -04:00

1.0 KiB

This example shows how to use @AutoGen.Gemini.GeminiChatAgent for image chat with Gemini model.

To run this example, you need to have a project on Google Cloud with access to Vertex AI API. For more information please refer to Google Vertex AI.

Note

You can find the complete sample code here

Step 1: Install AutoGen.Gemini

First, install the AutoGen.Gemini package using the following command:

dotnet add package AutoGen.Gemini

Step 2: Add using statement

[!code-csharp]

Step 3: Create a Gemini agent

[!code-csharp]

Step 4: Send image to Gemini

[!code-csharp]