mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Set no. of references to use for chat configurable in Chat API
This commit is contained in:
parent
d97682fdac
commit
2f31de5ed5
1 changed files with 2 additions and 1 deletions
|
@ -436,6 +436,7 @@ def chat_init(
|
|||
async def chat(
|
||||
request: Request,
|
||||
q: Optional[str] = None,
|
||||
n: Optional[int] = 5,
|
||||
client: Optional[str] = None,
|
||||
user_agent: Optional[str] = Header(None),
|
||||
referer: Optional[str] = Header(None),
|
||||
|
@ -495,7 +496,7 @@ async def chat(
|
|||
result_list = []
|
||||
for query in inferred_queries:
|
||||
result_list.extend(
|
||||
await search(query, request=request, n=5, r=False, score_threshold=-5.0, dedupe=False)
|
||||
await search(query, request=request, n=n, r=False, score_threshold=-5.0, dedupe=False)
|
||||
)
|
||||
compiled_references = [item.additional["compiled"] for item in result_list]
|
||||
|
||||
|
|
Loading…
Reference in a new issue