ComfyUI Node
Gemini Generate Text
Generate text using Gemini API
Gemini Generate Text
- history
- text
- history
- thought
◄api_key►
◄vertexfalse►
◄base_url►
◄model_namegemini-2.5-flash►
◄system_prompt—►
◄prompt—►
◄temperature1.00►
◄top_p0.00►
◄top_k0►
◄max_output_tokens65535►
◄retry_count1►
◄disable_safety_settingsfalse►
◄disable_system_promptfalse►
◄safety_levelBLOCK_NONE►
◄thinking_budget0►
◄chat_template<-system->
{{system_instruction}}
<-/system->
<-user->
{{prompt}}
<-/user->►
◄proxy_url►
◄seed-1►
◄thinking_levelOFF►
◄timeout0►
◄extra{}►
CategoryYogurtNodes/LLM
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | API key for accessing Gemini API | |
| vertex | BOOLEAN | false | Use Vertex AI for Gemini API |
| base_url | STRING | Base URL for Gemini API | |
| model_name | STRING | gemini-2.5-flash | Gemini model name, default is gemini-2.5-flash |
| system_prompt | STRING | System-level prompt that affects the overall conversation style | |
| prompt | STRING | Main prompt content input by the user | |
| temperature | FLOAT | 1.00 | Sampling temperature, higher values produce more random outputs |
| top_p | FLOAT | 0.000–1 | Sampling probability threshold, controls output diversity |
| top_k | INT | 0 | Number of highest probability tokens to consider during sampling |
| max_output_tokens | INT | 655350–2147483647 | Maximum number of tokens in the generated text |
| retry_count | INT | 1 | Number of retries when request fails |
| disable_safety_settings | BOOLEAN | false | Whether to disable safety settings, if true, the safety settings will not be set |
| disable_system_prompt | BOOLEAN | false | Whether to disable the system prompt, if true, the system prompt will sent as a user prompt |
| safety_level | COMBO | BLOCK_NONE | Safety level for the generated text |
| thinking_budget | INT | 0-1–2147483647 | Thinking budget for the model, if set to -1, the model will not limit thinking budget, if set to 0, the model will disable thinking |
| chat_template | STRING | <-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user-> | Content template for the generated text |
| proxy_url | STRING | 代理URL,格式: protocol://user:pass@addr:port,支持http,https,socks5,socks5h | |
| seed | INT | -1-1–2147483647 | 随机种子,设置为-1时随机种子 |
| thinking_level | COMBO | OFF | Thinking level for the model, if thinking budget is not 0, this parameter will be ignored |
| timeout | INT | 00–2147483647 | Timeout for the request in seconds, 0 means no timeout |
| historyopt | HISTORY | — | |
| extraopt | STRING | {} | Extra parameters for the request, in JSON format |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| history | HISTORY | — |
| thought | STRING | — |