gzdaniel commited on
Commit
a760fdf
·
1 Parent(s): f70a76a

Keep old query settings untouched

Browse files
lightrag_webui/src/stores/settings.ts CHANGED
@@ -110,8 +110,8 @@ const useSettingsStoreBase = create<SettingsState>()(
110
  querySettings: {
111
  mode: 'global',
112
  response_type: 'Multiple Paragraphs',
113
- top_k: 10,
114
- chunk_top_k: 5,
115
  max_entity_tokens: 10000,
116
  max_relation_tokens: 10000,
117
  max_total_tokens: 32000,
@@ -119,8 +119,6 @@ const useSettingsStoreBase = create<SettingsState>()(
119
  only_need_prompt: false,
120
  stream: true,
121
  history_turns: 3,
122
- hl_keywords: [],
123
- ll_keywords: [],
124
  user_prompt: '',
125
  enable_rerank: true
126
  },
@@ -263,22 +261,16 @@ const useSettingsStoreBase = create<SettingsState>()(
263
  state.backendMaxGraphNodes = null
264
  }
265
  if (version < 15) {
266
- // 完整更新querySettings到统一token控制系统
267
  state.querySettings = {
268
- mode: 'global',
 
269
  response_type: 'Multiple Paragraphs',
270
- top_k: 10,
271
- chunk_top_k: 5,
272
  max_entity_tokens: 10000,
273
  max_relation_tokens: 10000,
274
  max_total_tokens: 32000,
275
- only_need_context: false,
276
- only_need_prompt: false,
277
- stream: true,
278
- history_turns: 3,
279
- hl_keywords: [],
280
- ll_keywords: [],
281
- user_prompt: '',
282
  enable_rerank: true
283
  }
284
  }
 
110
  querySettings: {
111
  mode: 'global',
112
  response_type: 'Multiple Paragraphs',
113
+ top_k: 40,
114
+ chunk_top_k: 10,
115
  max_entity_tokens: 10000,
116
  max_relation_tokens: 10000,
117
  max_total_tokens: 32000,
 
119
  only_need_prompt: false,
120
  stream: true,
121
  history_turns: 3,
 
 
122
  user_prompt: '',
123
  enable_rerank: true
124
  },
 
261
  state.backendMaxGraphNodes = null
262
  }
263
  if (version < 15) {
264
+ // Add new querySettings
265
  state.querySettings = {
266
+ ...state.querySettings,
267
+ mode: 'mix',
268
  response_type: 'Multiple Paragraphs',
269
+ top_k: 40,
270
+ chunk_top_k: 10,
271
  max_entity_tokens: 10000,
272
  max_relation_tokens: 10000,
273
  max_total_tokens: 32000,
 
 
 
 
 
 
 
274
  enable_rerank: true
275
  }
276
  }