Replies: 2 comments 1 reply
-
I'm not a Readwise user, but from what I can tell, is their template designed to display only the central sentences of a text if it is longer than 1000 tokens. |
Beta Was this translation helpful? Give feedback.
1 reply
-
A helper function is added to the Text Generator Template engine that allows you to take a substring of text. To use this function, simply use the following syntax: {{{substring var startPosition endPosition}}} For example, if you only want the first 100 characters of the selected text, you would use: {{{substring selection 0 99}}} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Readwise Reader has a neat way of working with long texts. In their prompt template they include:
"""
{% if (document.content | count_tokens) > 1000 %}
{{ document.content | central_sentences | join('\n\n') }}
{% else %}
{{ document.content }}
{% endif %}
"""
What would be the equivalent way of doing this with the text generator plugin? Either via text or template?
Beta Was this translation helpful? Give feedback.
All reactions