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
814
838
tokens_per_name=-1# if there's a name, the role is omitted
815
-
elifmodel=="gpt-4-0314":
839
+
elifmodel=="gpt-3.5-turbo-16k-0613":
840
+
tokens_per_message=4# every message follows <|start|>{role/name}\n{content}<|end|>\n
841
+
tokens_per_name=-1# if there's a name, the role is omitted
842
+
elifmodel=="gpt-4-0613":
816
843
tokens_per_message=3
817
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
818
848
else:
819
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