Add model aliases to OpenaiChat

This commit is contained in:
hlohaus
2025-06-20 22:08:56 +02:00
parent ffb1914cbe
commit 85aaa84932
3 changed files with 10 additions and 4 deletions

View File

@@ -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():
return "Please use a browser to access the demo.", 403
return "Reduce your requests to 2 at the same time. I only have a budget of 4. More requests cause errors in the console.", 403
kwargs = self._prepare_conversation_kwargs(json_data)
return self.app.response_class(
safe_iter_generator(self._create_response_stream(