fix index of range (#3279)

### What problem does this PR solve?

#3273

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2024-11-08 09:58:11 +08:00 committed by GitHub
parent 416efbe7e8
commit ff2bbb487f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,7 +39,6 @@ class MindMapResult:
class MindMapExtractor:
_llm: CompletionLLM
_input_text_key: str
_mind_map_prompt: str
@ -163,7 +162,7 @@ class MindMapExtractor:
elif isinstance(value, list):
new_value = {}
for i in range(len(value)):
if isinstance(value[i], list):
if isinstance(value[i], list) and i > 0:
new_value[value[i - 1]] = value[i][0]
data[key] = new_value
else: