🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
[Feat] Add Google vertex ai veo toolkit for video generation (#3023)
Xiaotian Jin13438dd59658
diff --git a/camel/storages/object_storages/google_cloud.py b/camel/storages/object_storages/google_cloud.pyindex 46c01f8e7..a3a21ea8d 100644--- a/camel/storages/object_storages/google_cloud.py+++ b/camel/storages/object_storages/google_cloud.py@@ -46,7 +46,7 @@ class GoogleCloudStorage(BaseObjectStorage):create_if_not_exists: bool = True,anonymous: bool = False,) -> None:- from google.cloud import storage+ from google.cloud import storage # type: ignore[attr-defined]self.create_if_not_exists = create_if_not_existsdiff --git a/camel/toolkits/__init__.py b/camel/toolkits/__init__.pyindex 7c1cdc6c5..0255fbf2b 100644--- a/camel/toolkits/__init__.py+++ b/camel/toolkits/__init__.py@@ -89,6 +89,7 @@ from .web_deploy_toolkit import WebDeployToolkitfrom .screenshot_toolkit import ScreenshotToolkitfrom .message_integration import ToolkitMessageIntegrationfrom .notion_mcp_toolkit import NotionMCPToolkit+from .vertex_ai_veo_toolkit import VertexAIVeoToolkitfrom .minimax_mcp_toolkit import MinimaxMCPToolkit__all__ = [@@ -168,5 +169,6 @@ __all__ = ['RegisteredAgentToolkit','ToolkitMessageIntegration','NotionMCPToolkit',+ 'VertexAIVeoToolkit','MinimaxMCPToolkit',]diff --git a/camel/toolkits/vertex_ai_veo_toolkit.py b/camel/toolkits/vertex_ai_veo_toolkit.pynew file mode 100644index 000000000..d0c85d709--- /dev/null+++ b/camel/toolkits/vertex_ai_veo_toolkit.py@@ -0,0 +1,590 @@+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========++import asyncio+import base64+import os+from typing import Any, Dict, List, Optional, Tuple++from camel.logger import get_logger+from camel.toolkits import FunctionTool+from camel.toolkits.base import BaseToolkit+from camel.utils import api_keys_required, dependencies_required++logger = get_logger(__name__)+++@api_keys_required(+ [("GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_APPLICATION_CREDENTIALS")]+)+class VertexAIVeoToolkit(BaseToolkit):+ r"""A toolkit for interacting with Google Vertex AI Veo video generation.++ This toolkit provides methods for generating videos using Google's Veo,+ supporting both text-to-video and image-to-video generation with various+ customization options.+ """++ @dependencies_required('google.cloud.aiplatform')+ def __init__(+ self,+ project_id: Optional[str] = None,+ location: str = "us-central1",+ model_id: str = "veo-2.0-generate-001",+ output_storage_uri: Optional[str] = None,+ timeout: Optional[float] = None,+ ) -> None:+ r"""Initialize the Vertex AI Veo toolkit.++ Args:+ project_id (Optional[str]): Google Cloud project ID. If not+ provided,+ will use the default project from environment.+ (default: :obj:`None`)+ location (str): Google Cloud location for the API calls.+ (default: :obj:`"us-central1"`)+ model_id (str): The Veo model ID to use. Options include+ "veo-2.0-generate-001" or "veo-3.0-generate-preview".+ (default: :obj:`"veo-2.0-generate-001"`)+ output_storage_uri (Optional[str]): Cloud Storage URI to save+ output videos. If not provided, returns video bytes.+ (default: :obj:`None`)+ timeout (Optional[float]): Request timeout in seconds.+ (default: :obj:`None`)+ """+ super().__init__(timeout)++ from google.cloud import aiplatform++ self.project_id = project_id or os.getenv("GOOGLE_CLOUD_PROJECT")+ self.location = location+ self.model_id = model_id+ self.output_storage_uri = output_storage_uri++ if not self.project_id:+ raise ValueError(+ "Project ID must be provided either as parameter or "+ "GOOGLE_CLOUD_PROJECT environment variable"+ )++ aiplatform.init(project=self.project_id, location=self.location)+ self.client = aiplatform.gapic.PredictionServiceClient()++ def generate_video_from_text(+ self,+ text_prompt: str,+ response_count: int = 1,+ duration: int = 5,+ aspect_ratio: str = "16:9",+ negative_prompt: Optional[str] = None,+ person_generation: str = "allow_adult",+ ) -> Dict[str, Any]:+ r"""Generate video from text prompt using Vertex AI Veo.++ Args:+ text_prompt (str): The text prompt to guide video generation.+ response_count (int): Number of videos to generate (1-4).+ (default: :obj:`1`)+ duration (int): Video duration in seconds (5-8).+ (default: :obj:`5`)+ aspect_ratio (str): Video aspect ratio. Options: "16:9", "9:16".+ (default: :obj:`"16:9"`)+ negative_prompt (Optional[str]): What to avoid in the video.+ (default: :obj:`None`)+ person_generation (str): Person safety setting. Options:+ "allow_adult", "dont_allow". (default: :obj:`"allow_adult"`)++ Returns:+ Dict[str, Any]:+ A dictionary containing:+ - 'success' (bool): Whether the operation was successful+ - 'videos' (List[Dict]): List of generated video data+ - 'metadata' (Dict): Additional metadata from the response+ - 'error' (str): Error message if operation failed+ """+ try:+ from google.protobuf import json_format+ from google.protobuf.struct_pb2 import Value++ # Construct the request+ endpoint = (+ f"projects/{self.project_id}/locations/{self.location}/"+ f"publishers/google/models/{self.model_id}"+ )++ # Build parameters+ parameters = {+ "aspectRatio": aspect_ratio,+ "personGeneration": person_generation,+ }++ if negative_prompt:+ parameters["negativePrompt"] = negative_prompt++ # Build request body+ request_body = {+ "contents": [+ {"role": "user", "parts": [{"text": text_prompt}]}+ ],+ "generationConfig": {+ "responseCount": response_count,+ "duration": duration,+ },+ "parameters": parameters,+ }++ if self.output_storage_uri:+ generation_config = request_body.setdefault(+ "generationConfig", {}+ )+ if isinstance(generation_config, dict):+ generation_config["outputStorageUri"] = (+ self.output_storage_uri+ )++ # Convert to protobuf format+ request_value = json_format.ParseDict(request_body, Value())++ # Make the API call+ response = self.client.predict(+ endpoint=endpoint,+ instances=[request_value],+ timeout=self.timeout,+ )++ return self._parse_video_response(response)++ except Exception as e:+ logger.error(f"Error generating video from text: {e}")+ return {"error": str(e)}++ def generate_video_from_image(+ self,+ image_path: str,+ text_prompt: str,+ response_count: int = 1,+ duration: int = 5,+ aspect_ratio: str = "16:9",+ negative_prompt: Optional[str] = None,+ person_generation: str = "allow_adult",+ ) -> Dict[str, Any]:+ r"""Generate video from image and text prompt using Vertex AI Veo.++ Args:+ image_path (str): Path to the input image file (local or GCS URI).+ text_prompt (str): The text prompt to guide video generation.+ response_count (int): Number of videos to generate (1-4).+ (default: :obj:`1`)+ duration (int): Video duration in seconds (5-8).+ (default: :obj:`5`)+ aspect_ratio (str): Video aspect ratio. Options: "16:9", "9:16".+ (default: :obj:`"16:9"`)+ negative_prompt (Optional[str]): What to avoid in the video.+ (default: :obj:`None`)+ person_generation (str): Person safety setting.+ (default: :obj:`"allow_adult"`)++ Returns:+ Dict[str, Any]:+ A dictionary containing:+ - 'success' (bool): Whether the operation was successful+ - 'videos' (List[Dict]): List of generated video data+ - 'metadata' (Dict): Additional metadata from the response+ - 'error' (str): Error message if operation failed+ """+ try:+ from google.protobuf import json_format+ from google.protobuf.struct_pb2 import Value++ # Read and encode image+ image_data, mime_type = self._process_image(image_path)++ # Construct the request+ endpoint = (+ f"projects/{self.project_id}/locations/{self.location}/"+ f"publishers/google/models/{self.model_id}"+ )++ # Build parameters+ parameters = {+ "aspectRatio": aspect_ratio,+ "personGeneration": person_generation,+ }++ if negative_prompt:+ parameters["negativePrompt"] = negative_prompt++ # Build request body with image+ request_body = {+ "contents": [+ {+ "role": "user",+ "parts": [+ {+ "inlineData": {+ "mimeType": mime_type,+ "data": image_data,+ }+ },+ {"text": text_prompt},+ ],+ }+ ],+ "generationConfig": {+ "responseCount": response_count,+ "duration": duration,+ },+ "parameters": parameters,+ }++ if self.output_storage_uri:+ generation_config = request_body.setdefault(+ "generationConfig", {}+ )+ if isinstance(generation_config, dict):+ generation_config["outputStorageUri"] = (+ self.output_storage_uri+ )++ # Convert to protobuf format+ request_value = json_format.ParseDict(request_body, Value())++ # Make the API call+ response = self.client.predict(+ endpoint=endpoint,+ instances=[request_value],+ timeout=self.timeout,+ )++ return self._parse_video_response(response)++ except Exception as e:+ logger.error(f"Error generating video from image: {e}")+ return {"error": str(e)}++ def extend_video(+ self,+ video_uri: str,+ text_prompt: str,+ duration: int = 5,+ aspect_ratio: str = "16:9",+ negative_prompt: Optional[str] = None,+ ) -> Dict[str, Any]:+ r"""Extend an existing video using Vertex AI Veo.++ Args:+ video_uri (str): Cloud Storage URI of the video to extend.+ text_prompt (str): The text prompt to guide video extension.+ duration (int): Duration to extend in seconds (5-8).+ (default: :obj:`5`)+ aspect_ratio (str): Video aspect ratio.+ (default: :obj:`"16:9"`)+ negative_prompt (Optional[str]): What to avoid in the extension.+ (default: :obj:`None`)++ Returns:+ Dict[str, Any]:+ A dictionary containing:+ - 'success' (bool): Whether the operation was successful+ - 'videos' (List[Dict]): List of extended video data+ - 'metadata' (Dict): Additional metadata from the response+ - 'error' (str): Error message if operation failed+ """+ try:+ from google.protobuf import json_format+ from google.protobuf.struct_pb2 import Value++ # Construct the request+ endpoint = (+ f"projects/{self.project_id}/locations/{self.location}/"+ f"publishers/google/models/{self.model_id}"+ )++ # Build parameters+ parameters = {+ "aspectRatio": aspect_ratio,+ "videoToExtend": video_uri,+ }++ if negative_prompt:+ parameters["negativePrompt"] = negative_prompt++ # Build request body+ request_body = {+ "contents": [+ {"role": "user", "parts": [{"text": text_prompt}]}+ ],+ "generationConfig": {+ "duration": duration,+ },+ "parameters": parameters,+ }++ if self.output_storage_uri:+ generation_config = request_body.setdefault(+ "generationConfig", {}+ )+ if isinstance(generation_config, dict):+ generation_config["outputStorageUri"] = (+ self.output_storage_uri+ )++ # Convert to protobuf format+ request_value = json_format.ParseDict(request_body, Value())++ # Make the API call+ response = self.client.predict(+ endpoint=endpoint,+ instances=[request_value],+ timeout=self.timeout,+ )++ return self._parse_video_response(response)++ except Exception as e:+ logger.error(f"Error extending video: {e}")+ return {"error": str(e)}++ async def agenerate_video_from_text(+ self,+ text_prompt: str,+ response_count: int = 1,+ duration: int = 5,+ aspect_ratio: str = "16:9",+ negative_prompt: Optional[str] = None,+ person_generation: str = "allow_adult",+ ) -> Dict[str, Any]:+ r"""Generate video from text prompt using Vertex AI Veo.++ Args:+ text_prompt (str): The text prompt to guide video generation.+ response_count (int): Number of videos to generate (1-4).+ (default: :obj:`1`)+ duration (int): Video duration in seconds (5-8).+ (default: :obj:`5`)+ aspect_ratio (str): Video aspect ratio. Options: "16:9", "9:16".+ (default: :obj:`"16:9"`)+ negative_prompt (Optional[str]): What to avoid in the video.+ (default: :obj:`None`)+ person_generation (str): Person safety setting. Options:+ "allow_adult", "dont_allow". (default: :obj:`"allow_adult"`)++ Returns:+ Dict[str, Any]:+ A dictionary containing:+ - 'success' (bool): Whether the operation was successful+ - 'videos' (List[Dict]): List of generated video data+ - 'metadata' (Dict): Additional metadata from the response+ - 'error' (str): Error message if operation failed+ """+ loop = asyncio.get_event_loop()+ return await loop.run_in_executor(+ None,+ self.generate_video_from_text,+ text_prompt,+ response_count,+ duration,+ aspect_ratio,+ negative_prompt,+ person_generation,+ )++ async def agenerate_video_from_image(+ self,+ image_path: str,+ text_prompt: str,+ response_count: int = 1,+ duration: int = 5,+ aspect_ratio: str = "16:9",+ negative_prompt: Optional[str] = None,+ person_generation: str = "allow_adult",+ ) -> Dict[str, Any]:+ r"""Generate video from image and text prompt using Vertex AI Veo.++ Args:+ image_path (str): Path to the input image file (local or GCS URI).+ text_prompt (str): The text prompt to guide video generation.+ response_count (int): Number of videos to generate (1-4).+ (default: :obj:`1`)+ duration (int): Video duration in seconds (5-8).+ (default: :obj:`5`)+ aspect_ratio (str): Video aspect ratio. Options: "16:9", "9:16".+ (default: :obj:`"16:9"`)+ negative_prompt (Optional[str]): What to avoid in the video.+ (default: :obj:`None`)+ person_generation (str): Person safety setting.+ (default: :obj:`"allow_adult"`)++ Returns:+ Dict[str, Any]:+ A dictionary containing:+ - 'success' (bool): Whether the operation was successful+ - 'videos' (List[Dict]): List of generated video data+ - 'metadata' (Dict): Additional metadata from the response+ - 'error' (str): Error message if operation failed+ """+ loop = asyncio.get_event_loop()+ return await loop.run_in_executor(+ None,+ self.generate_video_from_image,+ image_path,+ text_prompt,+ response_count,+ duration,+ aspect_ratio,+ negative_prompt,+ person_generation,+ )++ async def aextend_video(+ self,+ video_uri: str,+ text_prompt: str,+ duration: int = 5,+ aspect_ratio: str = "16:9",+ negative_prompt: Optional[str] = None,+ ) -> Dict[str, Any]:+ r"""Extend an existing video using Vertex AI Veo.++ Args:+ video_uri (str): Cloud Storage URI of the video to extend.+ text_prompt (str): The text prompt to guide video extension.+ duration (int): Duration to extend in seconds (5-8).+ (default: :obj:`5`)+ aspect_ratio (str): Video aspect ratio.+ (default: :obj:`"16:9"`)+ negative_prompt (Optional[str]): What to avoid in the extension.+ (default: :obj:`None`)++ Returns:+ Dict[str, Any]:+ A dictionary containing:+ - 'success' (bool): Whether the operation was successful+ - 'videos' (List[Dict]): List of extended video data+ - 'metadata' (Dict): Additional metadata from the response+ - 'error' (str): Error message if operation failed+ """+ loop = asyncio.get_event_loop()+ return await loop.run_in_executor(+ None,+ self.extend_video,+ video_uri,+ text_prompt,+ duration,+ aspect_ratio,+ negative_prompt,+ )++ def _process_image(self, image_path: str) -> Tuple[str, str]:+ r"""Process image file and return base64 encoded data and MIME type."""+ if image_path.startswith('gs://'):+ # Handle Google Cloud Storage URIs+ from google.cloud import storage # type: ignore[attr-defined]++ # Parse GCS URI+ parts = image_path[5:].split('/', 1)+ bucket_name = parts[0]+ blob_name = parts[1]++ # Download image from GCS+ client = storage.Client()+ bucket = client.bucket(bucket_name)+ blob = bucket.blob(blob_name)+ image_bytes = blob.download_as_bytes()++ # Determine MIME type from file extension+ if blob_name.lower().endswith('.png'):+ mime_type = "image/png"+ elif blob_name.lower().endswith(('.jpg', '.jpeg')):+ mime_type = "image/jpeg"+ else:+ raise ValueError("Unsupported image format. Use PNG or JPEG.")++ else:+ # Handle local file paths+ with open(image_path, 'rb') as f:+ image_bytes = f.read()++ # Determine MIME type from file extension+ if image_path.lower().endswith('.png'):+ mime_type = "image/png"+ elif image_path.lower().endswith(('.jpg', '.jpeg')):+ mime_type = "image/jpeg"+ else:+ raise ValueError("Unsupported image format. Use PNG or JPEG.")++ # Encode to base64+ image_data = base64.b64encode(image_bytes).decode('utf-8')++ return image_data, mime_type++ def _parse_video_response(self, response: Any) -> Dict[str, Any]:+ r"""Parse the video generation response."""+ try:+ result: Dict[str, Any] = {+ "success": True,+ "videos": [],+ "metadata": {},+ }++ # Extract prediction results+ if hasattr(response, 'predictions'):+ for prediction in response.predictions:+ # Convert prediction to dict if needed+ if hasattr(prediction, 'struct_value'):+ pred_dict = dict(prediction.struct_value)+ else:+ pred_dict = prediction++ videos_list = result["videos"]+ if isinstance(videos_list, list):+ videos_list.append(pred_dict)++ # Extract metadata if available+ if hasattr(response, 'metadata'):+ result["metadata"] = dict(response.metadata)++ return result++ except Exception as e:+ logger.error(f"Error parsing video response: {e}")+ return {+ "success": False,+ "error": str(e),+ "raw_response": str(response),+ }++ def get_tools(self) -> List[FunctionTool]:+ r"""Get a list of tools for video generation with Vertex AI Veo.++ Returns:+ List[FunctionTool]: List of available function tools.+ """+ return [+ FunctionTool(self.generate_video_from_text),+ FunctionTool(self.generate_video_from_image),+ FunctionTool(self.extend_video),+ ]++ def get_async_tools(self) -> List[FunctionTool]:+ r"""Get a list of async tools for video generation with Vertex AI Veo.++ Returns:+ List[FunctionTool]: List of available async function tools.+ """+ return [+ FunctionTool(self.agenerate_video_from_text),+ FunctionTool(self.agenerate_video_from_image),+ FunctionTool(self.aextend_video),+ ]diff --git a/examples/toolkits/vertex_ai_veo_toolkit.py b/examples/toolkits/vertex_ai_veo_toolkit.pynew file mode 100644index 000000000..b8b6dc8e3--- /dev/null+++ b/examples/toolkits/vertex_ai_veo_toolkit.py@@ -0,0 +1,278 @@+#!/usr/bin/env python3+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+"""+Example usage of VertexAIVeoToolkit for video generation.++This example demonstrates how to use Google's Vertex AI Veo models to generate+videos from text prompts, images, and extend existing videos.++Prerequisites:+1. Install google-cloud-aiplatform: pip install google-cloud-aiplatform+2. Set up Google Cloud authentication:+ - gcloud auth login+ - gcloud config set project YOUR_PROJECT_ID+ Or set GOOGLE_APPLICATION_CREDENTIALS environment variable+3. Enable Vertex AI API in your Google Cloud project+4. Set up billing for your project (video generation incurs costs)++Environment Variables:+- GOOGLE_CLOUD_PROJECT: Your Google Cloud project ID+- GOOGLE_APPLICATION_CREDENTIALS: Path to service account key (optional)+"""++import asyncio+++def basic_text_to_video_example():+ r"""Basic example of generating video from text prompt."""+ from camel.toolkits import VertexAIVeoToolkit++ print("🎬 Basic Text-to-Video Generation Example")++ # Initialize toolkit+ toolkit = VertexAIVeoToolkit(+ project_id="your-project-id", # Replace with your project ID+ location="us-central1",+ )++ # Generate video from text+ result = toolkit.generate_video_from_text(+ text_prompt="A peaceful sunset over a calm ocean with gentle waves",+ model_id="veo-2.0-generate-001",+ duration=5,+ aspect_ratio="16:9",+ response_count=1,+ )++ print(f"Generation result: {result}")+ return result+++def advanced_text_to_video_example():+ r"""Advanced example with more parameters."""+ from camel.toolkits import VertexAIVeoToolkit++ print("🎬 Advanced Text-to-Video Generation Example")++ toolkit = VertexAIVeoToolkit(project_id="your-project-id")++ # Generate video with advanced settings+ result = toolkit.generate_video_from_text(+ text_prompt="A futuristic city with flying cars and neon lights, cyberpunk style", # noqa: E501+ model_id="veo-3.0-generate-preview", # Using latest model+ duration=8, # Longer duration+ aspect_ratio="9:16", # Vertical format for mobile+ response_count=2, # Generate 2 variations+ negative_prompt="low quality, blurry, distorted",+ person_generation="dont_allow", # No people in the video+ output_storage_uri="gs://your-bucket/videos/", # Save to GCS+ )++ print(f"Advanced generation result: {result}")+ return result+++def image_to_video_example():+ r"""Example of generating video from an image."""+ from camel.toolkits import VertexAIVeoToolkit++ print("🖼️ Image-to-Video Generation Example")++ toolkit = VertexAIVeoToolkit(project_id="your-project-id")++ # Generate video from image+ result = toolkit.generate_video_from_image(+ image_path="/path/to/your/image.jpg", # Local path or GCS URI+ text_prompt="The scene comes to life with gentle movement and animation", # noqa: E501+ model_id="veo-2.0-generate-001",+ duration=6,+ aspect_ratio="16:9",+ )++ print(f"Image-to-video result: {result}")+ return result+++def video_extension_example():+ r"""Example of extending an existing video."""+ from camel.toolkits import VertexAIVeoToolkit++ print("🎞️ Video Extension Example")++ toolkit = VertexAIVeoToolkit(project_id="your-project-id")++ # Extend an existing video+ result = toolkit.extend_video(+ video_uri="gs://your-bucket/videos/original_video.mp4",+ text_prompt="The scene continues with more dramatic action",+ duration=5,+ aspect_ratio="16:9",+ )++ print(f"Video extension result: {result}")+ return result+++async def async_video_generation_example():+ r"""Example of using async methods for concurrent video generation."""+ from camel.toolkits import VertexAIVeoToolkit++ print("⚡ Async Video Generation Example")++ toolkit = VertexAIVeoToolkit(project_id="your-project-id")++ # Generate multiple videos concurrently+ tasks = [+ toolkit.agenerate_video_from_text(+ "A serene mountain landscape at sunrise", duration=5+ ),+ toolkit.agenerate_video_from_text(+ "An underwater coral reef with colorful fish", duration=5+ ),+ toolkit.agenerate_video_from_text(+ "A bustling city street at night with traffic", duration=5+ ),+ ]++ # Wait for all videos to be generated+ results = await asyncio.gather(*tasks, return_exceptions=True)++ for i, result in enumerate(results):+ print(f"Video {i+1} result: {result}")++ return results+++def agent_integration_example():+ r"""Example of using VertexAIVeoToolkit with CAMEL agents."""+ from camel.agents import ChatAgent+ from camel.models import ModelFactory+ from camel.toolkits import VertexAIVeoToolkit++ print("🤖 Agent Integration Example")++ # Initialize model and toolkit+ model = ModelFactory.create(+ model_platform="openai", model_type="gpt-4o-mini"+ )++ toolkit = VertexAIVeoToolkit(project_id="your-project-id")++ # Create agent with video generation tools+ agent = ChatAgent(+ model=model,+ tools=toolkit.get_tools(),+ system_message="""You are a video generation assistant.+ You can help users create videos using Google's Vertex AI Veo models.+ Always explain the video generation process and parameters to users.""", # noqa: E501+ )++ # Example conversation+ response = agent.step(+ "Create a 5-second video of a cat playing in a garden"+ )++ print(f"Agent response: {response.content}")+ return response+++async def fastapi_integration_example():+ r"""Example of using the toolkit in a FastAPI application."""+ print("🌐 FastAPI Integration Example")++ # This shows how you would use it in FastAPI+ example_code = '''+from fastapi import FastAPI, HTTPException+from pydantic import BaseModel+from camel.toolkits import VertexAIVeoToolkit++app = FastAPI()+toolkit = VertexAIVeoToolkit(project_id="your-project-id")++class VideoRequest(BaseModel):+ text_prompt: str+ duration: int = 5+ aspect_ratio: str = "16:9"+ model_id: str = "veo-2.0-generate-001"+[email protected]("/generate-video")+async def generate_video(request: VideoRequest):+ try:+ result = await toolkit.agenerate_video_from_text(+ text_prompt=request.text_prompt,+ duration=request.duration,+ aspect_ratio=request.aspect_ratio,+ model_id=request.model_id+ )+ return {"success": True, "data": result}+ except Exception as e:+ raise HTTPException(status_code=500, detail=str(e))+[email protected]("/generate-video-from-image")+async def generate_video_from_image(+ image_path: str,+ text_prompt: str,+ duration: int = 5+):+ try:+ result = await toolkit.agenerate_video_from_image(+ image_path=image_path,+ text_prompt=text_prompt,+ duration=duration+ )+ return {"success": True, "data": result}+ except Exception as e:+ raise HTTPException(status_code=500, detail=str(e))+ '''++ print("FastAPI integration code:")+ print(example_code)+++def main():+ r"""Run all examples."""+ print("🎥 Vertex AI Veo Toolkit Examples")+ print("=" * 50)++ # Note: These examples require proper Google Cloud setup+ print("⚠️ Note: These examples require:")+ print(" 1. Google Cloud project with Vertex AI API enabled")+ print(" 2. Proper authentication setup")+ print(" 3. Billing enabled (video generation incurs costs)")+ print()++ # Uncomment these lines when you have proper setup:+ # basic_text_to_video_example()+ # advanced_text_to_video_example()+ # image_to_video_example()+ # video_extension_example()+ # agent_integration_example()++ # These can be run without actual API calls:+ asyncio.run(fastapi_integration_example())++ print("\n🎯 Key Features:")+ print("- ✅ Text-to-video generation")+ print("- ✅ Image-to-video generation")+ print("- ✅ Video extension/continuation")+ print("- ✅ Multiple Veo model support (2.0, 3.0 preview)")+ print("- ✅ Async/await support for FastAPI")+ print("- ✅ Configurable video parameters")+ print("- ✅ Google Cloud Storage integration")+ print("- ✅ CAMEL agent integration")+++if __name__ == "__main__":+ main()diff --git a/pyproject.toml b/pyproject.tomlindex 369958210..5c834cc2d 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -426,6 +426,7 @@ all = ["chromadb>=0.6.0,<1.0.0","reportlab>=4.4.2","onnxruntime<=1.19.2",+ "google-cloud-aiplatform>=1.111.0",][project.urls]diff --git a/test/toolkits/test_vertex_ai_veo_toolkit.py b/test/toolkits/test_vertex_ai_veo_toolkit.pynew file mode 100644index 000000000..4e8f5bfe6--- /dev/null+++ b/test/toolkits/test_vertex_ai_veo_toolkit.py@@ -0,0 +1,199 @@+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========++import os+from unittest.mock import MagicMock, PropertyMock, patch++import pytest+++class TestVertexAIVeoToolkit:+ @pytest.fixture+ def mock_toolkit(self):+ r"""Create a mock VertexAIVeoToolkit for testing."""+ # Set required environment variables+ os.environ['GOOGLE_CLOUD_PROJECT'] = 'test-project'+ os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = '/fake/path/creds.json'++ # Mock the Google Cloud AI Platform API calls+ with (+ patch('google.cloud.aiplatform.init'),+ patch('google.cloud.aiplatform.gapic.PredictionServiceClient'),+ ):+ from camel.toolkits.vertex_ai_veo_toolkit import (+ VertexAIVeoToolkit,+ )++ toolkit = VertexAIVeoToolkit(+ project_id='test-project', location='us-central1'+ )++ yield toolkit++ # Clean up environment variables+ os.environ.pop('GOOGLE_CLOUD_PROJECT', None)+ os.environ.pop('GOOGLE_APPLICATION_CREDENTIALS', None)++ def test_toolkit_initialization(self, mock_toolkit):+ r"""Test that the toolkit initializes correctly."""+ assert mock_toolkit.project_id == 'test-project'+ assert mock_toolkit.location == 'us-central1'++ def test_get_tools(self, mock_toolkit):+ r"""Test that get_tools returns the expected function tools."""+ tools = mock_toolkit.get_tools()++ assert len(tools) == 3+ tool_names = [tool.get_function_name() for tool in tools]++ expected_tools = [+ 'generate_video_from_text',+ 'generate_video_from_image',+ 'extend_video',+ ]++ for expected_tool in expected_tools:+ assert expected_tool in tool_names++ def test_get_async_tools(self, mock_toolkit):+ r"""Test that get_async_tools returns expected async function tools."""+ async_tools = mock_toolkit.get_async_tools()++ assert len(async_tools) == 3+ tool_names = [tool.get_function_name() for tool in async_tools]++ expected_tools = [+ 'agenerate_video_from_text',+ 'agenerate_video_from_image',+ 'aextend_video',+ ]++ for expected_tool in expected_tools:+ assert expected_tool in tool_names++ @patch('builtins.open')+ @patch('base64.b64encode')+ def test_process_image_local_file(+ self, mock_b64encode, mock_open, mock_toolkit+ ):+ r"""Test image processing for local files."""+ # Mock file operations+ mock_open.return_value.__enter__.return_value.read.return_value = (+ b'fake_image_data'+ )+ mock_b64encode.return_value = b'encoded_data'++ # Test PNG file+ image_data, mime_type = mock_toolkit._process_image(+ '/path/to/image.png'+ )++ assert mime_type == 'image/png'+ assert image_data == 'encoded_data'++ @patch('builtins.open')+ def test_process_image_invalid_format(self, mock_open, mock_toolkit):+ r"""Test that invalid image formats raise an error."""+ # Mock file operations+ mock_open.return_value.__enter__.return_value.read.return_value = (+ b'fake_image_data'+ )++ with pytest.raises(ValueError, match="Unsupported image format"):+ mock_toolkit._process_image('/path/to/image.bmp')++ def test_parse_video_response_success(self, mock_toolkit):+ r"""Test parsing a successful video response."""+ # Mock a successful response+ mock_response = MagicMock()+ mock_response.predictions = [{'video_uri': 'gs://bucket/video.mp4'}]+ mock_response.metadata = {'generation_time': '30s'}++ result = mock_toolkit._parse_video_response(mock_response)++ assert result['success'] is True+ assert len(result['videos']) == 1+ assert 'metadata' in result++ def test_parse_video_response_error(self, mock_toolkit):+ r"""Test parsing a video response with error."""+ # Mock a response that raises an exception+ mock_response = MagicMock()+ mock_response.predictions = None++ # Make accessing predictions raise an exception+ type(mock_response).predictions = PropertyMock(+ side_effect=Exception("API Error")+ )++ result = mock_toolkit._parse_video_response(mock_response)++ assert result['success'] is False+ assert 'error' in result++ @pytest.mark.asyncio+ async def test_async_methods_exist(self, mock_toolkit):+ r"""Test that async methods exist and are callable."""+ # Test that async methods exist+ assert hasattr(mock_toolkit, 'agenerate_video_from_text')+ assert hasattr(mock_toolkit, 'agenerate_video_from_image')+ assert hasattr(mock_toolkit, 'aextend_video')++ # Test that they are callable+ assert callable(mock_toolkit.agenerate_video_from_text)+ assert callable(mock_toolkit.agenerate_video_from_image)+ assert callable(mock_toolkit.aextend_video)++[email protected]_backend+class TestVertexAIVeoToolkitIntegration:+ r"""Integration tests that require actual API access."""++ @pytest.mark.skipif(+ not os.getenv('GOOGLE_CLOUD_PROJECT'),+ reason="Requires GOOGLE_CLOUD_PROJECT environment variable",+ )+ def test_real_toolkit_initialization(self):+ r"""Test initialization with real Google Cloud credentials."""+ from camel.toolkits.vertex_ai_veo_toolkit import VertexAIVeoToolkit++ toolkit = VertexAIVeoToolkit()+ assert toolkit.project_id is not None+ assert toolkit.location == 'us-central1'++ @pytest.mark.skipif(+ not os.getenv('GOOGLE_CLOUD_PROJECT'),+ reason="Requires GOOGLE_CLOUD_PROJECT environment variable",+ )+ @pytest.mark.very_slow+ def test_real_video_generation(self):+ r"""Test actual video generation (requires API access and billing)."""+ from camel.toolkits.vertex_ai_veo_toolkit import VertexAIVeoToolkit++ toolkit = VertexAIVeoToolkit()++ # This would make a real API call+ # result = toolkit.generate_video_from_text(+ # text_prompt="A simple test video",+ # duration=5+ # )+ #+ # assert 'success' in result++ # For now, just test that the method exists+ assert hasattr(toolkit, 'generate_video_from_text')+++if __name__ == "__main__":+ pytest.main([__file__])diff --git a/uv.lock b/uv.lockindex 6ea7b16c2..1cf9a10ab 100644--- a/uv.lock+++ b/uv.lock@@ -709,6 +709,7 @@ all = [{ name = "google-api-python-client" },{ name = "google-auth-httplib2" },{ name = "google-auth-oauthlib" },+ { name = "google-cloud-aiplatform" },{ name = "google-cloud-storage" },{ name = "google-genai" },{ name = "googlemaps" },@@ -1164,6 +1165,7 @@ requires-dist = [{ name = "google-auth-httplib2", marker = "extra == 'web-tools'", specifier = "==0.2.0" },{ name = "google-auth-oauthlib", marker = "extra == 'all'", specifier = "==1.2.1" },{ name = "google-auth-oauthlib", marker = "extra == 'web-tools'", specifier = "==1.2.1" },+ { name = "google-cloud-aiplatform", marker = "extra == 'all'", specifier = ">=1.111.0" },{ name = "google-cloud-storage", marker = "extra == 'all'", specifier = ">=2.18.0,<3" },{ name = "google-cloud-storage", marker = "extra == 'storage'", specifier = ">=2.18.0,<3" },{ name = "google-genai", marker = "extra == 'all'", specifier = ">=1.13.0" },@@ -2781,6 +2783,12 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/14/4b/ead00905132820b623732b175d66354e9d3e69fcf2a5dcdab780664e7896/google_api_core-2.25.1-py3-none-any.whl", hash = "sha256:8a2a56c1fef82987a524371f99f3bd0143702fecc670c72e600c1cda6bf8dbb7", size = 160807, upload-time = "2025-06-12T20:52:19.334Z" },]+[package.optional-dependencies]+grpc = [+ { name = "grpcio" },+ { name = "grpcio-status" },+]+[[package]]name = "google-api-python-client"version = "2.166.0"@@ -2837,6 +2845,48 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/1a/8e/22a28dfbd218033e4eeaf3a0533b2b54852b6530da0c0fe934f0cc494b29/google_auth_oauthlib-1.2.1-py2.py3-none-any.whl", hash = "sha256:2d58a27262d55aa1b87678c3ba7142a080098cbc2024f903c62355deb235d91f", size = 24930, upload-time = "2024-07-08T23:11:23.038Z" },]+[[package]]+name = "google-cloud-aiplatform"+version = "1.111.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "docstring-parser" },+ { name = "google-api-core", extra = ["grpc"] },+ { name = "google-auth" },+ { name = "google-cloud-bigquery" },+ { name = "google-cloud-resource-manager" },+ { name = "google-cloud-storage" },+ { name = "google-genai" },+ { name = "packaging" },+ { name = "proto-plus" },+ { name = "protobuf" },+ { name = "pydantic" },+ { name = "shapely" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/01/db/def79d3cbf2b502864f8ab18d0094f437edc5c2e5db5994bd10a16e813d4/google_cloud_aiplatform-1.111.0.tar.gz", hash = "sha256:80b07186419970fb1e39e2728e7aa2402a8753c1041ec5117677f489202c91d4", size = 9604280, upload-time = "2025-08-27T02:57:57.243Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/f9/27/492c171ccdaa56a409c9d50f4126170cfa779d0a976cb2d561f30d03146f/google_cloud_aiplatform-1.111.0-py2.py3-none-any.whl", hash = "sha256:a38796050b7d427fbf1f7d6d6e1d5069abe9a1fd948e3193250f68ccd67388f5", size = 7995239, upload-time = "2025-08-27T02:57:53.766Z" },+]++[[package]]+name = "google-cloud-bigquery"+version = "3.36.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "google-api-core", extra = ["grpc"] },+ { name = "google-auth" },+ { name = "google-cloud-core" },+ { name = "google-resumable-media" },+ { name = "packaging" },+ { name = "python-dateutil" },+ { name = "requests" },+]+sdist = { url = "https://files.pythonhosted.org/packages/ac/76/a9bc50b0b14732f81f18b523f273f89c637a5f62187413d7296a91915e57/google_cloud_bigquery-3.36.0.tar.gz", hash = "sha256:519d7a16be2119dca1ea8871e6dd45f971a8382c337cbe045319543b9e743bdd", size = 502014, upload-time = "2025-08-20T20:12:28.941Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/f3/41/47fbf5881f35b5a3adeeb3e39bdfa54e5512c22fb5c6a48c3b8d4be13ba9/google_cloud_bigquery-3.36.0-py3-none-any.whl", hash = "sha256:0cfbad09999907600fd0618794491db10000d98911ec7768ac6041cb9a0257dd", size = 258479, upload-time = "2025-08-20T20:12:27.472Z" },+]+[[package]]name = "google-cloud-core"version = "2.4.3"@@ -2850,6 +2900,22 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/40/86/bda7241a8da2d28a754aad2ba0f6776e35b67e37c36ae0c45d49370f1014/google_cloud_core-2.4.3-py2.py3-none-any.whl", hash = "sha256:5130f9f4c14b4fafdff75c79448f9495cfade0d8775facf1b09c3bf67e027f6e", size = 29348, upload-time = "2025-03-10T21:05:37.785Z" },]+[[package]]+name = "google-cloud-resource-manager"+version = "1.14.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "google-api-core", extra = ["grpc"] },+ { name = "google-auth" },+ { name = "grpc-google-iam-v1" },+ { name = "proto-plus" },+ { name = "protobuf" },+]+sdist = { url = "https://files.pythonhosted.org/packages/6e/ca/a4648f5038cb94af4b3942815942a03aa9398f9fb0bef55b3f1585b9940d/google_cloud_resource_manager-1.14.2.tar.gz", hash = "sha256:962e2d904c550d7bac48372607904ff7bb3277e3bb4a36d80cc9a37e28e6eb74", size = 446370, upload-time = "2025-03-17T11:35:56.343Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b1/ea/a92631c358da377af34d3a9682c97af83185c2d66363d5939ab4a1169a7f/google_cloud_resource_manager-1.14.2-py3-none-any.whl", hash = "sha256:d0fa954dedd1d2b8e13feae9099c01b8aac515b648e612834f9942d2795a9900", size = 394344, upload-time = "2025-03-17T11:35:54.722Z" },+]+[[package]]name = "google-cloud-storage"version = "2.19.0"@@ -2938,6 +3004,11 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/86/f1/62a193f0227cf15a920390abe675f386dec35f7ae3ffe6da582d3ade42c7/googleapis_common_protos-1.70.0-py3-none-any.whl", hash = "sha256:b8bfcca8c25a2bb253e0e0b0adaf8c00773e5e6af6fd92397576680b807e0fd8", size = 294530, upload-time = "2025-04-14T10:17:01.271Z" },]+[package.optional-dependencies]+grpc = [+ { name = "grpcio" },+]+[[package]]name = "googlemaps"version = "4.10.0"@@ -3029,6 +3100,20 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/13/f2/4fab6c3e5bcaf38a44cc8a974d2752eaad4c129e45d6533d926a30edd133/griffe-1.12.1-py3-none-any.whl", hash = "sha256:2d7c12334de00089c31905424a00abcfd931b45b8b516967f224133903d302cc", size = 138940, upload-time = "2025-08-14T21:08:13.382Z" },]+[[package]]+name = "grpc-google-iam-v1"+version = "0.14.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "googleapis-common-protos", extra = ["grpc"] },+ { name = "grpcio" },+ { name = "protobuf" },+]+sdist = { url = "https://files.pythonhosted.org/packages/b9/4e/8d0ca3b035e41fe0b3f31ebbb638356af720335e5a11154c330169b40777/grpc_google_iam_v1-0.14.2.tar.gz", hash = "sha256:b3e1fc387a1a329e41672197d0ace9de22c78dd7d215048c4c78712073f7bd20", size = 16259, upload-time = "2025-03-17T11:40:23.586Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/66/6f/dd9b178aee7835b96c2e63715aba6516a9d50f6bebbd1cc1d32c82a2a6c3/grpc_google_iam_v1-0.14.2-py3-none-any.whl", hash = "sha256:a3171468459770907926d56a440b2bb643eec1d7ba215f48f3ecece42b4d8351", size = 19242, upload-time = "2025-03-17T11:40:22.648Z" },+]+[[package]]name = "grpcio"version = "1.74.0"@@ -3067,6 +3152,20 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/84/59/900aa2445891fc47a33f7d2f76e00ca5d6ae6584b20d19af9c06fa09bf9a/grpcio-1.74.0-cp312-cp312-win_amd64.whl", hash = "sha256:42f8fee287427b94be63d916c90399ed310ed10aadbf9e2e5538b3e497d269bc", size = 4490123, upload-time = "2025-07-24T18:53:39.528Z" },]+[[package]]+name = "grpcio-status"+version = "1.74.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "googleapis-common-protos" },+ { name = "grpcio" },+ { name = "protobuf" },+]+sdist = { url = "https://files.pythonhosted.org/packages/93/22/238c5f01e6837df54494deb08d5c772bc3f5bf5fb80a15dce254892d1a81/grpcio_status-1.74.0.tar.gz", hash = "sha256:c58c1b24aa454e30f1fc6a7e0dbbc194c54a408143971a94b5f4e40bb5831432", size = 13662, upload-time = "2025-07-24T19:01:56.874Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/28/aa/1b1fe7d8ab699e1ec26d3a36b91d3df9f83a30abc07d4c881d0296b17b67/grpcio_status-1.74.0-py3-none-any.whl", hash = "sha256:52cdbd759a6760fc8f668098a03f208f493dd5c76bf8e02598bbbaf1f6fc2876", size = 14425, upload-time = "2025-07-24T19:01:19.963Z" },+]+[[package]]name = "h11"version = "0.16.0"@@ -7301,6 +7400,41 @@ version = "1.0.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/9e/bd/3704a8c3e0942d711c1299ebf7b9091930adae6675d7c8f476a7ce48653c/sgmllib3k-1.0.0.tar.gz", hash = "sha256:7868fb1c8bfa764c1ac563d3cf369c381d1325d36124933a726f29fcdaa812e9", size = 5750, upload-time = "2010-08-24T14:33:52.445Z" }+[[package]]+name = "shapely"+version = "2.1.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "numpy" },+]+sdist = { url = "https://files.pythonhosted.org/packages/ca/3c/2da625233f4e605155926566c0e7ea8dda361877f48e8b1655e53456f252/shapely-2.1.1.tar.gz", hash = "sha256:500621967f2ffe9642454808009044c21e5b35db89ce69f8a2042c2ffd0e2772", size = 315422, upload-time = "2025-05-19T11:04:41.265Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/82/fa/f18025c95b86116dd8f1ec58cab078bd59ab51456b448136ca27463be533/shapely-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d8ccc872a632acb7bdcb69e5e78df27213f7efd195882668ffba5405497337c6", size = 1825117, upload-time = "2025-05-19T11:03:43.547Z" },+ { url = "https://files.pythonhosted.org/packages/c7/65/46b519555ee9fb851234288be7c78be11e6260995281071d13abf2c313d0/shapely-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f24f2ecda1e6c091da64bcbef8dd121380948074875bd1b247b3d17e99407099", size = 1628541, upload-time = "2025-05-19T11:03:45.162Z" },+ { url = "https://files.pythonhosted.org/packages/29/51/0b158a261df94e33505eadfe737db9531f346dfa60850945ad25fd4162f1/shapely-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45112a5be0b745b49e50f8829ce490eb67fefb0cea8d4f8ac5764bfedaa83d2d", size = 2948453, upload-time = "2025-05-19T11:03:46.681Z" },+ { url = "https://files.pythonhosted.org/packages/a9/4f/6c9bb4bd7b1a14d7051641b9b479ad2a643d5cbc382bcf5bd52fd0896974/shapely-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c10ce6f11904d65e9bbb3e41e774903c944e20b3f0b282559885302f52f224a", size = 3057029, upload-time = "2025-05-19T11:03:48.346Z" },+ { url = "https://files.pythonhosted.org/packages/89/0b/ad1b0af491d753a83ea93138eee12a4597f763ae12727968d05934fe7c78/shapely-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:61168010dfe4e45f956ffbbaf080c88afce199ea81eb1f0ac43230065df320bd", size = 3894342, upload-time = "2025-05-19T11:03:49.602Z" },+ { url = "https://files.pythonhosted.org/packages/7d/96/73232c5de0b9fdf0ec7ddfc95c43aaf928740e87d9f168bff0e928d78c6d/shapely-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cacf067cdff741cd5c56a21c52f54ece4e4dad9d311130493a791997da4a886b", size = 4056766, upload-time = "2025-05-19T11:03:51.252Z" },+ { url = "https://files.pythonhosted.org/packages/43/cc/eec3c01f754f5b3e0c47574b198f9deb70465579ad0dad0e1cef2ce9e103/shapely-2.1.1-cp310-cp310-win32.whl", hash = "sha256:23b8772c3b815e7790fb2eab75a0b3951f435bc0fce7bb146cb064f17d35ab4f", size = 1523744, upload-time = "2025-05-19T11:03:52.624Z" },+ { url = "https://files.pythonhosted.org/packages/50/fc/a7187e6dadb10b91e66a9e715d28105cde6489e1017cce476876185a43da/shapely-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:2c7b2b6143abf4fa77851cef8ef690e03feade9a0d48acd6dc41d9e0e78d7ca6", size = 1703061, upload-time = "2025-05-19T11:03:54.695Z" },+ { url = "https://files.pythonhosted.org/packages/19/97/2df985b1e03f90c503796ad5ecd3d9ed305123b64d4ccb54616b30295b29/shapely-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:587a1aa72bc858fab9b8c20427b5f6027b7cbc92743b8e2c73b9de55aa71c7a7", size = 1819368, upload-time = "2025-05-19T11:03:55.937Z" },+ { url = "https://files.pythonhosted.org/packages/56/17/504518860370f0a28908b18864f43d72f03581e2b6680540ca668f07aa42/shapely-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9fa5c53b0791a4b998f9ad84aad456c988600757a96b0a05e14bba10cebaaaea", size = 1625362, upload-time = "2025-05-19T11:03:57.06Z" },+ { url = "https://files.pythonhosted.org/packages/36/a1/9677337d729b79fce1ef3296aac6b8ef4743419086f669e8a8070eff8f40/shapely-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aabecd038841ab5310d23495253f01c2a82a3aedae5ab9ca489be214aa458aa7", size = 2999005, upload-time = "2025-05-19T11:03:58.692Z" },+ { url = "https://files.pythonhosted.org/packages/a2/17/e09357274699c6e012bbb5a8ea14765a4d5860bb658df1931c9f90d53bd3/shapely-2.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:586f6aee1edec04e16227517a866df3e9a2e43c1f635efc32978bb3dc9c63753", size = 3108489, upload-time = "2025-05-19T11:04:00.059Z" },+ { url = "https://files.pythonhosted.org/packages/17/5d/93a6c37c4b4e9955ad40834f42b17260ca74ecf36df2e81bb14d12221b90/shapely-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b9878b9e37ad26c72aada8de0c9cfe418d9e2ff36992a1693b7f65a075b28647", size = 3945727, upload-time = "2025-05-19T11:04:01.786Z" },+ { url = "https://files.pythonhosted.org/packages/a3/1a/ad696648f16fd82dd6bfcca0b3b8fbafa7aacc13431c7fc4c9b49e481681/shapely-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9a531c48f289ba355e37b134e98e28c557ff13965d4653a5228d0f42a09aed0", size = 4109311, upload-time = "2025-05-19T11:04:03.134Z" },+ { url = "https://files.pythonhosted.org/packages/d4/38/150dd245beab179ec0d4472bf6799bf18f21b1efbef59ac87de3377dbf1c/shapely-2.1.1-cp311-cp311-win32.whl", hash = "sha256:4866de2673a971820c75c0167b1f1cd8fb76f2d641101c23d3ca021ad0449bab", size = 1522982, upload-time = "2025-05-19T11:04:05.217Z" },+ { url = "https://files.pythonhosted.org/packages/93/5b/842022c00fbb051083c1c85430f3bb55565b7fd2d775f4f398c0ba8052ce/shapely-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:20a9d79958b3d6c70d8a886b250047ea32ff40489d7abb47d01498c704557a93", size = 1703872, upload-time = "2025-05-19T11:04:06.791Z" },+ { url = "https://files.pythonhosted.org/packages/fb/64/9544dc07dfe80a2d489060791300827c941c451e2910f7364b19607ea352/shapely-2.1.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2827365b58bf98efb60affc94a8e01c56dd1995a80aabe4b701465d86dcbba43", size = 1833021, upload-time = "2025-05-19T11:04:08.022Z" },+ { url = "https://files.pythonhosted.org/packages/07/aa/fb5f545e72e89b6a0f04a0effda144f5be956c9c312c7d4e00dfddbddbcf/shapely-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a9c551f7fa7f1e917af2347fe983f21f212863f1d04f08eece01e9c275903fad", size = 1643018, upload-time = "2025-05-19T11:04:09.343Z" },+ { url = "https://files.pythonhosted.org/packages/03/46/61e03edba81de729f09d880ce7ae5c1af873a0814206bbfb4402ab5c3388/shapely-2.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78dec4d4fbe7b1db8dc36de3031767e7ece5911fb7782bc9e95c5cdec58fb1e9", size = 2986417, upload-time = "2025-05-19T11:04:10.56Z" },+ { url = "https://files.pythonhosted.org/packages/1f/1e/83ec268ab8254a446b4178b45616ab5822d7b9d2b7eb6e27cf0b82f45601/shapely-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:872d3c0a7b8b37da0e23d80496ec5973c4692920b90de9f502b5beb994bbaaef", size = 3098224, upload-time = "2025-05-19T11:04:11.903Z" },+ { url = "https://files.pythonhosted.org/packages/f1/44/0c21e7717c243e067c9ef8fa9126de24239f8345a5bba9280f7bb9935959/shapely-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2e2b9125ebfbc28ecf5353511de62f75a8515ae9470521c9a693e4bb9fbe0cf1", size = 3925982, upload-time = "2025-05-19T11:04:13.224Z" },+ { url = "https://files.pythonhosted.org/packages/15/50/d3b4e15fefc103a0eb13d83bad5f65cd6e07a5d8b2ae920e767932a247d1/shapely-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4b96cea171b3d7f6786976a0520f178c42792897653ecca0c5422fb1e6946e6d", size = 4089122, upload-time = "2025-05-19T11:04:14.477Z" },+ { url = "https://files.pythonhosted.org/packages/bd/05/9a68f27fc6110baeedeeebc14fd86e73fa38738c5b741302408fb6355577/shapely-2.1.1-cp312-cp312-win32.whl", hash = "sha256:39dca52201e02996df02e447f729da97cfb6ff41a03cb50f5547f19d02905af8", size = 1522437, upload-time = "2025-05-19T11:04:16.203Z" },+ { url = "https://files.pythonhosted.org/packages/bc/e9/a4560e12b9338842a1f82c9016d2543eaa084fce30a1ca11991143086b57/shapely-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:13d643256f81d55a50013eff6321142781cf777eb6a9e207c2c9e6315ba6044a", size = 1703479, upload-time = "2025-05-19T11:04:18.497Z" },+]+[[package]]name = "shellingham"version = "1.5.4"