gemini@1.0.0
Functions
deepResearch
deepResearch(message, options) ⇒ operation
Prompt Gemini deep research (using Google Search grounding)
| Param | Type | Description |
|---|---|---|
| message | string | The research query |
| options | DeepResearchOptions | Model and tools |
Example
deepResearch(`Find recent news about OpenFn`);
generateImage
generateImage(promptText, options) ⇒ operation
Generate an image using Gemini/Imagen
| Param | Type | Description |
|---|---|---|
| promptText | string | The image prompt |
| options | object | Model and generation options |
Example
generateImage("A futuristic city skyline");
prompt
prompt(message, options) ⇒ operation
Prompt the Gemini interface to respond
| Param | Type | Description |
|---|---|---|
| message | string | The prompt |
| options | PromptOptions | Model and other parameters |
Example
prompt(`Summarize this text: ${JSON.stringify($.data)}`);
Interfaces
DeepResearchOptions
Options provided to the Deep Research function
Properties
| Name | Type | Description |
|---|---|---|
| model | string | Which model to use, defaults to 'gemini-2.5-flash-lite' |
| tools | object | Tools configuration (e.g., googleSearch) shortcut to add tools in generationConfig use any of the following tools: https://ai.google.dev/gemini-api/docs/tools |
| generationConfig | object | Configuration for generation (temperature, topK, etc.) see the options here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#googlegenaisdk_textgen_config_with_txt-nodejs_genai_sdk |
GenerateImageOptions
Options provided to the Generate Image function
Properties
| Name | Type | Description |
|---|---|---|
| model | string | Which model to use, defaults to ' 'gemini-3-pro-image-preview' |
| imageSize | string | Size of the image to generate, defaults to '1k' |
| aspectRatio | string | Aspect ratio of the image to generate, defaults to '1:1' |
| generationConfig | object | Configuration for generation (temperature, topK, etc.) see the options here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#googlegenaisdk_textgen_config_with_txt-nodejs_genai_sdk |
PromptOptions
Options provided to the Prompt function
Properties
| Name | Type | Description |
|---|---|---|
| model | string | Which model to use, defaults to 'gemini-2.5-flash-lite' |
| generationConfig | object | Configuration for generation (temperature, topK, etc.) see the options here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#googlegenaisdk_textgen_config_with_txt-nodejs_genai_sdk |