Skip to content

Commit 6a7bfbf

Browse files
author
Antonio Cheong
committed
fix typo
1 parent 92f0692 commit 6a7bfbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/revChatGPT/V3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_token_count(self, convo_id: str = "default") -> int:
111111
for key, value in message.items():
112112
num_tokens += len(encoding.encode(value))
113113
if key == "name": # if there's a name, the role is omitted
114-
num_tokens += -1 # role is always required and always 1 token
114+
num_tokens += 1 # role is always required and always 1 token
115115
num_tokens += 2 # every reply is primed with <im_start>assistant
116116
return num_tokens
117117

0 commit comments

Comments
 (0)