- Регистрация
- 08.10.2023
- Сообщения
- 134
- Благодарностей
- 35
- Баллы
- 28
Hello Zenno Friends,
I am currently working with ZennoPoster and facing a scenario where I need to truncate text to a maximum of 3000 characters.
( i want to stay in the limit of Opean AI api,)
I am using the Substring function as per the documentation. However, I encounter an error when the text to be truncated is shorter than 3000 characters. If the text is longer than 3000 characters, the function works perfectly, truncating the text to 3000 characters.
I am looking for a way to achieve the truncation in a single action/block within ZennoPoster without having to first check the text's length with a conditional statement. The goal is to have a streamlined solution that can handle the text irrespective of its initial length.
Is there an alternative action or a way to use Substring (or a similar function) in ZennoPoster that can elegantly handle this scenario without requiring a preceding conditional check on the text length?
I appreciate any guidance or suggestions on how to accomplish this.
Thank you in advance!
I am currently working with ZennoPoster and facing a scenario where I need to truncate text to a maximum of 3000 characters.
( i want to stay in the limit of Opean AI api,)
I am using the Substring function as per the documentation. However, I encounter an error when the text to be truncated is shorter than 3000 characters. If the text is longer than 3000 characters, the function works perfectly, truncating the text to 3000 characters.
I am looking for a way to achieve the truncation in a single action/block within ZennoPoster without having to first check the text's length with a conditional statement. The goal is to have a streamlined solution that can handle the text irrespective of its initial length.
Is there an alternative action or a way to use Substring (or a similar function) in ZennoPoster that can elegantly handle this scenario without requiring a preceding conditional check on the text length?
I appreciate any guidance or suggestions on how to accomplish this.
Thank you in advance!