mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-12-27 06:42:13 +00:00
feat: change default query mode from hybrid to mix
- Update default mode for Ollama chat endpoint - Update default mode for query endpoint of LightRAG
This commit is contained in:
parent
e828539b24
commit
99527027de
@ -199,7 +199,7 @@ def parse_query_mode(query: str) -> tuple[str, SearchMode, bool, Optional[str]]:
|
||||
"/mix ": (SearchMode.mix, False),
|
||||
"/bypass ": (SearchMode.bypass, False),
|
||||
"/context": (
|
||||
SearchMode.hybrid,
|
||||
SearchMode.mix,
|
||||
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()
|
||||
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:
|
||||
|
||||
@ -23,7 +23,7 @@ class QueryRequest(BaseModel):
|
||||
)
|
||||
|
||||
mode: Literal["local", "global", "hybrid", "naive", "mix", "bypass"] = Field(
|
||||
default="hybrid",
|
||||
default="mix",
|
||||
description="Query mode",
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user