Agent4EO / agent /schema.py
unknown
sample structure updated
9e2c1ea
Raw
History Blame Contribute Delete
902 Bytes
"""Pydantic schemas for Agent4EO."""
from typing import Any, Dict, List, Literal, Optional
from pydantic import BaseModel, Field
class SampleSpec(BaseModel):
"""Specification for a curated EO sample."""
title: str
paths: List[str]
meta: Optional[Dict[str, Any]] = None
class ToolResult(BaseModel):
"""Result from an EO tool execution."""
raster_path: str
preview_png: str
histogram_png: Optional[str] = None
metrics: Dict[str, float]
extras: Dict[str, Any] = Field(default_factory=dict)
class Interpretation(BaseModel):
"""LLM-generated interpretation of EO results."""
headline: str = Field(description="One-sentence summary")
bullets: List[str] = Field(
description="Key findings; each must include at least one numeric value"
)
caveats: List[str] = Field(
default_factory=list, description="0-2 limitations or notes")