diff --git a/hedgeagent.py b/hedgeagent.py index 3373092..ad5fc2b 100644 --- a/hedgeagent.py +++ b/hedgeagent.py @@ -5,6 +5,7 @@ import threading import queue import requests from flask import Flask, request, jsonify +from flask_cors import CORS from playwright.sync_api import sync_playwright EMAIL = os.environ.get("HEDGEDOC_EMAIL") @@ -23,6 +24,8 @@ NOTES_FILE = "active_notes.txt" new_notes_queue = queue.Queue() app = Flask(__name__) +CORS(app) + # ---------- LLM Integration ---------- def call_llm(context_text, chat_history): if not LLM_API_KEY: diff --git a/requirements.txt b/requirements.txt index fabfa10..9a74b55 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ playwright==1.40.0 flask==3.0.0 +flask-cors==4.0.0 requests==2.31.0