import openai
openai.api_key = "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"

conversation = [
    {"role": "system", "content": "You are a helpful assistant with deep knowledge about the Eastern Orthodox Church. Provide as thoughtful and detailed as answers as possible."},
]

import streamlit as st

st.title("Eastern Orthodox Assistant")
st.markdown("You are a helpful assistant with deep knowledge about the Eastern Orthodox Church. Provide as thoughtful and detailed as answers as possible.")

while True:
    question = st.text_input("question : ")
    conversation.append({"role": "user", "content": question})
    response = openai.ChatCompletion.create(
      model="gpt-3.5-turbo",
      messages=conversation
    )
    answer = response['choices'][0]['message']['content']
    st.write(answer)
    conversation.append({"role": "assistant", "content": answer},)
