I have this code

```
import os
from flask import Flask, request, jsonify, session, send_file
from flask_cors import CORS
from werkzeug.utils import secure_filename
from langchain_openai import ChatOpenAI
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
from langchain_core.runnables.base import RunnableSequence
from langchain_openai import OpenAI
from dotenv import load_dotenv
import docx
import io
import zipfile
from datetime import datetime

load_dotenv()

app = Flask(__name__)
CORS(app)

app.config['UPLOAD_FOLDER'] = './uploads'
app.secret_key = 'supersecretkey'

if not os.path.exists(app.config['UPLOAD_FOLDER']):
    os.makedirs(app.config['UPLOAD_FOLDER'])

OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')

if not OPENAI_API_KEY:
    raise ValueError("Please set the OPENAI_API_KEY environment variable.")

llm = ChatOpenAI(api_key=OPENAI_API_KEY, model_name="gpt-4o-mini")

prompt_template = PromptTemplate(    
    input_variables=["document", "instructions"],    
    template="""    
    Document: {document}    

    Instructions: {instructions}    

    Based on the document and instructions provided, generate the required content. And you are not allowed to have any special characters in the output.    
    """
)

llm_chain = RunnableSequence(
    prompt_template,
    llm
)

temp_storage = {}
def read_docx(file_path):
    doc = docx.Document(file_path)
    full_text = []
    for para in doc.paragraphs:
        full_text.append(para.text)
    return '\n'.join(full_text)

# Route 1: Upload up to five Word files
@app.route('/upload', methods=['POST'])
def upload_files():
    if 'files' not in request.files:
        return jsonify({"error": "No files part in the request"}), 400

    files = request.files.getlist('files')
    if len(files) > 5:
        return jsonify({"error": "You can only upload up to 5 files"}), 400

    filenames = []
    for file in files:
        if file.filename == '':
            return jsonify({"error": "No selected file"}), 400

        filename = secure_filename(file.filename)
        filepath = os.path.join(app.config['UPLOAD_FOLDER'], filename)
        file.save(filepath)
        filenames.append(filename)
    # Store uploaded filenames in session
    session['uploaded_files'] = filenames

    return jsonify({"message": "Files uploaded successfully", "files": filenames}), 200

# Route 2: Review uploaded documents
@app.route('/review', methods=['POST'])
def review_documents():
    # Get the instructions and comparison flag from the request
    data = request.json
    filenames = data.get("files", session.get('uploaded_files'))
    instructions = data.get("instructions")
    compare = data.get("compare", False)

    if not instructions:
        return jsonify({"error": "Instructions are required"}), 400

    if not filenames:
        return jsonify({"error": "No uploaded files found"}), 400

    documents = []
    for filename in filenames:
        filepath = os.path.join(app.config['UPLOAD_FOLDER'], filename)
        document_text = read_docx(filepath)  # Assuming `read_docx` reads the .docx file content
        documents.append(document_text)

    response = []

    # If comparison is enabled, combine documents
    if compare:
        combined_document = "\n\n---\n\n".join(documents)
        ai_response = llm_chain.invoke({"document": combined_document, "instructions": instructions})
        response = ai_response.content
    else:
        for doc in documents:
            ai_response = llm_chain.invoke({"document": doc, "instructions": instructions})
            response.append(ai_response.content)

    # Store the processed_content in session for download
    session['processed_content'] = response if isinstance(response, list) else [response]
    temp_storage['processed_content'] = response if isinstance(response, list) else [response]
    return jsonify({"processed_content": response}), 200

# Route 3: Download the processed content as a zipped Word file
@app.route('/download', methods=['GET'])
def download_file():
    processed_content = temp_storage.get('processed_content')
    
    if not processed_content:
        return jsonify({"error": "No processed content available for download"}), 400

    # Create a Word document in memory
    doc = docx.Document()
    for content in processed_content:
        doc.add_paragraph(content)
    
    doc_io = io.BytesIO()
    doc.save(doc_io)
    doc_io.seek(0)

    # Create a zip file in memory
    zip_io = io.BytesIO()
    with zipfile.ZipFile(zip_io, mode='w', compression=zipfile.ZIP_DEFLATED) as zip_file:
        # Naming the Word file with a timestamp to ensure uniqueness
        timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
        doc_filename = f"processed_content_{timestamp}.docx"
        zip_file.writestr(doc_filename, doc_io.read())
    zip_io.seek(0)

    return send_file(
        zip_io,
        mimetype='application/zip',
        as_attachment=True,
        download_name='processed_content.zip'
    )

if __name__ == '__main__':
    app.run(host="0.0.0.0", port=5000, debug=True)
```

In this code I do not want the output like this as it is giving in the download API right now, right I have the following thing: 

```In the first API user uploads a docx document, In 2nd API the chat model reviews it according to the provided instructions in the 2nd API. In 3rd API the output text gets converted back to the docx file. Instead of this in 2nd API i.e. '/review' I want the language model to draft the document based on the instructions provided. I want the model to add comments in the document based on the document, and the line on which the comment will be written will be chosen by the language model itself based on the instructions. And finally 3rd '/download' API will give us docx files zipped to download as it gives right now.```