Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(Builder): Enhance AITextSummarizerBlock with configurable summary style and focus #8165

Conversation

Torantulino
Copy link
Member

@Torantulino Torantulino commented Sep 25, 2024

Background

This was requested by a couple of users and I've felt the need two when building agents.

Changes 🏗️

The AITextSummarizerBlock in the autogpt_platform/backend/backend/blocks/llm.py file has been enhanced to include the following changes:

  • Added a new enum class, SummaryStyle, with options for concise, detailed, bullet points, and numbered list styles.
  • Added a new input parameter, focus, to specify the topic of the summary.
  • Modified the _summarize_chunk method to include the style and focus in the prompt.
  • Modified the _combine_summaries method to include the style and focus in the prompt.

These changes allow users to customize the style and focus of the generated summaries, providing more flexibility and control.

…ry style and focus

The AITextSummarizerBlock in the autogpt_platform/backend/backend/blocks/llm.py file has been enhanced to include the following changes:
- Added a new enum class, SummaryStyle, with options for concise, detailed, bullet points, and numbered list styles.
- Added a new input parameter, focus, to specify the topic of the summary.
- Modified the _summarize_chunk method to include the style and focus in the prompt.
- Modified the _combine_summaries method to include the style and focus in the prompt.

These changes allow users to customize the style and focus of the generated summaries, providing more flexibility and control.
@Torantulino Torantulino added Block A Block to be used in the AutoGPT Builder platform/backend AutoGPT Platform - Back end labels Sep 25, 2024
@Torantulino Torantulino requested a review from a team as a code owner September 25, 2024 12:38
@Torantulino Torantulino requested review from kcze and aarushik93 and removed request for a team September 25, 2024 12:38
Copy link

PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Key issues to review

Potential Performance Issue
The _combine_summaries method now uses \n\n to join summaries instead of a single space. This might lead to unnecessarily long combined text, potentially affecting performance when processing large amounts of data.

Code Consistency
The prompt variable in _summarize_chunk method is defined inline, while in _combine_summaries it's split across multiple lines. Consider using a consistent style for better readability.

Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit d533e6a
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/66f568a7825d510008ed0a62

@Torantulino Torantulino changed the title feat(platform): Enhance AITextSummarizerBlock with configurable summary style and focus Feat(Builder): Enhance AITextSummarizerBlock with configurable summary style and focus Sep 25, 2024
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Sep 26, 2024
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Sep 26, 2024
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@Torantulino Torantulino enabled auto-merge (squash) September 26, 2024 14:18
Copy link
Contributor

@kcze kcze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Torantulino Torantulino merged commit 41e3c4f into master Sep 26, 2024
13 checks passed
@Torantulino Torantulino deleted the toran/open-1882-add-style-and-focus-options-to-ai-text-summary-block branch September 26, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Block A Block to be used in the AutoGPT Builder platform/backend AutoGPT Platform - Back end Review effort [1-5]: 2 size/m
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants