Merge pull request #1797 from danielaskdd/defaul-query-mode

feat: change default query mode from hybrid to mix
This commit is contained in:
Daniel.y 2025-07-17 19:23:24 +08:00 committed by GitHub
commit 03cd40d00d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -199,7 +199,7 @@ def parse_query_mode(query: str) -> tuple[str, SearchMode, bool, Optional[str]]:
"/mix ": (SearchMode.mix, False), "/mix ": (SearchMode.mix, False),
"/bypass ": (SearchMode.bypass, False), "/bypass ": (SearchMode.bypass, False),
"/context": ( "/context": (
SearchMode.hybrid, SearchMode.mix,
True, True,
), ),
"/localcontext": (SearchMode.local, True), "/localcontext": (SearchMode.local, True),
@ -215,7 +215,7 @@ def parse_query_mode(query: str) -> tuple[str, SearchMode, bool, Optional[str]]:
cleaned_query = query[len(prefix) :].lstrip() cleaned_query = query[len(prefix) :].lstrip()
return cleaned_query, mode, only_need_context, user_prompt return cleaned_query, mode, only_need_context, user_prompt
return query, SearchMode.hybrid, False, user_prompt return query, SearchMode.mix, False, user_prompt
class OllamaAPI: class OllamaAPI:

View file

@ -23,7 +23,7 @@ class QueryRequest(BaseModel):
) )
mode: Literal["local", "global", "hybrid", "naive", "mix", "bypass"] = Field( mode: Literal["local", "global", "hybrid", "naive", "mix", "bypass"] = Field(
default="hybrid", default="mix",
description="Query mode", description="Query mode",
) )