Model info and res preset fix
This commit is contained in:
+12
-1
@@ -26,7 +26,18 @@ async def handle(args: Dict[str, Any]) -> Dict[str, Any]:
|
||||
}
|
||||
|
||||
if model_name not in models:
|
||||
raise ToolError(f"Model '{model_name}' not found in presets. Available models: {', '.join(models.keys())}")
|
||||
# Return the full catalog if the specific model isn't found
|
||||
catalog = []
|
||||
for name, data in models.items():
|
||||
catalog.append({
|
||||
"name": name,
|
||||
"description": data.get("description", "No description provided.")
|
||||
})
|
||||
return {
|
||||
"text": f"Model '{model_name}' not found.\n\nAvailable models:\n\n" +
|
||||
"\n".join([f"- {m['name']}: {m['description']}" for m in catalog]) +
|
||||
"\n\nTo get a detailed prompting guide and available resolutions for a specific model, call this tool again with the 'model_name' argument."
|
||||
}
|
||||
|
||||
model_data = models[model_name]
|
||||
res_set_name = model_data.get("Resolution Set")
|
||||
|
||||
Reference in New Issue
Block a user