update summary length (#227)

This commit is contained in:
Preston Rasmussen 2024-12-05 15:51:31 -05:00 committed by GitHub
parent ab0688927f
commit 7ca6121cde
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,6 +54,8 @@ def summarize_pair(context: dict[str, Any]) -> list[Message]:
role='user', role='user',
content=f""" content=f"""
Synthesize the information from the following two summaries into a single succinct summary. Synthesize the information from the following two summaries into a single succinct summary.
Summaries must be under 500 words.
Summaries: Summaries:
{json.dumps(context['node_summaries'], indent=2)} {json.dumps(context['node_summaries'], indent=2)}
@ -81,6 +83,8 @@ def summarize_context(context: dict[str, Any]) -> list[Message]:
information from the provided MESSAGES. Your summary should also only contain information relevant to the information from the provided MESSAGES. Your summary should also only contain information relevant to the
provided ENTITY. provided ENTITY.
Summaries must be under 500 words.
<ENTITY> <ENTITY>
{context['node_name']} {context['node_name']}
</ENTITY> </ENTITY>
@ -99,6 +103,7 @@ def summary_description(context: dict[str, Any]) -> list[Message]:
role='user', role='user',
content=f""" content=f"""
Create a short one sentence description of the summary that explains what kind of information is summarized. Create a short one sentence description of the summary that explains what kind of information is summarized.
Summaries must be under 500 words.
Summary: Summary:
{json.dumps(context['summary'], indent=2)} {json.dumps(context['summary'], indent=2)}