Source code for system.utility.schema
"""Schema definitions for API endpoints."""
from typing import Optional
from pydantic import BaseModel, Field, field_validator
[docs]
class AgentOutputSchema(BaseModel):
"""Agent response schema."""
result: str = Field(..., description="full breadth of analysis carried out")
findings: Optional[str] = Field(default=None, description="findings of the entire reasearch operation")
plot: Optional[str] = Field(default=None, description="plot of the stock price over time")
status: str = Field(default="success", description="Response status")
timestamp: str = Field(..., description="Timestamp of analysis")