From 926ddfd5438ca06840bdff9b9bd21ddcd8863aa9 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 8 Apr 2024 07:24:00 +0200 Subject: Add WhiteRabbitNeo Provider, Many tiny improvments in the gui --- g4f/gui/server/website.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'g4f/gui/server/website.py') diff --git a/g4f/gui/server/website.py b/g4f/gui/server/website.py index 4e611177..5e633674 100644 --- a/g4f/gui/server/website.py +++ b/g4f/gui/server/website.py @@ -4,9 +4,11 @@ from flask import render_template, redirect class Website: def __init__(self, app) -> None: self.app = app + def redirect_home(): + return redirect('/chat') self.routes = { '/': { - 'function': lambda: redirect('/chat'), + 'function': redirect_home, 'methods': ['GET', 'POST'] }, '/chat/': { @@ -17,6 +19,14 @@ class Website: 'function': self._chat, 'methods': ['GET', 'POST'] }, + '/menu/': { + 'function': redirect_home, + 'methods': ['GET', 'POST'] + }, + '/settings/': { + 'function': redirect_home, + 'methods': ['GET', 'POST'] + }, } def _chat(self, conversation_id): -- cgit v1.2.3