From 0c3342488b0ccd1ef8eebb73c1f39ed2612a5842 Mon Sep 17 00:00:00 2001 From: Victor Miti Date: Wed, 10 Jul 2024 16:48:08 +0100 Subject: [PATCH] refactor: bump summary limits because some summaries get truncated --- app/core/summarization/backends/together.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/summarization/backends/together.py b/app/core/summarization/backends/together.py index d44524d..c93e064 100644 --- a/app/core/summarization/backends/together.py +++ b/app/core/summarization/backends/together.py @@ -18,7 +18,7 @@ def summarize(content: str, title: str) -> str: prompt = f"You are a distinguished news editor and content publisher, your task is to summarize the following news entry. The summary should accurately reflect the main message and arguments presented in the original news entry, while also being concise and easy to understand. Your summary should not exceed two sentences.\n\n ```{content}```:" model = "garage-bAInd/Platypus2-70B-instruct" temperature = 0.7 - max_tokens = 128 + max_tokens = 192 response = client.completions.create( prompt=prompt, @@ -42,7 +42,7 @@ def brief_summary(content: str, title: str) -> str: prompt = f"You are a distinguished news editor and content publisher, your task is to summarize the following news entry in one sentence.\n\n ```{content}```:" model = "garage-bAInd/Platypus2-70B-instruct" temperature = 0.7 - max_tokens = 78 + max_tokens = 96 response = client.completions.create( prompt=prompt,