mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-05 19:15:34 +00:00
fix: key bug
This commit is contained in:
parent
939024ca4d
commit
1ef61a75c8
@ -105,7 +105,7 @@ def main():
|
|||||||
|
|
||||||
translate_model = MODEL_DICT.get(options.model)
|
translate_model = MODEL_DICT.get(options.model)
|
||||||
assert translate_model is not None, "unsupported model"
|
assert translate_model is not None, "unsupported model"
|
||||||
if translate_model in ["gpt3", "chatgptapi"]:
|
if options.model in ["gpt3", "chatgptapi"]:
|
||||||
OPENAI_API_KEY = options.openai_key or env.get("OPENAI_API_KEY")
|
OPENAI_API_KEY = options.openai_key or env.get("OPENAI_API_KEY")
|
||||||
if not OPENAI_API_KEY:
|
if not OPENAI_API_KEY:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user