File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1- from typing_extensions import Literal , TypedDict
1+ from typing import Any
2+ from typing_extensions import TypedDict
23
34
4- class Polygon (TypedDict ):
5- type : Literal ["Polygon" ]
6- coordinates : list [list [list [float ]]]
7-
8-
9- class Point (TypedDict ):
10- type : Literal ["Point" ]
11- coordinates : list [float ]
5+ class Geometry (TypedDict ):
6+ type : str
7+ coordinates : Any
Original file line number Diff line number Diff line change @@ -150,8 +150,8 @@ async def wrapper(*args, **kwargs):
150150 if param_name in ("feature" , "quad" , "mosaic" , "series" ):
151151 wrapper .__annotations__ [param_name ] = dict
152152 elif param_name == "geometry" and "planet.models" in str (param .annotation ):
153- # llms should always submit geometry inputs as a Polygon or Point
154- hint = models .Polygon | models . Point
153+ # llms should always submit geometry inputs as a geojson geometry
154+ hint = models .Geometry
155155
156156 # add None if originally used (NoneType will be an arg
157157 # within a Union type)
You can’t perform that action at this time.
0 commit comments