summaryrefslogtreecommitdiffstats
path: root/g4f/gui/server/website.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-08 07:24:00 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-08 07:24:00 +0200
commit926ddfd5438ca06840bdff9b9bd21ddcd8863aa9 (patch)
treeb85cf6df7365e5800d9417ce14b010dc0142d727 /g4f/gui/server/website.py
parentAdd nodriver to OpenaiChat (diff)
downloadgpt4free-926ddfd5438ca06840bdff9b9bd21ddcd8863aa9.tar
gpt4free-926ddfd5438ca06840bdff9b9bd21ddcd8863aa9.tar.gz
gpt4free-926ddfd5438ca06840bdff9b9bd21ddcd8863aa9.tar.bz2
gpt4free-926ddfd5438ca06840bdff9b9bd21ddcd8863aa9.tar.lz
gpt4free-926ddfd5438ca06840bdff9b9bd21ddcd8863aa9.tar.xz
gpt4free-926ddfd5438ca06840bdff9b9bd21ddcd8863aa9.tar.zst
gpt4free-926ddfd5438ca06840bdff9b9bd21ddcd8863aa9.zip
Diffstat (limited to 'g4f/gui/server/website.py')
-rw-r--r--g4f/gui/server/website.py12
1 files changed, 11 insertions, 1 deletions
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):