fmab777 commited on
Commit
1a6737b
Β·
verified Β·
1 Parent(s): 521c1fb

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -346,7 +346,7 @@ async def _call_gemini(text: str, summary_type: str) -> Tuple[Optional[str], Opt
346
  "β€’ No more than 85 words maximum; but does not have to be exactly 85.\n"
347
  "β€’ Considers the entire text content equally.\n"
348
  "β€’ Uses semicolons (;) instead of em dashes (– or β€”).\n"
349
- "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements.**\n\n" # Added instruction
350
  "Here is the text to summarise:")
351
  else: # points summary
352
  prompt = ("You are an AI model designed to provide concise summaries using British English spellings. Your output MUST strictly follow this format:\n\n"
@@ -363,7 +363,7 @@ async def _call_gemini(text: str, summary_type: str) -> Tuple[Optional[str], Opt
363
  "β€’ Ensure the entire summary takes no more than two minutes to read.\n"
364
  "β€’ Consider the entire text's content, not just the beginning or a few topics.\n"
365
  "β€’ Use semicolons (;) instead of em dashes (– or β€”).\n"
366
- "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements.**\n\n" # Added instruction
367
  "Here is the text to summarise:")
368
 
369
  # Input Length Check (Gemini-specific limits if known, otherwise use a large default)
@@ -443,7 +443,7 @@ async def _call_openrouter(text: str, summary_type: str) -> Tuple[Optional[str],
443
  "β€’ No more than 85 words maximum; but does not have to be exactly 85.\n"
444
  "β€’ Considers the entire text content equally.\n"
445
  "β€’ Uses semicolons (;) instead of em dashes (– or β€”).\n"
446
- "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements.**\n\n" # Added instruction
447
  "Here is the text to summarise:")
448
  else: # points summary
449
  prompt = ("You are an AI model designed to provide concise summaries using British English spellings. Your output MUST strictly follow this format:\n\n"
@@ -460,7 +460,7 @@ async def _call_openrouter(text: str, summary_type: str) -> Tuple[Optional[str],
460
  "β€’ Ensure the entire summary takes no more than two minutes to read.\n"
461
  "β€’ Consider the entire text's content, not just the beginning or a few topics.\n"
462
  "β€’ Use semicolons (;) instead of em dashes (– or β€”).\n"
463
- "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements.**\n\n" # Added instruction
464
  "Here is the text to summarise:")
465
 
466
  # Input Length Check (OpenRouter-specific limit)
 
346
  "β€’ No more than 85 words maximum; but does not have to be exactly 85.\n"
347
  "β€’ Considers the entire text content equally.\n"
348
  "β€’ Uses semicolons (;) instead of em dashes (– or β€”).\n"
349
+ "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements. Do not include things like free/paid tiers; basic/premium memberships. Especially for ACS membership.**\n\n" # Added instruction
350
  "Here is the text to summarise:")
351
  else: # points summary
352
  prompt = ("You are an AI model designed to provide concise summaries using British English spellings. Your output MUST strictly follow this format:\n\n"
 
363
  "β€’ Ensure the entire summary takes no more than two minutes to read.\n"
364
  "β€’ Consider the entire text's content, not just the beginning or a few topics.\n"
365
  "β€’ Use semicolons (;) instead of em dashes (– or β€”).\n"
366
+ "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements. Do not include things like free/paid tiers; basic/premium memberships. Especially for ACS membership.**\n\n" # Added instruction
367
  "Here is the text to summarise:")
368
 
369
  # Input Length Check (Gemini-specific limits if known, otherwise use a large default)
 
443
  "β€’ No more than 85 words maximum; but does not have to be exactly 85.\n"
444
  "β€’ Considers the entire text content equally.\n"
445
  "β€’ Uses semicolons (;) instead of em dashes (– or β€”).\n"
446
+ "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements. Do not include things like free/paid tiers; basic/premium memberships. Especially for ACS membership.**\n\n" # Added instruction
447
  "Here is the text to summarise:")
448
  else: # points summary
449
  prompt = ("You are an AI model designed to provide concise summaries using British English spellings. Your output MUST strictly follow this format:\n\n"
 
460
  "β€’ Ensure the entire summary takes no more than two minutes to read.\n"
461
  "β€’ Consider the entire text's content, not just the beginning or a few topics.\n"
462
  "β€’ Use semicolons (;) instead of em dashes (– or β€”).\n"
463
+ "β€’ **Focus ONLY on the main content; strictly EXCLUDE information about website features, subscriptions, ads, cookie notices, or navigation elements. Do not include things like free/paid tiers; basic/premium memberships. Especially for ACS membership.**\n\n" # Added instruction
464
  "Here is the text to summarise:")
465
 
466
  # Input Length Check (OpenRouter-specific limit)