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:
17
nlp-service/models.py
Normal file
17
nlp-service/models.py
Normal 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
|
||||
Reference in New Issue
Block a user