mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
Secure api
This commit is contained in:
parent
a0babdc3eb
commit
ce539f755d
1 changed files with 1 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ class Backend_Api(Api):
|
|||
json_data["referer"] = request.headers.get("referer", "")
|
||||
json_data["user-agent"] = request.headers.get("user-agent", "")
|
||||
if not json_data.get("referer") or "python" in json_data.get("user-agent", "").lower():
|
||||
json_data["provider"] = random.choice(models.default.best_provider.providers)
|
||||
json_data["provider"] = random.choice(models.default.best_provider.providers).__name__
|
||||
json_data["model"] = ""
|
||||
kwargs = self._prepare_conversation_kwargs(json_data)
|
||||
return self.app.response_class(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue