SessionBlockType = Literal["trace", "evaluation", "text"]
class TraceBlockContent(TypedDict, total=False):
traceId: str
note: Optional[str]
class EvaluationBlockContent(TypedDict, total=False):
evaluationId: str
note: Optional[str]
class TextBlockContent(TypedDict):
text: str
SessionBlockContent = Union[TraceBlockContent, EvaluationBlockContent, TextBlockContent]
class SessionBlock(TypedDict):
id: str
createdAt: str # ISO-8601
type: str # one of SessionBlockType for known blocks
content: dict[str, Any] # narrow with the *BlockContent shapes