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

Sender增加maxLength、showCount属性 #639

Open
yuki070 opened this issue Mar 21, 2025 · 1 comment
Open

Sender增加maxLength、showCount属性 #639

yuki070 opened this issue Mar 21, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@yuki070
Copy link

yuki070 commented Mar 21, 2025

需求动机

期望对齐一下antd.Input.TextArea,添加maxLength、showCount属性。

大模型类的需求经常会碰到token数量的问题,如果不做限制,用户可能贴一整篇文章进来,会快速消耗token。

提议的 API 是什么样的?

maxLength:最大输入字符数
showCount:显示最大字数和当前字数

Copy link

您提到的需求是希望在 Sender 组件中增加 maxLengthshowCount 属性,以便限制用户输入的字符数,并显示当前输入的字符数和最大字符数。这与 antd.Input.TextArea 的功能对齐,可以有效防止用户输入过多内容,避免快速消耗 token。

目前,这个需求已经被记录在 GitHub issue #639 中。开发团队会考虑这个功能请求,并在未来的版本中进行评估和实现。

如果您有更多的建议或问题,请随时告诉我!

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@kimteayon kimteayon added the enhancement New feature or request label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants