Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
from flask import Flask, request, render_template, session, url_for, redirect, jsonify
|
| 2 |
-
from flask_session import Session
|
| 3 |
from langchain_core.messages import HumanMessage, AIMessage
|
| 4 |
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
| 5 |
import os
|
|
@@ -76,11 +75,11 @@ setup_database()
|
|
| 76 |
app = Flask(__name__)
|
| 77 |
app.secret_key = "a_really_strong_static_secret_key_12345"
|
| 78 |
|
| 79 |
-
# --- CONFIGURE SERVER-SIDE SESSIONS ---
|
| 80 |
-
app.config["SESSION_PERMANENT"] = False
|
| 81 |
-
app.config["SESSION_TYPE"] = "filesystem"
|
| 82 |
-
app.config["SESSION_FILE_DIR"] = "/app/flask_session" # Explicitly tell Flask where to write
|
| 83 |
-
Session(app)
|
| 84 |
|
| 85 |
google_api_key = os.getenv("GOOGLE_API_KEY")
|
| 86 |
if not google_api_key:
|
|
|
|
| 1 |
from flask import Flask, request, render_template, session, url_for, redirect, jsonify
|
|
|
|
| 2 |
from langchain_core.messages import HumanMessage, AIMessage
|
| 3 |
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
| 4 |
import os
|
|
|
|
| 75 |
app = Flask(__name__)
|
| 76 |
app.secret_key = "a_really_strong_static_secret_key_12345"
|
| 77 |
|
| 78 |
+
# # --- CONFIGURE SERVER-SIDE SESSIONS ---
|
| 79 |
+
# app.config["SESSION_PERMANENT"] = False
|
| 80 |
+
# app.config["SESSION_TYPE"] = "filesystem"
|
| 81 |
+
# app.config["SESSION_FILE_DIR"] = "/app/flask_session" # Explicitly tell Flask where to write
|
| 82 |
+
# Session(app)
|
| 83 |
|
| 84 |
google_api_key = os.getenv("GOOGLE_API_KEY")
|
| 85 |
if not google_api_key:
|