A modified Streamlit chatbot to chat with a Quran dataset.
- Takes user queries via Streamlit's
st.chat_input
and displays both user queries and model responses withst.chat_message
- Uses LlamaIndex to load and index data and create a chat engine that will retrieve context from that data to respond to each user query
You can get your own OpenAI API key by following the following instructions:
- Go to https://platform.openai.com/account/api-keys.
- Click on the
+ Create new secret key
button. - Next, enter an identifier name (optional) and click on the
Create secret key
button. - Add your API key to your
secrets.toml
file. If you don't already have asecrets.toml
file, add a folder named.streamlit
, create a file calledsecrets.toml
within the folder, and add the following to it:openai_key = <your key here>
Alternatively, you can use Streamlit Community Cloud's secrets management feature to add your API key via the web interface.