import streamlit as st
from langchain.prompts import PromptTemplate

chat_template = PromptTemplate(
    input_variables=['transcript','summary','chat_history','user_message', 'sentiment_report'],
    template='''
        You are an AI chatbot intended to discuss about the user's audio transcription.
        \nTRANSCRIPT: "{transcript}"
        \nTRANSCIRPT SUMMARY: "{summary}"
        \nTRANSCRIPT SENTIMENT REPORT: "{sentiment_report}"
        \nCHAT HISTORY: {chat_history}
        \nUSER MESSAGE: "{user_message}"
        \nAI RESPONSE HERE:
    '''
)

sentiment_prompt = PromptTemplate(
    input_variables=['transcript','summary'],
    template='''
        Return a single word sentiment of either ['Positive','Negative' or 'Neutral'] from this transcript and summary.
        After that single word sentiment, add a comma, then return a sentiment report, analyzing transcript sentiment.
        \nTRANSCRIPT: {transcript}
        \nTRANSCRIPT SUMMARY: {summary}
        \nSENTIMENT LABEL HERE ('Positive','Negative', or 'Neutral') <comma-seperated> REPORT HERE:
    '''
)

fact_check_prompt = '''
        Fact-check this transcript for factual or logical inacurracies or inconsistencies
        \nWrite a report on the factuality / logic of the transcirpt
        \nTRANSCRIPT: {}
        \nTRANSCRIPT SUMMARY: {}
        \nAI FACT CHECK RESPONSE HERE:
'''
langchain.prompts.PromptTemplate
[((88, 562), 'langchain.prompts.PromptTemplate', 'PromptTemplate', ([], {'input_variables': "['transcript', 'summary', 'chat_history', 'user_message', 'sentiment_report']", 'template': '"""\n        You are an AI chatbot intended to discuss about the user\'s audio transcription.\n        \nTRANSCRIPT: "{transcript}"\n        \nTRANSCIRPT SUMMARY: "{summary}"\n        \nTRANSCRIPT SENTIMENT REPORT: "{sentiment_report}"\n        \nCHAT HISTORY: {chat_history}\n        \nUSER MESSAGE: "{user_message}"\n        \nAI RESPONSE HERE:\n    """'}), '(input_variables=[\'transcript\', \'summary\', \'chat_history\',\n    \'user_message\', \'sentiment_report\'], template=\n    """\n        You are an AI chatbot intended to discuss about the user\'s audio transcription.\n        \nTRANSCRIPT: "{transcript}"\n        \nTRANSCIRPT SUMMARY: "{summary}"\n        \nTRANSCRIPT SENTIMENT REPORT: "{sentiment_report}"\n        \nCHAT HISTORY: {chat_history}\n        \nUSER MESSAGE: "{user_message}"\n        \nAI RESPONSE HERE:\n    """\n    )\n', (102, 562), False, 'from langchain.prompts import PromptTemplate\n'), ((595, 1095), 'langchain.prompts.PromptTemplate', 'PromptTemplate', ([], {'input_variables': "['transcript', 'summary']", 'template': '"""\n        Return a single word sentiment of either [\'Positive\',\'Negative\' or \'Neutral\'] from this transcript and summary.\n        After that single word sentiment, add a comma, then return a sentiment report, analyzing transcript sentiment.\n        \nTRANSCRIPT: {transcript}\n        \nTRANSCRIPT SUMMARY: {summary}\n        \nSENTIMENT LABEL HERE (\'Positive\',\'Negative\', or \'Neutral\') <comma-seperated> REPORT HERE:\n    """'}), '(input_variables=[\'transcript\', \'summary\'], template=\n    """\n        Return a single word sentiment of either [\'Positive\',\'Negative\' or \'Neutral\'] from this transcript and summary.\n        After that single word sentiment, add a comma, then return a sentiment report, analyzing transcript sentiment.\n        \nTRANSCRIPT: {transcript}\n        \nTRANSCRIPT SUMMARY: {summary}\n        \nSENTIMENT LABEL HERE (\'Positive\',\'Negative\', or \'Neutral\') <comma-seperated> REPORT HERE:\n    """\n    )\n', (609, 1095), False, 'from langchain.prompts import PromptTemplate\n')]