api_models.py
555 Bytes
"""Pydantic request bodies for the evaluation FastAPI app."""
from __future__ import annotations
from typing import List, Optional
from pydantic import BaseModel, Field
class SearchEvalRequest(BaseModel):
query: str
top_k: int = Field(default=100, ge=1, le=500)
auto_annotate: bool = False
language: str = "en"
class BatchEvalRequest(BaseModel):
queries: Optional[List[str]] = None
top_k: int = Field(default=100, ge=1, le=500)
auto_annotate: bool = False
language: str = "en"
force_refresh_labels: bool = False