From 6e64b8fd72a22087107b45c61e32b450c412861d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cipriani=20Bandarra?= Date: Sun, 8 Jun 2025 08:58:48 +0100 Subject: [PATCH] Add missing parameters to imagegen --- src/types/predict_image.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/types/predict_image.rs b/src/types/predict_image.rs index b342485..0197351 100644 --- a/src/types/predict_image.rs +++ b/src/types/predict_image.rs @@ -37,6 +37,12 @@ pub struct PredictImageRequestParameters { #[serde(skip_serializing_if = "Option::is_none")] pub seed: Option, + /// Optional. An optional parameter to use an LLM-based prompt rewriting feature to deliver + /// higher quality images that better reflect the original prompt's intent. Disabling this + /// feature may impact image quality and prompt adherence + #[serde(skip_serializing_if = "Option::is_none")] + pub enhance_prompt: Option, + /// A description of what to discourage in the generated images. /// The following models support this parameter: /// - `imagen-3.0-generate-001`: up to 480 tokens. @@ -87,6 +93,23 @@ pub struct PredictImageRequestParameters { #[serde(skip_serializing_if = "Option::is_none")] pub person_generation: Option, + /// Optional. The language code that corresponds to your text prompt language. + /// The following values are supported: + /// - auto: Automatic detection. If Imagen detects a supported language, the prompt and an + /// optional negative prompt are translated to English. If the language detected isn't + /// supported, Imagen uses the input text verbatim, which might result in an unexpected + /// output. No error code is returned. + /// - en: English (if omitted, the default value) + /// - zh or zh-CN: Chinese (simplified) + /// - zh-TW: Chinese (traditional) + /// - hi: Hindi + /// - ja: Japanese + /// - ko: Korean + /// - pt: Portuguese + /// - es: Spanish + #[serde(skip_serializing_if = "Option::is_none")] + pub language: Option, + /// Adds a filter level to safety filtering. The following values are supported: /// - `"block_most"`: Strongest filtering level, most strict blocking. /// - `"block_some"`: Block some problematic prompts and responses.