Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#58·gpt-migrate

ValueError: No valid completion model args passed in - {'model': 'gpt-4o',

Author: ricardox98Created Feb 18, 2025Updated Feb 18, 2025

I download code last night,but I got this error:

239 │ else: ││ 240 │ logging(model=model, input=messages, azure=azure, logger_fn=logger_fn) ││ 241 │ args = locals() ││ ❱ 242 │ raise ValueError(f"No valid completion model args passed in - {args}") ││ 243 │ return response ││ 244 except Exception as e: ││ 245 │ # log the original exception ││ ││ ╭───────────────────────────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────────────────────────╮ ││ │ args = { │ ││ │ │ 'model': 'gpt-4o', │ ││ │ │ 'messages': [ │ ││ │ │ │ { │ ││ │ │ │ │ 'role': 'user', │ ││ │ │ │ │ 'content': 'The following prompt is a composition of prompt sections, each with different pr'+2798 │ ││ │ │ │ } │ ││ │ │ ], │ ││ │ │ 'functions': [], │ ││ │ │ 'function_call': '', │ ││ │ │ 'temperature': 0.0, │ ││ │ │ 'top_p': 1, │ ││ │ │ 'n': 1, │ ││ │ │ 'stream': False, │ ││ │ │ 'stop': None, │ ││ │ │ 'max_tokens': 10000, │ ││ │ │ ... +9 │ ││ │ } │ ││ │ azure = False │ ││ │ force_timeout = 60 │ ││ │ frequency_penalty = 0 │ ││ │ function_call = '' │ ││ │ functions = [] │ ││ │ logger_fn = None │ ││ │ logit_bias = {} │ ││ │ max_tokens = 10000 │ ││ │ messages = [{'role': 'user', 'content': 'The following prompt is a composition of prompt sections, each with different pr'+2798}] │ ││ │ model = 'gpt-4o' │ ││ │ n = 1 │ ││ │ optional_params = {'temperature': 0.0, 'max_tokens': 10000} │ ││ │ presence_penalty = 0 │ ││ │ stop = None │ ││ │ stream = False │ ││ │ temperature = 0.0 │ ││ │ top_p = 1 │ ││ │ user = '' │ ││ │ verbose = False │ ││ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ValueError: No valid completion model args passed in - {'model': 'gpt-4o', 'messages': [{'role': 'user', 'content': 'The following prompt is a composition of
prompt sections, each with different preference levels. Higher preference levels override lower preference levels. The lowest preference level, PREFERENCE LEVEL1, will likely be a broad guideline of some sort. Prompt sections with higher preference levels are likely to be more specific instructions that would override.....

also the same with gpt-4 gpt-4-32k.... but i use gpt-3.5 here is the error:

InvalidRequestError: max_tokens is too large: 10000. This model supports at most 4096 completion tokens, whereas you provided 10000

SO WHAT SHOULD I DO TO FIX IT?

Source: joshpxyne/gpt-migrate

View original on GitHubView discussion on GitHub