dzenzzz commited on
Commit
be231dd
·
1 Parent(s): 85fd427
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ suggestion_searcher = SuggestionSearcher(collection_name=COLLECTION_NAME_SUGGEST
16
  ALLOWED_API_KEY = str(API_KEY)
17
 
18
  @app.get("/api/search")
19
- async def search(q: str, type: int, lt:str, offset: int):
20
  query = q.lower()
21
  xss = nh3.clean(query)
22
  data = await doc_searcher.search(text=xss,type=type,law_type=lt,offset=offset)
 
16
  ALLOWED_API_KEY = str(API_KEY)
17
 
18
  @app.get("/api/search")
19
+ async def search(q: str, type: int, lt: str | None = None, offset: int = 0):
20
  query = q.lower()
21
  xss = nh3.clean(query)
22
  data = await doc_searcher.search(text=xss,type=type,law_type=lt,offset=offset)