Remove wrong comment and make it more readable.
This commit is contained in:
parent
e4d055b900
commit
4b2f634b79
@ -219,15 +219,10 @@ def main() -> int:
|
||||
command = parser.parse_args()
|
||||
config = read_config(args.config)
|
||||
|
||||
# modify config according to args
|
||||
if type(config['openai']) is dict:
|
||||
config_openai = config['openai']
|
||||
if type(config['openai']) is dict and type(config['openai']['api_key']) is str:
|
||||
openai_api_key(config['openai']['api_key'])
|
||||
else:
|
||||
RuntimeError("Configuration openai is not a dict.")
|
||||
if type(config_openai['api_key']) is str:
|
||||
openai_api_key(config_openai['api_key'])
|
||||
else:
|
||||
raise RuntimeError("Configuration openai.api_key is not a string.")
|
||||
raise RuntimeError("Configuration openai.api_key is wrong.")
|
||||
|
||||
command.func(command, config)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user