17 ユーザー要件の 初期化 User State Subject Host jupyter on cloud … Preferences Architecture State Services Summary Inspection Inquiry User State Subject Host jupyter on cloud … Preferences Architecture State Services EC2, VPC Summary Inspection Inquiry User State Subject Host jupyter on cloud … Preferences Architecture State Services EC2, VPC Summary Security OK Inspection No volumes Inquiry User State Subject Host jupyter on cloud … Preferences Architecture State Services EC2, VPC Summary Security OK Inspection No volumes Inquiry Save data? User State Subject Host jupyter on cloud … Preferences Save data? Y Architecture State Services EC2, VPC Summary Security OK Inspection No volumes Inquiry Save data? アーキテクチャ (再)提案 アーキテクチャ 要約・検証 問い合わせ項目の 生成 設定の更新 設定に基づきアーキテクチャを再提案 Cloud Architect Buddy の処理 1 1 2 2 3 4 5 5 4 3
今回は Vertex AI を利用 • Pydantic で Format を指定 24 from google import genai client = genai.Client( vertexai=True, project="aitech-example-project", location="us-central1" ) class Architecture(BaseModel): ID_PREFIX: ClassVar[str] = "arc" session_id: Annotated[str, Field(description="The session ID of the architecture")] version: Annotated[int, Field(description="The version of the architecture")] services: Annotated[ List[CloudService], Field(description="List of cloud services in the architecture"), ] class CloudService(BaseModel): name: Annotated[ str, Field(description="The name of cloud service (e.g., EC2, BigQuery, etc.)") ] usage: Annotated[ str, Field(description="Descriptive passage of how the service is used") ] …