File size: 713 Bytes
325b94c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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")