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

fix: thread title summarization doesn't work well on reasoning models #4504

Merged

Conversation

louis-menlo
Copy link
Contributor

Describe Your Changes

This PR resolved the issue where thread titles weren't being generated for threads using reasoning models.

  1. Summarization title shouldn't break when encountering a line break
  2. Exclude thought section

CleanShot 2025-01-22 at 11 18 02@2x

Changes

This pull request includes several changes to the ModelHandler function in the web/containers/Providers/ModelHandler.tsx file. The changes focus on improving the handling and cleaning of message content before updating the thread title.

Improvements to message content handling:

  • Changed messageContent from const to let to allow for modifications.
  • Replaced newline characters in messageContent with spaces and extracted content after </think> tag if present.

Simplification of code:

  • Removed unnecessary checks and warnings related to the length of the message content.

Clarification in prompt message:

  • Updated the summarizeFirstPrompt to provide clearer instructions by adding "Here is the message:" before the message content.

@louis-menlo louis-menlo requested a review from a team January 22, 2025 04:22
@github-actions github-actions bot added the type: bug Something isn't working label Jan 22, 2025
Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

Copy link
Contributor

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@louis-menlo louis-menlo merged commit a3b242c into release/v0.5.14 Jan 22, 2025
27 of 31 checks passed
@louis-menlo louis-menlo deleted the fix/thread-title-summarization-constraints branch January 22, 2025 08:27
@github-actions github-actions bot added this to the v0.5.15 milestone Jan 22, 2025
@louis-menlo
Copy link
Contributor Author

This PR also addressed #4343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants