Add Feature provider in demo

Support default provider in DDG
Read api_key from config file
This commit is contained in:
hlohaus
2025-01-27 23:33:21 +01:00
parent 17bd3b3ac6
commit 16e5d9ee86
7 changed files with 48 additions and 12 deletions

View File

@@ -134,7 +134,7 @@ class Backend_Api(Api):
else:
json_data = request.json
if app.demo and json_data.get("provider") != "Custom":
if app.demo and json_data.get("provider") not in ["Custom", "Feature"]:
model = json_data.get("model")
if model != "default" and model in models.demo_models:
json_data["provider"] = random.choice(models.demo_models[model][1])