diff --git a/examples/structured-outputs-image.py b/examples/structured-outputs-image.py index 2de17b4..dbcd45f 100644 --- a/examples/structured-outputs-image.py +++ b/examples/structured-outputs-image.py @@ -1,6 +1,6 @@ from pathlib import Path from pydantic import BaseModel -from typing import List, Optional, Literal +from typing import Literal from ollama import chat @@ -13,12 +13,12 @@ class Object(BaseModel): class ImageDescription(BaseModel): summary: str - objects: List[Object] + objects: list[Object] scene: str - colors: List[str] + colors: list[str] time_of_day: Literal['Morning', 'Afternoon', 'Evening', 'Night'] setting: Literal['Indoor', 'Outdoor', 'Unknown'] - text_content: Optional[str] = None + text_content: str | None = None # Get path from user input