Просмотр исходного кода

fix: double brace issue (#3328)

### What problem does this PR solve?

#3299

### Type of change

- [x] Performance Improvement
tags/v0.14.0
Kevin Hu 11 месяцев назад
Родитель
Сommit
88072b1e90
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 2 добавлений и 0 удалений
  1. 2
    0
      graphrag/community_reports_extractor.py

+ 2
- 0
graphrag/community_reports_extractor.py Просмотреть файл

@@ -80,6 +80,8 @@ class CommunityReportsExtractor:
token_count += num_tokens_from_string(text + response)
response = re.sub(r"^[^\{]*", "", response)
response = re.sub(r"[^\}]*$", "", response)
response = re.sub(r"\{\{", "{", response)
response = re.sub(r"\}\}", "}", response)
print(response)
response = json.loads(response)
if not dict_has_keys_with_types(response, [

Загрузка…
Отмена
Сохранить