Type score_threshold with union, not |, to support python <3.10

This commit is contained in:
Debanjum Singh Solanky 2023-03-10 18:18:31 -06:00
parent 198d9af8cf
commit b9caad458e

View file

@ -2,7 +2,7 @@
import math
import yaml
import logging
from typing import List, Optional
from typing import List, Optional, Union
# External Packages
from fastapi import APIRouter
@ -60,7 +60,7 @@ def search(
n: Optional[int] = 5,
t: Optional[SearchType] = None,
r: Optional[bool] = False,
score_threshold: Optional[float | None] = None,
score_threshold: Optional[Union[float, None]] = None,
dedupe: Optional[bool] = True,
):
results: List[SearchResponse] = []