This commit is contained in:
Russell Ballestrini 2023-11-01 07:40:57 -04:00
parent 2349af1b13
commit 62a0d2f6c0
4 changed files with 14 additions and 2 deletions

13
app.py
View file

@ -1,4 +1,4 @@
from flask import Flask, render_template, request
from flask import Flask, render_template, request, send_from_directory
from flask_socketio import SocketIO, emit, join_room
import eventlet
@ -53,6 +53,11 @@ with app.app_context():
db.create_all()
@app.route("/favicon.ico")
def favicon():
return send_from_directory(os.path.join(app.root_path, "static"), "favicon.ico")
@app.route("/")
def index():
return render_template("index.html")
@ -110,7 +115,11 @@ def handle_message(data):
room=data["room"],
)
if "claude" in data["message"] or "gpt-3" in data["message"] or "gpt-4" in data["message"]:
if (
"claude" in data["message"]
or "gpt-3" in data["message"]
or "gpt-4" in data["message"]
):
# Emit a temporary message indicating that llm is processing
emit(
"message",