rcmdnk / chatgpt-prompt-wrapper

cli tool to wrap ChatGPT Python API
https://pypi.org/project/chatgpt-prompt-wrapper/
Apache License 2.0
8 stars 2 forks source link

max token for gpt-4o is suppressed by 4096 #103

Open rcmdnk opened 1 month ago

rcmdnk commented 1 month ago

as in https://platform.openai.com/docs/models gpt-4o has CONTEXT WINDOW of 128,000.

but if model_max_tokens for gpt-4o is set as 128,000,

openai.error.InvalidRequestError: max_tokens is too large: 127991. This model supports at most 4096 completion tokens, whereas you provided 127991.
rcmdnk commented 1 month ago

this is same for gpt-3.5-turbo (CONTEXT WINDOW = 16385)

maybe a limit of old openai API (should be upgraded?) https://github.com/rcmdnk/chatgpt-prompt-wrapper/issues/76