18 lines
412 B
Python
18 lines
412 B
Python
from __future__ import annotations
|
|
from typing import Literal
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class ParseRequest(BaseModel):
|
|
query: str = Field(max_length=500)
|
|
lang: Literal["de", "en", "es"]
|
|
|
|
|
|
class ParseResponse(BaseModel):
|
|
personNames: list[str]
|
|
personRole: Literal["sender", "receiver", "any"]
|
|
dateFrom: str | None
|
|
dateTo: str | None
|
|
keywords: list[str]
|
|
rawQuery: str
|