| from pydantic import BaseModel, Field |
| from typing import List, Dict, Literal, Optional |
|
|
|
|
| class SearchResult(BaseModel): |
| url: str = Field(..., description="Source URL") |
| title: str = Field(..., description="Title of the result") |
| content: str = Field(..., description="Short summary of the page") |
| score: float = Field(..., description="Relevance or confidence score") |
|
|
|
|
| class SearchEngineOutput(BaseModel): |
| unit_title: str = Field(..., description="Module or unit name") |
| subtopic_title: str = Field(..., description="Subtopic within the unit") |
| query: str = Field(..., description="Executed search query") |
| results: List[SearchResult] = Field(..., description="List of search results") |
|
|