File size: 351 Bytes
2ba3952
 
 
 
 
 
 
 
 
 
ba7a4be
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import streamlit as st
from streamlit_chat import message
from utils import get_initial_message, get_chatgpt_response, update_chat
import os
from dotenv import load_dotenv
load_dotenv()
import openai

openai.api_key = os.getenv('OPENAI_API_KEY')

# Read this, https://blog.futuresmart.ai/building-a-gpt-4-chatbot-using-chatgpt-api-and-streamlit-chat