diff --git a/chatnoir_api/model/result.py b/chatnoir_api/model/result.py index 5fa419e..179178a 100644 --- a/chatnoir_api/model/result.py +++ b/chatnoir_api/model/result.py @@ -22,7 +22,7 @@ class MinimalResult(ABC): score: float uuid: UUID - target_uri: str | None + target_uri: Optional[str] snippet: HighlightedText index: Index title: HighlightedText diff --git a/chatnoir_api/v1/model.py b/chatnoir_api/v1/model.py index 64dafb1..a29282f 100644 --- a/chatnoir_api/v1/model.py +++ b/chatnoir_api/v1/model.py @@ -43,7 +43,7 @@ class PhraseRequest(Request, DataClassJsonMixin): class MinimalResultResponse(MinimalResult, DataClassJsonMixin): score: float uuid: UUID = field(metadata=config(decoder=decode_uuid)) - target_uri: str | None + target_uri: Optional[str] snippet: HighlightedText = field(metadata=config(decoder=HighlightedText)) index: Index = field(metadata=config(decoder=parse_index)) title: HighlightedText = field(