mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-10 07:10:31 +00:00
added an error message
This commit is contained in:
parent
4562f0564b
commit
19dddd9ffd
@ -562,6 +562,11 @@ class Setup:
|
|||||||
model = model.strip()
|
model = model.strip()
|
||||||
if model:
|
if model:
|
||||||
# Write or update the DEFAULT_MODEL in env_file
|
# Write or update the DEFAULT_MODEL in env_file
|
||||||
|
allModels = self.claudeList + self.fullOllamaList + self.gptlist
|
||||||
|
if model not in allModels:
|
||||||
|
print(
|
||||||
|
f"Error: {model} is not a valid model. Please run fabric --listmodels to see the available models.")
|
||||||
|
sys.exit()
|
||||||
if os.path.exists(self.env_file):
|
if os.path.exists(self.env_file):
|
||||||
with open(self.env_file, "r") as f:
|
with open(self.env_file, "r") as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
|
Loading…
Reference in New Issue
Block a user