fixed situation where there was no default model listed

This commit is contained in:
xssdoctor 2024-03-16 12:56:04 -04:00
parent 371f16fac9
commit 70a7f7ad0c

View File

@ -49,11 +49,7 @@ class Standalone:
self.args = args
self.model = getattr(args, 'model', None)
if not self.model:
try:
self.model = os.environ.get(
"DEFAULT_MODEL")
except KeyError:
self.model = 'gpt-4-turbo-preview'
self.model = 'gpt-4-turbo-preview'
self.claude = False
sorted_gpt_models, ollamaList, claudeList = self.fetch_available_models()
self.local = self.model in ollamaList