mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-04-24 23:56:21 +02:00
Merge pull request #63 from luojiyin1987/fix/api-error-return
fix: make ChatGPT_API_with_finish_reason return consistent tuple
This commit is contained in:
commit
b487f9d7c7
1 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue