You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tokens_per_message=4# every message follows <|start|>{role/name}\n{content}<|end|>\n
838
+
tokens_per_name=-1# if there's a name, the role is omitted
839
+
elifmodel=="gpt-3.5-turbo-16k-0613":
825
840
tokens_per_message=4# every message follows <|start|>{role/name}\n{content}<|end|>\n
826
841
tokens_per_name=-1# if there's a name, the role is omitted
827
-
elifmodel=="gpt-4-0314":
842
+
elifmodel=="gpt-4-0613":
828
843
tokens_per_message=3
829
844
tokens_per_name=1
845
+
elifmodel=="gpt-4-32k-0613":
846
+
tokens_per_message=4# every message follows <|start|>{role/name}\n{content}<|end|>\n
847
+
tokens_per_name=-1# if there's a name, the role is omitted
830
848
else:
831
849
raiseNotImplementedError(f"""num_tokens_from_messages() is not implemented for model {model}. See https://github.com/openai/openai-python/blob/main/chatml.md for information on how messages are converted to tokens.""")
0 commit comments