Skip to content

Commit 8b1f738

Browse files
committed
-limited llm input for context window
1 parent 3135433 commit 8b1f738

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web/categorizer/categorizer_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ def _build_categorization_prompt(self, item, predicate: str):
132132
item_info_parts = [f"Name: {item.name}"]
133133

134134
if item.description:
135-
item_info_parts.append(f"Description: {item.description}")
135+
item_info_parts.append(f"Description: {item.description[:100]}")
136136

137137
if item.keywords:
138-
item_info_parts.append(f"Keywords: {item.keywords}")
138+
item_info_parts.append(f"Keywords: {item.keywords[:200]}")
139139

140140
if item.article_text:
141-
# Truncate article text to 5000 characters
142-
article_text = item.article_text[:5000]
141+
# Truncate article text to 1000 characters
142+
article_text = item.article_text[:1000]
143143
item_info_parts.append(f"Article text: {article_text}")
144144

145145
item_info = "\n".join(item_info_parts)

0 commit comments

Comments
 (0)