Welcome to Pi Chat - Global using LangChain, LangFlow and OpenAI! This chatbot is designed to generate responses using large language models and provide a seamless user experience. It is built with a Flask backend and a frontend created using HTML, CSS, and JavaScript.
This project aims to demonstrate the capabilities of LangChain, LangFlow and OpenAI to create an intelligent chatbot that can engage in meaningful conversations with users. The architecture consists of the following components:
-
Backend (Flask): The backend of the chatbot is built using Flask, a Python web framework. It handles user requests, communicates with the LangChain's chat models, and manages the integration with OpenAI's API.
-
Frontend (HTML, CSS, JS): The frontend is developed using HTML for structuring, CSS for styling, and JavaScript for interactive features. It allows users to interact with the chatbot and view the responses in a user-friendly interface.
-
LangChain Models: LangChain chat models are utilized to process user input, understand context, and generate coherent responses. They play a key role in providing relevant and context-aware replies to user queries.
-
LangFlow Integration: Langflow chat models are imported and integrated with the global app to process user input and generate coherent responses.
-
OpenAI Integration: The project leverages OpenAI's large language models to enhance the quality and diversity of responses generated by the chatbot. This integration enhances the user experience and makes the conversations more engaging.
-
Installation:
- Clone this repository to your local machine.
- Install the required Python packages using
pip install -r requirements.txt
.
-
Configuration:
- Obtain API keys and credentials for LangChain and OpenAI.
- Configure the API endpoints and authentication details in the Flask app.
-
Running the App:
- Start the Flask server using
python app.py
. - Access the chatbot interface by opening the provided URL in your web browser.
- Start the Flask server using
- Users can visit the chatbot interface via the web browser.
- Input messages and queries in the provided input field.
- The chatbot will process the input, use LangChain models for context analysis, and generate responses using OpenAI's language models.
- Responses will be displayed in the chat interface in real-time.
Contributions, suggestions, and feedback are welcome! If you find any issues, have ideas for improvements, or want to contribute new features, feel free to submit pull requests or open issues on the GitHub repository.