Added flask_cors
This commit is contained in:
@@ -5,6 +5,7 @@ import threading
|
|||||||
import queue
|
import queue
|
||||||
import requests
|
import requests
|
||||||
from flask import Flask, request, jsonify
|
from flask import Flask, request, jsonify
|
||||||
|
from flask_cors import CORS
|
||||||
from playwright.sync_api import sync_playwright
|
from playwright.sync_api import sync_playwright
|
||||||
|
|
||||||
EMAIL = os.environ.get("HEDGEDOC_EMAIL")
|
EMAIL = os.environ.get("HEDGEDOC_EMAIL")
|
||||||
@@ -23,6 +24,8 @@ NOTES_FILE = "active_notes.txt"
|
|||||||
new_notes_queue = queue.Queue()
|
new_notes_queue = queue.Queue()
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
CORS(app)
|
||||||
|
|
||||||
# ---------- LLM Integration ----------
|
# ---------- LLM Integration ----------
|
||||||
def call_llm(context_text, chat_history):
|
def call_llm(context_text, chat_history):
|
||||||
if not LLM_API_KEY:
|
if not LLM_API_KEY:
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
playwright==1.40.0
|
playwright==1.40.0
|
||||||
flask==3.0.0
|
flask==3.0.0
|
||||||
|
flask-cors==4.0.0
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
|
|||||||
Reference in New Issue
Block a user