1.8 KiB
This example shows how to use @AutoGen.Gemini.GeminiChatAgent to connect to Vertex AI Gemini API and 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
Note
What's the difference between Google AI Gemini and Vertex AI Gemini?
Gemini is a series of large language models developed by Google. You can use it either from Google AI API or Vertex AI API. If you are relatively new to Gemini and wants to explore the feature and build some prototype for your chatbot app, Google AI APIs (with Google AI Studio) is a fast way to get started. While your app and idea matures and you'd like to leverage more MLOps tools that streamline the usage, deployment, and monitoring of models, you can move to Google Cloud Vertex AI which provides Gemini APIs along with many other features. Basically, to help you productionize your app. (reference)
Step 1: Install AutoGen.Gemini
First, install the AutoGen.Gemini package using the following command:
dotnet add package AutoGen.Gemini