pip install google-genai and configure your Gemini credentials, as described in the Working with Gemini tutorial.
View source on GitHub
func invoke_tools()
tools._invoke().
udf generate_content()
gemini.rate_limits; use the model id as the key). If no rate limit is configured, uses a default of 600 RPM.
Requirements:
pip install google-genai
contents(String): The input content to generate from.model(String): The name of the model to use.config(Json | None): Configuration for generation, corresponding to keyword arguments ofgenai.types.GenerateContentConfig. For details on the parameters, see: https://googleapis.github.io/python-genai/genai.html#module-genai.typestools(Json | None): An optional list of Pixeltable tools to use. It is also possible to specify tools manually via theconfig['tools']parameter, but at most one ofconfig['tools']ortoolsmay be used.
Json: A dictionary containing the response and other metadata.
gemini-2.0-flash to an existing Pixeltable column tbl.prompt of the table tbl:
udf generate_images()
imagen.rate_limits; use the model id as the key). If no rate limit is configured, uses a default of 600 RPM.
Requirements:
pip install google-genai
prompt(String): A text description of the images to generate.model(String): The model to use.config(Json | None): Configuration for generation, corresponding to keyword arguments ofgenai.types.GenerateImagesConfig. For details on the parameters, see: https://googleapis.github.io/python-genai/genai.html#module-genai.types
Image: The generated image.
imagen-3.0-generate-002 to an existing Pixeltable column tbl.prompt of the table tbl:
udf generate_videos()
veo.rate_limits; use the model id as the key). If no rate limit is configured, uses a default of 600 RPM.
Requirements:
pip install google-genai
prompt(String | None): A text description of the videos to generate.image(Image | None): An optional image to use as the first frame of the video. At least one ofpromptorimagemust be provided. (It is ok to specify both.)model(String): The model to use.config(Json | None): Configuration for generation, corresponding to keyword arguments ofgenai.types.GenerateVideosConfig. For details on the parameters, see: https://googleapis.github.io/python-genai/genai.html#module-genai.types
Video: The generated video.
veo-2.0-generate-001 to an existing Pixeltable column tbl.prompt of the table tbl: