refine OpenAi Api (#159)

This commit is contained in:
KevinHuSh
2024-03-27 17:55:45 +08:00
committed by GitHub
parent 0cb95c688e
commit bf2e3d7fc1
5 changed files with 16 additions and 12 deletions

View File

@ -51,7 +51,7 @@ def set_api_key():
if len(arr[0]) == 0 or tc == 0:
raise Exception("Fail")
except Exception as e:
msg += f"\nFail to access embedding model({llm.llm_name}) using this api key."
msg += f"\nFail to access embedding model({llm.llm_name}) using this api key." + str(e)
elif not chat_passed and llm.model_type == LLMType.CHAT.value:
mdl = ChatModel[factory](
req["api_key"], llm.llm_name)