We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 625dc7b commit 513d7feCopy full SHA for 513d7fe
search/serper.py
@@ -281,7 +281,8 @@ async def extract_page_content(url: str) -> str:
281
# Truncate content if it exceeds the configured maximum length
282
max_length = config.MAX_CONTENT_LENGTH
283
if max_length > 0 and len(result) > max_length:
284
- result = result[:max_length] + "\n\n[Content truncated - extracted text exceeded the maximum allowed length]"
+ truncation_notice = "\n\n[Content truncated - extracted text exceeded the maximum allowed length]"
285
+ result = result[:max_length - len(truncation_notice)] + truncation_notice
286
287
return result
288
0 commit comments