fix: make ChatGPT_API_with_finish_reason return consistent tuple

Signed-off-by: luojiyin <luojiyin@hotmail.com>
This commit is contained in:
luojiyin 2026-01-19 12:27:35 +08:00
parent 823c11e642
commit 87962b4d42
No known key found for this signature in database
GPG key ID: 9F5399380CCFD0B3

View file

@ -54,7 +54,7 @@ def ChatGPT_API_with_finish_reason(model, prompt, api_key=CHATGPT_API_KEY, chat_
time.sleep(1) # Wait for 1秒 before retrying time.sleep(1) # Wait for 1秒 before retrying
else: else:
logging.error('Max retries reached for prompt: ' + prompt) logging.error('Max retries reached for prompt: ' + prompt)
return "Error" return "", "error"