Simplify JSON since not all providers see or use this the same

This commit is contained in:
Nicolas Mowen 2026-05-08 08:03:22 -06:00
parent 7f3118f1ef
commit 733c50c6e8

View File

@ -2,7 +2,7 @@ from typing import Annotated
from pydantic import BaseModel, ConfigDict, Field, StringConstraints
ObservationItem = Annotated[str, StringConstraints(min_length=20, max_length=160)]
ObservationItem = Annotated[str, StringConstraints(min_length=20, max_length=200)]
class ReviewMetadata(BaseModel):
@ -11,19 +11,8 @@ class ReviewMetadata(BaseModel):
observations: list[ObservationItem] = Field(
...,
min_length=3,
max_length=15,
description=(
"Enumerate the significant observations across all frames, in "
"chronological order, BEFORE composing the scene narrative. "
"Include the very start of the activity — for example, a vehicle "
"entering the frame or pulling into the driveway — even if it "
"lasts only a few frames and the rest of the clip is dominated "
"by a longer activity. Include each arrival, departure, motion "
"event, object handled, and notable change in position or state. "
"Each item is a single concrete fact written as a complete "
"sentence. Do not summarize, interpret, or assign meaning here — "
"that belongs in the scene field."
),
max_length=8,
description="Enumerate the significant observations across all frames, in chronological order.",
)
scene: str = Field(
min_length=150,
@ -32,12 +21,12 @@ class ReviewMetadata(BaseModel):
)
title: str = Field(
max_length=80,
description="Under 10 words. Name the apparent purpose or outcome of the activity together with the location involved. Do not narrate or list the sequence of actions step by step.",
description="Title for the activity.",
)
shortSummary: str = Field(
min_length=70,
max_length=120,
description="A brief 2-sentence summary of the scene, suitable for notifications.",
max_length=140,
description="A brief summary for the activity.",
)
confidence: float = Field(
ge=0.0,