Chatter.AI is a web application that allows you to chat with websites and extract information from them. It uses the OpenAI API and LangChain library to process and understand the content of the website and allow users to interact with it on the Streamlit interface. It has two output formats: JSON and Q/A, including I/O configuration flexibility.
Link: https://chatter-ai.streamlit.app/
To run Chatter.AI on your local machine, you need to have the followings installed:
- Anaconda / Miniconda
- Streamlit
- LangChain
- Python 3.10
- openai
- langchain-openai
- beautifulsoup4
- chromadb
In older version .env
file was needed but now its not required anymore. Just directly paste your OpenAI API key
in the interface Input.
- Install the dependencies by running the following command in the terminal:
conda create --name chatter-ai python=3.10
conda activate chatter-ai
pip install streamlit langchain langchain-openai beautifulsoup4 chromadb
- Run the application by executing the following command in the terminal:
streamlit run src/app.py
or
streamlit run chatter-ai.py
Both files are same. For streamlit deployment requirements, chatter-ai.py
and requirements.txt
files has been created.
- Choose your preferred settings from the "I/O Configuration" section.
- Enter your OPENAI API in the Input Terminal.
- Enter the URL of the website you want to chat with in the "Website URL" input field.
- Press "Enter" to connect with Chatter.AI.
- Wait until Chatter.AI is available. It will greet you soon.
- Ask Chatter.AI your relevant questions based on the website. It will provide you with detailed responses.
- To reset sessions, click the "Reset session" button.
check_output_format(OUTPUT_FORMAT)
: Returns a formatted string based on the output format.get_vector_store_from_url(url)
: Creates a vector store from the URL in document format.get_context_retreiver_chain(vector_store)
: Creates a retriever chain with the context from the vector store.get_conversational_rag_chain(retriever_chain)
: Creates a conversational RAG chain with the retriever chain.get_response(user_input)
: Returns a response from the conversational RAG chain.reset_page()
: Reloads the page.
- Streamlit
- LangChain
- OpenAI
- ChromaDB
- Python
This project is licensed under the MIT License - see the LICENSE.md file for details.