Text to Text
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
contents | array | ✅ Yes | - | Contains the content to be processed. |
role | string | ✅ Yes | - | The role of the message sender (e.g., “user”). |
parts | array | ✅ Yes | - | Parts of the content, containing text. |
text | string | ✅ Yes | - | The text prompt for the generation. |
generationConfig | object | ❌ No | - | Generation configuration settings. |
temperature | number | ❌ No | 0.3 | Controls randomness in the response (0.0 to 1.0). |
topP | number | ❌ No | 0.95 | Controls diversity via nucleus sampling. |
topK | number | ❌ No | 64 | Limits the number of tokens considered. |
maxOutputTokens | number | ❌ No | 8192 | Maximum number of tokens in the response. |
safetySettings | array | ❌ No | - | Safety settings for content filtering. |
category | string | ✅ Yes | - | The harm category to filter. |
threshold | string | ✅ Yes | - | The threshold for blocking content. |