Add Gemini provider to Demo

This commit is contained in:
hlohaus
2025-02-24 15:50:50 +01:00
parent 5cbbe2fd3d
commit ee9e0c3826
3 changed files with 5 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ class Backend_Api(Api):
else:
json_data = request.json
if app.demo and json_data.get("provider") not in ["DeepSeekAPI", "OpenaiChat", "HuggingFace", "HuggingSpace", "HuggingChat", "G4F", "PollinationsAI"]:
if app.demo and not json_data.get("provider"):
model = json_data.get("model")
if model != "default" and model in models.demo_models:
json_data["provider"] = random.choice(models.demo_models[model][1])