Skip to content

Update Compel to 2.1.1 and apply Sentences Split logic #8026

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hipsterusername
Copy link
Member

@hipsterusername hipsterusername commented May 20, 2025

Summary

This pull request introduces changes to improve text handling in the compel node and updates project metadata and dependencies in pyproject.toml. Key updates include enabling sentence-based splitting for long text prompts, updating dependency versions, and revising project metadata to reflect the current state of the project.

We should consider advising that very long prompts may have different results using the new parsing logic, but are reproducible if manually split using the .and() parsing logic.

Changes to text handling in compel.py:

  • Added SplitLongTextMode.SENTENCES to the split_long_text_mode parameter in two instances of Compel initialization, enabling more graceful splitting of long text prompts. [1] [2]
  • Imported SplitLongTextMode from the compel library to support the new functionality.

Updates to pyproject.toml:

  • Updated the compel dependency version from 2.0.2 to 2.1.1 to ensure compatibility with the new text-splitting functionality.
  • Revised project metadata

QA Instructions

Test prompts (I've done testing myself and seen behavior continue to function)

Merge Plan

N/A

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added python PRs that change python files Root invocations PRs that change invocations python-deps PRs that change python dependencies labels May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invocations PRs that change invocations python PRs that change python files python-deps PRs that change python dependencies Root
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant