mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-10-06 08:46:53 +08:00
Add Feature provider in demo
Support default provider in DDG Read api_key from config file
This commit is contained in:
@@ -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])
|
||||
|
Reference in New Issue
Block a user