Module request

Module request 

Source
Expand description

The request format follows the following structure:

{
  "contents": [
    {
      "role": string,
      "parts": [
        {
          /// Union field data can be only one of the following:
          "text": string,
          "inlineData": {
            "mimeType": string,
            "data": string
          },
          "fileData": {
            "mimeType": string,
            "fileUri": string
          },
          /// End of list of possible types for union field data.
          "videoMetadata": {
            "startOffset": {
              "seconds": integer,
              "nanos": integer
            },
            "endOffset": {
              "seconds": integer,
              "nanos": integer
            }
          }
        }
      ]
    }
  ],
  "tools": [
    {
      "functionDeclarations": [
        {
          "name": string,
          "description": string,
          "parameters": {
            object (OpenAPI Object Schema)
          }
        }
      ]
    }
  ],
  "safetySettings": [
    {
      "category": enum (HarmCategory),
      "threshold": enum (HarmBlockThreshold)
    }
  ],
  "generationConfig": {
    "temperature": number,
    "topP": number,
    "topK": number,
    "candidateCount": integer,
    "maxOutputTokens": integer,
    "stopSequences": [
      string
    ]
  }
}

See https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini

Structsยง

EndOffset
FileData
FunctionDeclaration
GenerationConfig
InlineData
Request
Holds the data to be used for a specific text request
SafetySettings
StartOffset
SystemInstructionContentbeta
SystemInstructionPartbeta
Tools
VideoMetadata