mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Type score_threshold with union, not |, to support python <3.10
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
import math
|
import math
|
||||||
import yaml
|
import yaml
|
||||||
import logging
|
import logging
|
||||||
from typing import List, Optional
|
from typing import List, Optional, Union
|
||||||
|
|
||||||
# External Packages
|
# External Packages
|
||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
@@ -60,7 +60,7 @@ def search(
|
|||||||
n: Optional[int] = 5,
|
n: Optional[int] = 5,
|
||||||
t: Optional[SearchType] = None,
|
t: Optional[SearchType] = None,
|
||||||
r: Optional[bool] = False,
|
r: Optional[bool] = False,
|
||||||
score_threshold: Optional[float | None] = None,
|
score_threshold: Optional[Union[float, None]] = None,
|
||||||
dedupe: Optional[bool] = True,
|
dedupe: Optional[bool] = True,
|
||||||
):
|
):
|
||||||
results: List[SearchResponse] = []
|
results: List[SearchResponse] = []
|
||||||
|
|||||||
Reference in New Issue
Block a user