(
model_key: str,
aspect_ratio: str,
*,
min_images: int = 1,
max_images: int = 2,
use_v2_model_config: bool = False,
allow_tier_upgrade: bool = True,
upsample: Optional[Dict[str, str]] = None,
)
| 740 | |
| 741 | |
| 742 | def _make_i2v_config( |
| 743 | model_key: str, |
| 744 | aspect_ratio: str, |
| 745 | *, |
| 746 | min_images: int = 1, |
| 747 | max_images: int = 2, |
| 748 | use_v2_model_config: bool = False, |
| 749 | allow_tier_upgrade: bool = True, |
| 750 | upsample: Optional[Dict[str, str]] = None, |
| 751 | ) -> Dict[str, Any]: |
| 752 | cfg: Dict[str, Any] = { |
| 753 | "type": "video", |
| 754 | "video_type": "i2v", |
| 755 | "model_key": model_key, |
| 756 | "aspect_ratio": aspect_ratio, |
| 757 | "supports_images": True, |
| 758 | "min_images": min_images, |
| 759 | "max_images": max_images, |
| 760 | } |
| 761 | if use_v2_model_config: |
| 762 | cfg["use_v2_model_config"] = True |
| 763 | if not allow_tier_upgrade: |
| 764 | cfg["allow_tier_upgrade"] = False |
| 765 | if upsample: |
| 766 | cfg["upsample"] = upsample |
| 767 | return cfg |
| 768 | |
| 769 | |
| 770 | def _apply_veo_3_1_model_updates(): |
no outgoing calls
no test coverage detected