Description
The Gemini component allows you to use Gemini with VQA (Visual Question Answering) functionality. You can do the following:
Get responses based on user messages
• Specify a model and input system instructions and user messages to get responses.
Get responses from analyzing photos or video files
• Specify photos or video files and a model with system instructions and user messages to get responses from analyzing the photos or videos.
Output Payload | Description |
---|---|
cv.Payload | Outputs the response from Gemini. |
Component Properties
Property Name | Description |
---|---|
Model | Select the model to use from gemini-2.0-flash, gemini-2.0-flash-lite |
System Instructions | Specify system instructions for Gemini |
User Message | Enter prompts or questions for Gemini |
File Name | Specify files for Gemini to analyze. Multiple files can be specified by separating with commas |
File MIME Type | MIME type of files to upload. Multiple file MIME types can be specified by separating with commas |
Delete Upload Files | Specify to delete files after uploading to Gemini |
Conversation History | Provides a JSON array representing previous conversation turns |
Response MIME Type | MIME type of response from Gemini. Specify either text/plain or application/json |
Max Tokens | Sets the maximum number of tokens allowed in the generated response |
Temperature | Specifies the randomness and creativity of Gemini's response in the range of 0.0 to 2.0 |
TopP | Specifies nucleus sampling in the range of 0.0 to 1.0. Affects the diversity of generated text |
Stop Sequence | Defines a list of strings (words or phrases) in JSON format that cause Gemini to stop generating text |
Safety Settings | Sets the level of content filtering. Helps prevent generation of potentially harmful or sensitive content |
Timeout | HTTP request response timeout value |
API Key | Specify the API key to use Gemini |
Component Variables
Component Variable | Description |
---|---|
cv.ConversationHistory | JSON of conversation history. Can be used as input to Gemini component in subsequent calls to maintain conversation context |
cv.FinishReasons | Indicates why the model stopped generating tokens. Useful for debugging or understanding model behavior |
cv.UploadedFileURI | List of URIs of successfully uploaded files |
cv.UploadedMIMEType | List of MIME types corresponding to uploaded files |