mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-06 05:39:12 +00:00
Set max cos distance to 0.18. Test search API query with max distance
This commit is contained in:
@@ -376,7 +376,7 @@ async def search(
|
||||
# initialize variables
|
||||
user_query = q.strip()
|
||||
results_count = n or 5
|
||||
max_distance = max_distance if max_distance is not None else math.inf
|
||||
max_distance = max_distance or math.inf
|
||||
search_futures: List[concurrent.futures.Future] = []
|
||||
|
||||
# return cached results, if available
|
||||
@@ -581,7 +581,7 @@ async def chat(
|
||||
request: Request,
|
||||
q: str,
|
||||
n: Optional[int] = 5,
|
||||
d: Optional[float] = 0.15,
|
||||
d: Optional[float] = 0.18,
|
||||
client: Optional[str] = None,
|
||||
stream: Optional[bool] = False,
|
||||
user_agent: Optional[str] = Header(None),
|
||||
|
||||
Reference in New Issue
Block a user