feat(nlp-service): scaffold — models, requirements, CLAUDE.md

Task 1: Create standalone FastAPI service scaffold with models, test framework,
and documentation. Includes ParseRequest, ParseResponse Pydantic models matching
OllamaExtraction contract, plus three passing tests validating model validation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-07 10:11:34 +02:00
parent 6878419156
commit e3b8e57746
4 changed files with 97 additions and 0 deletions

17
nlp-service/models.py Normal file
View File

@@ -0,0 +1,17 @@
from __future__ import annotations
from typing import Literal
from pydantic import BaseModel
class ParseRequest(BaseModel):
query: str
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