This project aims to create a chatbot interface using Streamlit and OpenAI's GPT-3.5 model for conversational responses. The chatbot maintains a conversation chain, allowing it to remember previous interactions and provide contextually relevant responses.
- Conversation Memory: The chatbot uses various memory mechanisms, including buffer memory, summary memory, and buffer window memory, to retain information from the conversation.
- Dynamic API Key Input: Users can input their OpenAI API key through the Streamlit sidebar, enabling seamless integration with the GPT-3.5 model.
- Real-time Interaction: Users can input questions or statements, and the chatbot responds in real-time, maintaining a conversation history visible to the user.
- Install the required packages:
pip install streamlit streamlit-chat langchain
- Set up an OpenAI API key and ensure it's correctly configured in the API_Key variable.
- Run the Streamlit app using the command:
streamlit run app.py
- User Input: Enter your question or statement in the text box provided.
- Conversation Summary: Click the "Summarise the conversation" button in the sidebar to view a summary of the ongoing conversation.
- Response Display: The chatbot's responses and the user's input are displayed in real-time, providing a seamless chat experience.
-
Implement more sophisticated conversation memory mechanisms for improved context retention.
-
Enhance the chatbot's responses by incorporating additional models or techniques.