mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2026-03-18 11:06:08 +00:00
The OpenAI API deprecated 'max_tokens' parameter in favor of 'max_completion_tokens' for newer models (o1, gpt-4o, etc.). This change fixes the error: 'Unsupported parameter: max_tokens is not supported with this model. Use max_completion_tokens instead.' Refs: https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_tokens Signed-off-by: Evgenii Kuzakov <evgeniy.kuzakov@csssr.com> Co-authored-by: Evgenii Kuzakov <evgeniy.kuzakov@csssr.com>