Skip to content

Conversation

@mags0ft
Copy link
Contributor

@mags0ft mags0ft commented Jul 8, 2025

Hi Jeffry,

I know the title generation issues have already been addressed by you for a few times, but I've seen issue #773 and wanted to add some final fixes.

A limit of 50 tokens for generation is quite generous, as that would equal a maximum title length of up to 37,5 words of pure text - just for a title! On the other hand, tokens for special characters are used up way faster, so the number of tokens to generate should never be lower than the maximum title length in characters.

This commit adds title length clamping to 30 characters with dots (...) added if text gets too long. The maximum tokens generated are 31 (30 for the title + 1 for the emoji).

It also features some minor re-factoring for better maintainability of the prompts and amount of tokens into constants.py.

Hope you're having a lovely day.

mags0ft added 2 commits July 8, 2025 22:00
This commit adds text length clamping to 30 characters with dots (...) added if text gets too long.
It also features some minor re-factoring for better maintainability of the prompts.
@Jeffser
Copy link
Owner

Jeffser commented Jul 9, 2025

thanks for the contribution

@Jeffser Jeffser merged commit f655029 into Jeffser:main Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants