udpate
This commit is contained in:
@@ -276,7 +276,9 @@ class OllamaClient:
|
||||
|
||||
def _build_translation_prompt(self, title, target_language):
|
||||
"""Build prompt for title translation"""
|
||||
prompt = f"""Translate the following German news headline to {target_language}. Provide only the translation without any explanations, quotes, or additional text.
|
||||
prompt = f"""Translate the following German news headline to {target_language}.
|
||||
|
||||
IMPORTANT: Provide ONLY the {target_language} translation. Do not include explanations, quotes, or any other text. Just the translated headline.
|
||||
|
||||
German headline:
|
||||
{title}
|
||||
@@ -308,12 +310,19 @@ German headline:
|
||||
if len(words) > 5000:
|
||||
content = ' '.join(words[:5000]) + '...'
|
||||
|
||||
prompt = f"""Summarize the following article in English in {max_words} words or less. Even if the article is in German or another language, provide the summary in English. Focus on the key points, main message, and important details. Be concise and clear.
|
||||
prompt = f"""You are a skilled journalist writing for The New York Times. Summarize the following article in English in {max_words} words or less.
|
||||
|
||||
Write in the clear, engaging, and authoritative style of New York Times Magazine:
|
||||
- Lead with the most newsworthy information
|
||||
- Use active voice and vivid language
|
||||
- Make it accessible and easy to read
|
||||
- Focus on what matters to readers
|
||||
- Even if the source is in German or another language, write your summary entirely in English
|
||||
|
||||
Article:
|
||||
{content}
|
||||
|
||||
English Summary (max {max_words} words):"""
|
||||
New York Times-style summary (max {max_words} words):"""
|
||||
|
||||
return prompt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user