Skip to content

Commit 50599e0

Browse files
committed
Update code
1 parent 0951b19 commit 50599e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/apps/ai/management/commands/ai_create_chapter_chunks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def extract_chapter_content(self, chapter: Chapter) -> tuple[str, str]:
162162
location_parts.append(f"Location: {chapter.suggested_location}")
163163

164164
if location_parts:
165-
metadata_parts.append("Location Information: " + ", ".join(location_parts))
165+
metadata_parts.append(f"Location Information: {', '.join(location_parts)}")
166166

167167
if chapter.level:
168168
metadata_parts.append(f"Chapter Level: {chapter.level}")
@@ -192,7 +192,7 @@ def extract_chapter_content(self, chapter: Chapter) -> tuple[str, str]:
192192
leaders_info.append(leader_text)
193193

194194
if leaders_info:
195-
metadata_parts.append(f"Location Information: {', '.join(location_parts)}")
195+
metadata_parts.append(f"Chapter Leaders: {', '.join(leaders_info)}")
196196

197197
if chapter.related_urls:
198198
valid_urls = [

0 commit comments

Comments
 (0)