Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9786

How do I count the true number of characters (with any whitespaces) or words in a GPT Chat to find out the border of the chat size? [migrated]

$
0
0

In a local chat frontend of GPT 3.5 Turbo or GPT 4 omni, that is, I am not on the public website of openAI but in a company frontend. Yet, the question stays the same and is is still about the openAI service that is behind the interface.

I try to find out the number of allowed characters or words. Over time, I saved a pile of chats that reached the border of allowed input as a website. If i ask the bot for the number of characters, it can only guess, such a counter is not known.

For GPT 3.5 Turbo, the border seems to be 57666 characters for a first entry. It can be a little bit more if you spread it over more entries:

  • I could enter 64663 characters, only the next 13242 reached the border so that the bot answered with 0 characters in the 22nd item. To count the characters and words took me some time since I had to copy and paste all of the messages, without the names in the frame, and without linebreaks at the end since I guess that the frame itself does not cost any tokens or does not count as characters.
  • I do not know whether I need to copy all of the chat text together with the chat frame of me and the bot. If the latter were true, counting the characters and words would be easier, and what I could enter without reaching the border would rise a little more to 64776.

Be it 64663 or 64776 in that example, it will be slightly higher if spread over more than one entry. Only for the very first entry, 57666 seems to be a strict border since three new chats could prove it. Also, I am not sure whether the characters are the border since I the chatbot stops at the last full word while writing an answer and reaching the chat border. Since the licence works with tokens that rely on the words, it could be that also the chat border is made by the number of words.

I tried getting the number from a chat that I saved as a htm website, but I could not find the pure text anywhere. That is why I copy the chat by hand from the website into VSCode or Notepad++, remove anything that is more than the chat names, and by this get the characters or words. This is handicraft work. I hope that there is a better way to get such counts from a website, and I guess that the frame with the names of the chatters do not need to be counted. Even if that does not make a big change, I wonder whether HTML or any other trick, perhaps even a GPT Chat trick, offers a better way of counting the text that you see - and not what the hmtl behind - and choose only the text in the chat window which is likely the only text that counts.

Thus, the question is tagged with HTML since that is just the likely outcome, but it can also be answered without HTML - if you can reach the aim without it.


Viewing all articles
Browse latest Browse all 9786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>