We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92f0692 commit 6a7bfbfCopy full SHA for 6a7bfbf
src/revChatGPT/V3.py
@@ -111,7 +111,7 @@ def get_token_count(self, convo_id: str = "default") -> int:
111
for key, value in message.items():
112
num_tokens += len(encoding.encode(value))
113
if key == "name": # if there's a name, the role is omitted
114
- num_tokens += -1 # role is always required and always 1 token
+ num_tokens += 1 # role is always required and always 1 token
115
num_tokens += 2 # every reply is primed with <im_start>assistant
116
return num_tokens
117
0 commit comments