Remove ll-keywords and hl-keywords from WebUI
This commit is contained in:
@@ -1 +1 @@
|
|||||||
__api_version__ = "0168"
|
__api_version__ = "0169"
|
||||||
|
@@ -67,16 +67,6 @@ class QueryRequest(BaseModel):
|
|||||||
description="Maximum number of tokens allocated for entity descriptions in local retrieval.",
|
description="Maximum number of tokens allocated for entity descriptions in local retrieval.",
|
||||||
)
|
)
|
||||||
|
|
||||||
hl_keywords: Optional[List[str]] = Field(
|
|
||||||
default=None,
|
|
||||||
description="List of high-level keywords to prioritize in retrieval.",
|
|
||||||
)
|
|
||||||
|
|
||||||
ll_keywords: Optional[List[str]] = Field(
|
|
||||||
default=None,
|
|
||||||
description="List of low-level keywords to refine retrieval focus.",
|
|
||||||
)
|
|
||||||
|
|
||||||
conversation_history: Optional[List[Dict[str, Any]]] = Field(
|
conversation_history: Optional[List[Dict[str, Any]]] = Field(
|
||||||
default=None,
|
default=None,
|
||||||
description="Stores past conversation history to maintain context. Format: [{'role': 'user/assistant', 'content': 'message'}].",
|
description="Stores past conversation history to maintain context. Format: [{'role': 'user/assistant', 'content': 'message'}].",
|
||||||
@@ -93,20 +83,6 @@ class QueryRequest(BaseModel):
|
|||||||
def query_strip_after(cls, query: str) -> str:
|
def query_strip_after(cls, query: str) -> str:
|
||||||
return query.strip()
|
return query.strip()
|
||||||
|
|
||||||
@field_validator("hl_keywords", mode="after")
|
|
||||||
@classmethod
|
|
||||||
def hl_keywords_strip_after(cls, hl_keywords: List[str] | None) -> List[str] | None:
|
|
||||||
if hl_keywords is None:
|
|
||||||
return None
|
|
||||||
return [keyword.strip() for keyword in hl_keywords]
|
|
||||||
|
|
||||||
@field_validator("ll_keywords", mode="after")
|
|
||||||
@classmethod
|
|
||||||
def ll_keywords_strip_after(cls, ll_keywords: List[str] | None) -> List[str] | None:
|
|
||||||
if ll_keywords is None:
|
|
||||||
return None
|
|
||||||
return [keyword.strip() for keyword in ll_keywords]
|
|
||||||
|
|
||||||
@field_validator("conversation_history", mode="after")
|
@field_validator("conversation_history", mode="after")
|
||||||
@classmethod
|
@classmethod
|
||||||
def conversation_history_role_check(
|
def conversation_history_role_check(
|
||||||
|
@@ -94,10 +94,6 @@ export type QueryRequest = {
|
|||||||
max_token_for_global_context?: number
|
max_token_for_global_context?: number
|
||||||
/** Maximum number of tokens allocated for entity descriptions in local retrieval. */
|
/** Maximum number of tokens allocated for entity descriptions in local retrieval. */
|
||||||
max_token_for_local_context?: number
|
max_token_for_local_context?: number
|
||||||
/** List of high-level keywords to prioritize in retrieval. */
|
|
||||||
hl_keywords?: string[]
|
|
||||||
/** List of low-level keywords to refine retrieval focus. */
|
|
||||||
ll_keywords?: string[]
|
|
||||||
/**
|
/**
|
||||||
* Stores past conversation history to maintain context.
|
* Stores past conversation history to maintain context.
|
||||||
* Format: [{"role": "user/assistant", "content": "message"}].
|
* Format: [{"role": "user/assistant", "content": "message"}].
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import { QueryMode, QueryRequest } from '@/api/lightrag'
|
import { QueryMode, QueryRequest } from '@/api/lightrag'
|
||||||
// Removed unused import for Text component
|
// Removed unused import for Text component
|
||||||
import Input from '@/components/ui/Input'
|
|
||||||
import Checkbox from '@/components/ui/Checkbox'
|
import Checkbox from '@/components/ui/Checkbox'
|
||||||
import NumberInput from '@/components/ui/NumberInput'
|
import NumberInput from '@/components/ui/NumberInput'
|
||||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/Card'
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/Card'
|
||||||
@@ -242,71 +241,6 @@ export default function QuerySettings() {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|
||||||
{/* Keywords */}
|
|
||||||
<>
|
|
||||||
<>
|
|
||||||
<TooltipProvider>
|
|
||||||
<Tooltip>
|
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<label htmlFor="hl_keywords" className="ml-1 cursor-help">
|
|
||||||
{t('retrievePanel.querySettings.hlKeywords')}
|
|
||||||
</label>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent side="left">
|
|
||||||
<p>{t('retrievePanel.querySettings.hlKeywordsTooltip')}</p>
|
|
||||||
</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</TooltipProvider>
|
|
||||||
<div>
|
|
||||||
{/* Removed sr-only label */}
|
|
||||||
<Input
|
|
||||||
id="hl_keywords"
|
|
||||||
type="text"
|
|
||||||
value={querySettings.hl_keywords?.join(', ')}
|
|
||||||
onChange={(e) => {
|
|
||||||
const keywords = e.target.value
|
|
||||||
.split(',')
|
|
||||||
.map((k) => k.trim())
|
|
||||||
.filter((k) => k !== '')
|
|
||||||
handleChange('hl_keywords', keywords)
|
|
||||||
}}
|
|
||||||
placeholder={t('retrievePanel.querySettings.hlkeywordsPlaceHolder')}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
|
|
||||||
<>
|
|
||||||
<TooltipProvider>
|
|
||||||
<Tooltip>
|
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<label htmlFor="ll_keywords" className="ml-1 cursor-help">
|
|
||||||
{t('retrievePanel.querySettings.llKeywords')}
|
|
||||||
</label>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent side="left">
|
|
||||||
<p>{t('retrievePanel.querySettings.llKeywordsTooltip')}</p>
|
|
||||||
</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</TooltipProvider>
|
|
||||||
<div>
|
|
||||||
{/* Removed sr-only label */}
|
|
||||||
<Input
|
|
||||||
id="ll_keywords"
|
|
||||||
type="text"
|
|
||||||
value={querySettings.ll_keywords?.join(', ')}
|
|
||||||
onChange={(e) => {
|
|
||||||
const keywords = e.target.value
|
|
||||||
.split(',')
|
|
||||||
.map((k) => k.trim())
|
|
||||||
.filter((k) => k !== '')
|
|
||||||
handleChange('ll_keywords', keywords)
|
|
||||||
}}
|
|
||||||
placeholder={t('retrievePanel.querySettings.hlkeywordsPlaceHolder')}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
</>
|
|
||||||
|
|
||||||
{/* Toggle Options */}
|
{/* Toggle Options */}
|
||||||
<>
|
<>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
Reference in New Issue
Block a user