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

Avoid removing whitespace between prompts (trim) #42

Closed
steak3 opened this issue May 18, 2023 · 5 comments
Closed

Avoid removing whitespace between prompts (trim) #42

steak3 opened this issue May 18, 2023 · 5 comments

Comments

@steak3
Copy link

steak3 commented May 18, 2023

Hello,

When the prompt input loses focus, the prompts currently changes from "masterpiece, best quality" to "masterpiece,best quality".
Doing like this helps improve prompt readablilty and leaves the user style unchanged.

Thanks !

@Physton
Copy link
Owner

Physton commented May 19, 2023

At first there were spaces, but lost9999 mentioned that extra spaces consume token count. #10

@steak3
Copy link
Author

steak3 commented May 19, 2023

I see.
Then I’m wondering : shouldn’t we leave this optimisation responsibility to the user so he can format it as he used to ? He can always trim it by himself if he really needs to.

I believe it is not the goal of this extension, but I may be mistaken.

@Physton
Copy link
Owner

Physton commented May 19, 2023

The extension has not been developed for long, and I am the only one, so I do not have much energy to develop many features that do not affect normal use. One is affecting token counting, and the other is just a matter of convenience for viewing. At present, I must prioritize developing features that affect functionality. This can only be done gradually, but it will definitely be done in the future. Others have also mentioned this issue.

Physton added a commit that referenced this issue May 19, 2023
@Physton
Copy link
Owner

Physton commented May 19, 2023

A checkbox has been added to the settings to indicate whether to keep or remove spaces.

@Physton Physton closed this as completed May 19, 2023
Physton added a commit that referenced this issue Jun 15, 2023
Former-commit-id: 7d17dc0728ed55439c8dbd30d878376ea8da739c
@God-damnit-all
Copy link

I think spaces consuming tokens only affects certain languages, particularly kanji-based ones. When using English words, the spaces after commas don't change the token count.

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

No branches or pull requests

3 participants