Make it possible to specify the AI in config command.

This commit is contained in:
Oleksandr Kozachuk
2023-09-12 16:37:50 +02:00
parent 544bf0bf06
commit 1ec3d6fcda
3 changed files with 11 additions and 5 deletions
+6 -1
View File
@@ -62,7 +62,12 @@ class OpenAI(AI):
"""
Return all models supported by this AI.
"""
raise NotImplementedError
ret = []
for engine in sorted(openai.Engine.list()['data'], key=lambda x: x['id']):
if engine['ready']:
ret.append(engine['id'])
ret.sort()
return ret
def print_models(self) -> None:
"""