mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refactor: move mcp connection utilities to common (#11304)
### What problem does this PR solve? As title ### Type of change - [x] Refactoring --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -155,13 +155,13 @@ def qbullets_category(sections):
|
||||
if re.match(pro, sec) and not not_bullet(sec):
|
||||
hits[i] += 1
|
||||
break
|
||||
maxium = 0
|
||||
maximum = 0
|
||||
res = -1
|
||||
for i, h in enumerate(hits):
|
||||
if h <= maxium:
|
||||
if h <= maximum:
|
||||
continue
|
||||
res = i
|
||||
maxium = h
|
||||
maximum = h
|
||||
return res, QUESTION_PATTERN[res]
|
||||
|
||||
|
||||
@ -222,13 +222,13 @@ def bullets_category(sections):
|
||||
if re.match(p, sec) and not not_bullet(sec):
|
||||
hits[i] += 1
|
||||
break
|
||||
maxium = 0
|
||||
maximum = 0
|
||||
res = -1
|
||||
for i, h in enumerate(hits):
|
||||
if h <= maxium:
|
||||
if h <= maximum:
|
||||
continue
|
||||
res = i
|
||||
maxium = h
|
||||
maximum = h
|
||||
return res
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user