Merge pull request #1797 from danielaskdd/defaul-query-mode
feat: change default query mode from hybrid to mix
This commit is contained in:
commit
03cd40d00d
2 changed files with 3 additions and 3 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue